Skip to content
FossShelf
Home / Categories / For Security Teams

Osv Scanner

Open source dependency vulnerability scanner backed by OSV.dev

Replaces Snyk, Mend Io, Socket, Sonatype Lifecycle, Endor Labs

11.54K starsApache-2.0reviewed 14 Nov 2026last commit 16 Nov 2026
Screenshot of Osv Scanner

Who it's for

CI/CD engineers adding dependency scanning to pipelines

OSV-Scanner runs as a single binary with no server setup. Add `osv-scanner scan source -r .` to any CI step to block merges on known vulnerabilities. It outputs results that integrate with GitHub Actions annotations, and runs offline against a local database in restricted environments.

Your team needs policy enforcement across multiple repositories from a central dashboard, or requires automated pull request creation for dependency upgrades. OSV-Scanner reports findings but does not open PRs or enforce policies outside the terminal.

Open source maintainers auditing their own libraries

Maintainers can scan their project's dependency graph against the OSV.dev database to catch known CVEs before they affect downstream users. The Apache-2.0 license integrates freely into any maintenance workflow, and offline mode works in environments with outbound API restrictions.

If your library has no external dependencies, there is nothing for OSV-Scanner to scan. It scans declared dependencies against known CVE databases, not your own source code.

Security engineers replacing a paid SCA tool

OSV-Scanner covers the core SCA use case (dependency vulnerability detection across ecosystems) for teams wanting to remove a per-seat paid tool from their pipeline. It scans containers and OS packages alongside language dependencies, and queries the same underlying advisory sources that most commercial tools repackage.

If your team needs AI-assisted remediation, SBOM generation, or integration with issue trackers out of the box, OSV-Scanner requires more engineering to match that workflow. The guided remediation feature is experimental and limited to npm and Maven.

Platform teams scanning container images for CVEs

The container scanning feature detects vulnerabilities in OS packages and language artifacts across Alpine, Debian, and Ubuntu base images. Run `osv-scanner scan image my-image-name:tag` to get a layer-aware report covering both the base OS and application dependencies in one pass.

OSV-Scanner's container scanning does not cover all Linux distributions; teams running custom base images outside Alpine, Debian, or Ubuntu should verify their distro is supported before relying on it for production image audits.

The problem

Software supply chain vulnerabilities accumulate faster than most teams can review them. Paid SCA tools like Snyk charge per developer seat, require code or dependency data to be sent to external servers, and often source their advisories from closed databases that lag behind public disclosures by hours or days. Alert volumes climb regardless of whether a vulnerable function is ever called, leaving teams manually triaging dozens of low-priority findings per sprint. The underlying problem is data quality. When advisory databases are proprietary, teams cannot verify whether a finding is accurate, what its authoritative source is, or how the affected version range was determined. OSV-Scanner addresses this by querying OSV.dev, an open database where every advisory traces back to a named, authoritative source, and by offering optional call analysis to determine whether a vulnerable function is reachable in your specific project, cutting false positives.

How it works

Multi-ecosystem dependency scanning

Recursively scans source directories for supported package files (package.json, go.mod, pom.xml, Cargo.lock, Gemfile.lock, and 19+ others) across 11 language ecosystems including Go, Java, JavaScript, Python, Rust, and Ruby. One command covers the whole repository.

Container image vulnerability scanning

Layer-aware scanning for container images, detecting vulnerabilities in OS packages (Alpine, Debian, Ubuntu) and language artifacts (Go, Java, Node, Python). Run with `osv-scanner scan image my-image-name:tag`.

License scanning via deps.dev

Checks dependency licenses using deps.dev data. Run a summary report or validate against an allowed SPDX license list (such as MIT,Apache-2.0) to catch license compliance issues before they reach production.

Offline scanning mode

Scan against a locally downloaded OSV database without any network connection after the initial sync. Useful for air-gapped environments or regulated infrastructure where outbound API calls are restricted.

Call analysis to cut false positives

Optional call-graph analysis determines whether a vulnerable function is actually reachable in your project, reducing the alert count to findings that matter. Fewer alerts means faster triage.

Guided remediation for npm and Maven

Experimental fix command suggests package version upgrades based on dependency depth, minimum severity, and return on investment. Supports in-place lockfile edits for npm and dependency overrides for Maven pom.xml.

Features

  • Multi-ecosystem dependency scanning
  • Container image vulnerability scanning
  • License scanning via deps.dev
  • Offline scanning mode
  • Call analysis to cut false positives
  • Guided remediation for npm and Maven

How to install

Download the prebuilt binary for your platform from GitHub Releases: https://github.com/google/osv-scanner/releases/latest

Recommended for this setup

Strengths

  • Apache-2.0 license with no usage restrictions: OSV-Scanner is Apache-2.0 licensed, with no per-seat pricing, no data upload requirements, and no commercial use restrictions. Run it on internal infrastructure, in CI, or as part of a hosted service without a licensing agreement.
  • Open, authoritative advisory sources: Every advisory in OSV.dev traces to a named public source, such as GitHub Security Advisories, RustSec, and Ubuntu security notices. Unlike closed advisory databases, teams can inspect the source and suggest corrections, which keeps the database more accurate and current.
  • Google-maintained with active development: Maintained by Google's open source security team, the project reached 11,511 GitHub stars and ships binaries for every major platform. The repo received updates as recently as November 2026, with SLSA Level 3 build provenance for all releases.
  • CLI-native with CI/CD integration: OSV-Scanner runs as a single binary in any pipeline with no agent, sidecar, or dashboard account required. It outputs structured results for GitHub Actions, GitLab CI, and other systems.

Trade-offs

  • Guided remediation is experimental and limited in scope: The fix command is marked experimental and currently supports only npm (package-lock.json and package.json) and Maven (pom.xml). It explicitly warns that it can be risky on untrusted projects because it may trigger package manager scripts. Teams using other ecosystems or who need production-grade auto-fix workflows should treat it as a preview feature.
  • No dashboard or reporting UI: OSV-Scanner is a CLI tool with no built-in dashboard, trend tracking, or policy management UI. Teams that need centralized vulnerability reporting across many repositories, role-based access, or executive-facing dashboards will need to build that layer themselves or use a paid SCA platform.
  • Container scanning covers a limited set of distros: OS-level container scanning supports Alpine, Debian, and Ubuntu base images. Teams running custom or less common Linux distributions in containers should verify their distro is supported before relying on OSV-Scanner for OS-level vulnerability detection in production images.

Tech stack

Languages
Go, Python, Go Template, JavaScript, CSS, Java, Shell, PHP, R, Ruby, Dockerfile, Makefile
Frameworks
Django, Flask
Databases
—
Tooling
—

FAQ

Is OSV-Scanner free to use?

Yes. OSV-Scanner is Apache-2.0 licensed and completely free, with no paid tier, no per-seat fee, and no cloud subscription. You download the binary, run it on your own infrastructure, and query the OSV.dev API directly. The OSV.dev database itself is also open source. For teams that want to avoid any network calls, offline mode downloads the database locally.

How is OSV-Scanner different from Snyk or Mend.io?

Snyk and Mend.io are commercial SCA platforms with per-seat pricing, proprietary advisory databases, and cloud-based scanning infrastructure. OSV-Scanner is a CLI tool that queries the open OSV.dev database directly, requires no account, and sends only package names and versions to the API (no source code). It covers fewer workflow automation features (no auto-PR creation, no dashboard), but it is free, transparent about its advisory sources, and can run entirely offline.

Can OSV-Scanner scan Docker or container images?

Yes. OSV-Scanner supports layer-aware container image scanning for Alpine, Debian, and Ubuntu base images, and detects vulnerabilities in Go, Java, Node, and Python language artifacts within the image. Run it with `osv-scanner scan image my-image-name:tag`. Support is limited to those specific distributions and language ecosystems for OS-level packages.

Does OSV-Scanner fix vulnerabilities or just report them?

OSV-Scanner reports vulnerabilities and, in experimental guided remediation mode, can suggest or apply package version upgrades for npm and Maven projects. The fix command is marked experimental and comes with a warning that it may trigger package manager scripts on untrusted projects. For other ecosystems or production-grade auto-fix workflows, the guided remediation feature is not yet stable.

How do I install OSV-Scanner?

The recommended method is to download a prebuilt binary for your platform from the GitHub Releases page: https://github.com/google/osv-scanner/releases/latest. Binaries are available for Linux, macOS, and Windows. If you have Go installed, you can also build from source with `go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest`. Full installation instructions are at https://google.github.io/osv-scanner/installation.

Similar tools

More in Security Teams