When osv-scanner is running from a pre-commit hook without args it does not fail.
Steps to reproduce:
- Create a
.pre-commit-config.yaml with the following content:
repos:
- repo: https://github.com/google/osv-scanner/
rev: "v2.2.3"
hooks:
- id: osv-scanner
- Run
pre-commit run --all-files --verbose osv-scanner
I understand the documentation clearly states it should be used with args, but i would argue that, when that's not the case, the hook should fail.
The same behavior is observed when osv-scanner is run from the command line. 0 (zero) is returned as an exit code instead of non zero value.
This behavior hides mistakes like incorrect indentation on the pre-commit hook configuration or the all too common misspelled variable name in a bash script.