Action — osv-scan
Audits the dependencies of every lockfile of a directory against the OSV advisory database with OSV-Scanner, whatever the ecosystem: npm, pnpm, bun, PyPI, Go, Cargo and the others it reads. It is the osv-scan job of security.yml.
Usage
yaml
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: KevinDeBenedetti/github-workflows/.github/actions/osv-scan@mainInputs
| Input | Default | Description |
|---|---|---|
path | . | Directory to scan, recursively |
Steps
- Install the pinned
osv-scannerwithinstall-tool osv-scanner scan source --recursive <path>
Notes
- A known vulnerability fails the step, with OSV-Scanner's table in the log.
- A directory without any lockfile or manifest passes with a notice (OSV-Scanner's exit code 128).
- Any other failure (the OSV API does not answer, an invalid
osv-scanner.toml) fails the step with OSV-Scanner's exit code. - Nothing is installed: the lockfiles are read as they are, so no dependency's lifecycle script runs.
- Ignore an advisory with an
[[IgnoredVulns]]entry in anosv-scanner.tomlnext to the lockfile. - The script is
osv-scan.sh; its tests are intests/osv-scan.bats.