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

Simplify return codes #676

Closed
oliverchang opened this issue Nov 23, 2023 · 1 comment · Fixed by #677
Closed

Simplify return codes #676

oliverchang opened this issue Nov 23, 2023 · 1 comment · Fixed by #677
Labels
bug Something isn't working priority

Comments

@oliverchang
Copy link
Collaborator

The current (unreleased) return code setup is a little too complicated (context).

case errors.Is(err, osvscanner.VulnerabilitiesFoundErr):

I propose we simplify all of this to just:

  • Return 0 if there are no findings or errors.
  • Return 1 if there are any findings (license or vulns).
  • Return 128 if no packages are found.

As part of this we can delete the new public error types added here also.

For govulncheck / call analysis, we should also return 0 if any findings are uncalled (this matches govulncheck CLI behaviour). This may end up being a per-ecosystem default as we add support for more languages that are less robust when it comes to reachability analysis.

@oliverchang oliverchang added bug Something isn't working priority labels Nov 23, 2023
@oliverchang
Copy link
Collaborator Author

CC @another-rex @josieang

another-rex added a commit that referenced this issue Nov 27, 2023
…677)

Fixes #676 

> - Return 0 if there are no findings or errors.
> - Return 1 if there are any findings (license or vulns).
> - Return 128 if no packages are found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant