Skip to content
New issue

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

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

Already on GitHub? # to your account

Support level being passed in as an environment variable #35

Closed
jmac105 opened this issue Jun 10, 2021 · 3 comments
Closed

Support level being passed in as an environment variable #35

jmac105 opened this issue Jun 10, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jmac105
Copy link

jmac105 commented Jun 10, 2021

Hi,

I'd find it really useful if the level option could be passed in as an environment variable, as it can be to the native npm audit command via NPM_CONFIG_AUDIT_LEVEL environment variable. This would allow for setting a global audit level across all of our CI pipeline builds, some of which use 'npm audit' and some of which use 'better-npm-audit audit'.

Would you consider a PR which would set a default value for level as a fourth parameter here

.option('-l, --level <auditLevel>', 'The minimum audit level to validate.')
, taking the value from process.env.NPM_CONFIG_AUDIT_LEVEL?

Cheers

@jeemok
Copy link
Owner

jeemok commented Jun 11, 2021

yeah I think that is a good idea, let me prepare the PR now

@jeemok jeemok self-assigned this Jun 11, 2021
@jeemok jeemok added the enhancement New feature or request label Jun 11, 2021
@jeemok
Copy link
Owner

jeemok commented Jun 11, 2021

@jmac105 you can now install and use it in v1.11.0. Thanks for the suggestion! :)

@jeemok jeemok closed this as completed Jun 11, 2021
@jmac105
Copy link
Author

jmac105 commented Jun 11, 2021

Awesome thanks for actioning it so quickly!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants