Bug
Scanning a project with a bun.lock that contains git dependencies with short commit refs causes the scan to fail:
error when retrieving vulns: client error: status="400 Bad Request"
body={"code":3,"message":"Invalid hash."}
Reproduction
- Clone https://github.com/activepieces/activepieces
- Run:
osv-scanner scan ./ --format json -L bun.lock .
- Observe the error:
error when retrieving vulns: client error: status="400 Bad Request" body={"code":3,"message":"Invalid hash."}
The repo's bun.lock contains the following git dependency with a short hash:
Version
osv-scanner --version
osv-scanner version: 2.3.3
osv-scalibr version: 0.4.2
commit: n/a
built at: n/a
Bug
Scanning a project with a
bun.lockthat contains git dependencies with short commit refs causes the scan to fail:Reproduction
osv-scanner scan ./ --format json -L bun.lock .The repo's
bun.lockcontains the following git dependency with a short hash:Version