Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should be consistent with server command (skipAudit) #419

Open
seawatts opened this issue Dec 13, 2017 · 4 comments
Open

Should be consistent with server command (skipAudit) #419

seawatts opened this issue Dec 13, 2017 · 4 comments

Comments

@seawatts
Copy link
Contributor

https://github.com/denali-js/denali/blob/82401b4517b94426c3d723981eafad6356fd39cf/commands/build.ts#L39

@knownasilya
Copy link
Member

Audit is no longer a thing in the latest code, although those options are still in the commands. @davewasmer what's the goal here?

@davewasmer
Copy link
Collaborator

I'm open to suggestions.

Ideally, I want to make security a "default" thing as much as possible in Denali. The Node Security Project (nsp) is a good resource that catalogs CVE's for Node projects and offers tools to programmatically analyze your package.json for vulnerable packages.

My gut says that this should be baked into Denali core, although I'm open to reasons why an addon might be better.

If it's core, then one question is when to run the check - on every single build? On production builds only? On CI only?

@knownasilya
Copy link
Member

knownasilya commented Feb 27, 2018

What about a denali audit command, which does nsp and maybe other things? Then a ci:test script could run audit and test.

@davewasmer
Copy link
Collaborator

Hm, yea, that could work.

Here's a slight tweak, lemme know what you think:

  • denali test, when run in a CI environment (i.e. $CI exists) will automatically run the audit step. You can add --skip-audit to avoid this step, but must explicitly add the flag (making security the default).

  • In a local environment, you can either run denali test --audit (which basically does the same as running in a CI environment - runs tests and audit), or you can run denali audit if you want just the audit results.

I think this approach is a good blend of security by default, while allowing for escape valves for folks that don't want it, and easy ways to track down problems locally when detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants