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

osv-scanner exit with 0 event with vulnerabilities #52

Closed
iurisilvio opened this issue Dec 14, 2022 · 2 comments · Fixed by #53
Closed

osv-scanner exit with 0 event with vulnerabilities #52

iurisilvio opened this issue Dec 14, 2022 · 2 comments · Fixed by #53
Labels
bug Something isn't working

Comments

@iurisilvio
Copy link
Contributor

iurisilvio commented Dec 14, 2022

$ ./osv-scanner package-lock.json; echo $?
Scanning dir package-lock.json
Scanned /[redacted]/package-lock.json file and found 2257 packages
╭─────────────────────────┬───────────┬──────────────────────┬─────────┬───────────────────────────────────────────────────╮
│ SOURCE                  │ ECOSYSTEM │ AFFECTED PACKAGE     │ VERSION │ OSV URL (ID IN BOLD)                              │
├─────────────────────────┼───────────┼──────────────────────┼─────────┼───────────────────────────────────────────────────┤
│ package-lock.json       │ npm       │ decode-uri-component │ 0.2.0   │ https://osv.dev/vulnerability/GHSA-w573-4hg7-7wgq │
╰─────────────────────────┴───────────┴──────────────────────┴─────────┴───────────────────────────────────────────────────╯
0
@thomasleplus
Copy link

thomasleplus commented Dec 14, 2022

I was just thinking the same thing but I think that what would be useful is to have a way to fail the scan on certain conditions, e.g. if there is a CVE with a CVSS score above a certain threshold. But even if the scanner failed for all CVEs to begin with, one could always ignore individual vulnerabilities. It's just less convenient than a rule-based approach.

@iurisilvio
Copy link
Contributor Author

Based on #7, the expected behavior was to exit with 1 on vulnerabilities, but it is not properly tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants