-
Notifications
You must be signed in to change notification settings - Fork 62
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
Exit codes #99
Comments
Sounds good. We can also make our exit codes slightly semantic (1 for exactly one vuln found, 2 for more than one?) if that's desirable. |
I think it might eventually make sense to have different nonzero exit codes, although I'm not sure making a distinction between the quantity of vulnerabilities would be useful. For now, let's just support We should also think about this in the context of #82 as well. |
Can you recommend a way to bypass this for pipeline jobs? Exit code 1 is preventing us from uploading the CycloneDX report as a job artifact in GitLab. |
The easiest thing to do is probably to swallow the exit code entirely: pip-audit ... || exit 0 That should keep your CI from exiting prematurely. Longer term, we could think about making the current exit code behavior optional if it's something multiple users would like 🙂 |
Right now,
pip-audit
exits with an exit code of0
regardless of whether the audit has passed or failed:Ideally,
pip-audit
would exit with a nonzero exit code if vulnerabilities were found.The text was updated successfully, but these errors were encountered: