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

Return exit codes based on validation #65

Closed
binarykitchen opened this issue Mar 8, 2019 · 4 comments
Closed

Return exit codes based on validation #65

binarykitchen opened this issue Mar 8, 2019 · 4 comments
Labels
invalid This doesn't seem right

Comments

@binarykitchen
Copy link

Currently exit code 0 is always returned no matter whether there are vulnerabilities or not. Can you add that? Thanks

@quinnturner quinnturner added the bug Something isn't working label Mar 8, 2019
@quinnturner
Copy link
Member

This is definitely the desired behaviour 👍

@quinnturner
Copy link
Member

IMO it would be best if we returned the exit code received from the original audit unless the exit code was non-zero due to a vulnerability that is whitelisted or below the specified level. This handles cases of other potential codes such as codes related to network errors, invalid registry, etc. At a minimum, it should return 1 if there's a non-whitelisted vulnerability above the level specified.

@dubbha
Copy link

dubbha commented Mar 8, 2019

Currently exit code 0 is always returned no matter whether there are vulnerabilities or not.

Um.. Are you sure that is the case? I mean the whole idea of the wrapper is for it to fail

if there's a non-whitelisted vulnerability above the level specified

in a CI environment,which basically means it returns a non-zero exit-code. I am pretty sure that's exactly what's happening.

@binarykitchen
Copy link
Author

Sorry I was wrong. When it fails it returns exit code of 1. When it passed, it returns 0. To verify this, run the echo $? command afterwards.

@quinnturner quinnturner added invalid This doesn't seem right and removed bug Something isn't working labels Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants