Use when a repo needs dependency CVE scanning (SCA) in CI, a team is choosing between native audits (npm audit, pip-audit, cargo audit), OSV-Scanner and Snyk, or findings need triage. Scans lockfiles with thresholds, checks packages were seen, outputs SARIF and allows only expiring ignores.
92%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Per osv-usage:
docker pull ghcr.io/google/osv-scanner:latestOther install paths (consult google.github.io/osv-scanner for current options per platform):
# Go install
go install github.com/google/osv-scanner/cmd/osv-scanner@v1
# Homebrew
brew install osv-scanner
# Direct binary download from github.com/google/osv-scanner/releasesPer osv-usage:
osv-scanner scan -r ./my-project-dir/Auto-detects manifest files (package-lock.json, Pipfile.lock, go.mod, Cargo.lock, etc.) and queries OSV.dev for each.
Per-lockfile scan (-L targets one lockfile without recursing, useful in
monorepos):
osv-scanner scan -L package-lock.json --output-file scan-results.txtPer osv-usage: --format json and --format=vertical
and --format=html are referenced. Full format list per the
osv-scanner documentation:
| Format | Use |
|---|---|
--format json | For downstream aggregation |
--format sarif | GitHub Code Scanning upload |
--format markdown | PR comments |
--format vertical | Default human-readable |
--format html | Standalone report |
For projects with custom build systems that emit SBOMs but lack
natively-parsed lockfiles. A recursive scan picks up SBOMs whose names
follow the format's pattern (*.spdx.json, *.spdx, bom.json,
*.cdx.json, bom.xml, *.cdx.xml); pass one directly with -L
(source scanning docs):
osv-scanner scan source -L my-app.cdx.json
osv-scanner scan source -L my-app.spdx.jsonComponents need Package URLs (purls) to be matched.
This composes with syft-generation - Syft generates the SBOM,
OSV-Scanner queries OSV.dev against it.
osv-scanner.toml configSuppress a vuln with an expiring, reasoned entry (auditable in git):
# osv-scanner.toml
[[IgnoredVulns]]
id = "CVE-2024-1234"
ignoreUntil = 2026-12-15T00:00:00Z
reason = "Reachability confirms unreachable; tracked in JIRA-1234"The full schema ([[PackageOverrides]], multi-entry config, --config flag,
the mandatory justification template) is in
osv-scanner-config-and-ci.md.
Suppress via [[IgnoredVulns]] (per-CVE, with ignoreUntil) or
[[PackageOverrides]] (per pinned package + ecosystem) in osv-scanner.toml;
--severity-threshold is a scan-time filter, not a suppression. Every entry
carries a mandatory reason + approver + re-review date. ignoreUntil is
enforced - past-due ignores re-surface in the scan results. The
suppression-layer table and justification template are in
osv-scanner-config-and-ci.md.
OSV-Scanner exit codes, per the output docs:
The google/osv-scanner-action GHA (Docker invocation + SARIF upload) is in
osv-scanner-config-and-ci.md.
OSV-Scanner has experimental license-summary support:
osv-scanner --experimental-licenses-summary scan -r .For full license-compliance + scanning, pair with sbom-formats
or use a dedicated tool like ScanCode / FOSSology.
[[IgnoredVulns]] without ignoreUntil -> debt persists; always set ignoreUntil (Step 5).--format=sarif upload -> findings invisible in the GitHub Security tab; always emit SARIF (Step 7).-L.--config pointing outside the repo -> suppressions not auditable; commit osv-scanner.toml at the repo root.trivy-image or the Grype workflow in syft-generation.--sbom flag is deprecated in favour of -L (changelog, #1961); pin the scanner version in CI.osv-scanner.toml schema, triage template, and CI workflow:
osv-scanner-config-and-ci.mddependabot-config,
renovate-config,
native-audits.md -
sister toolssyft-generation -
cross-plugin SBOM source