Skip to content

OSV-Scanner vs Grype

Suphi Cankurt

Written by Suphi Cankurt

OSV-Scanner vs Grype
Key Takeaways
  • [OSV-Scanner](/osv-scanner) queries Google's OSV.dev, which aggregates GitHub Security Advisories, PyPA, RustSec, Go, Maven, npm, Debian, Alpine, and 20+ other upstream sources into one schema.
  • [Grype](/grype) uses Anchore's Vunnel ETL pipeline to build a local SQLite database from NVD, GitHub Advisories, and Linux distro feeds (Debian, Red Hat, Ubuntu, Amazon, Oracle).
  • Grype scans container images, OCI archives, and Singularity images natively; OSV-Scanner v2.0 (released March 2025) rewrote container image scanning with layer-aware support for Debian, Ubuntu, and Alpine.
  • Both output JSON and SARIF and offer official GitHub Actions, but only Grype ships license detection via its Grant companion tool.
  • OSV-Scanner is Apache 2.0 from Google; Grype is Apache 2.0 from Anchore. Neither has a paid tier, usage cap, or telemetry requirement.

Which Is Better: OSV-Scanner or Grype?

OSV-Scanner is Google’s frontend to the OSV.dev database โ€” an aggregator that pulls 20+ upstream advisory sources into a single unified schema. It shines on language manifests and lockfiles.

Grype is Anchore’s focused vulnerability matcher, built to pair with Syft for an SBOM-first workflow. It ships with deeper coverage for Linux distro packages and container images.

Pick OSV-Scanner for lockfile-first scanning in CI. Pick Grype for container images and OS packages.

What Are the Key Differences?

FeatureOSV-ScannerGrype
LicenseApache 2.0Apache 2.0
Maintained ByGoogleAnchore
Primary DatabaseOSV.dev (20+ aggregated sources)Grype DB (NVD + GHSA + distro feeds)
Data SchemaOSV schema (open standard)Proprietary SQLite, built via Vunnel
Container Image ScanningYes (v2.0+, layer-aware for Debian/Ubuntu/Alpine)Yes (native, Docker/OCI/Singularity)
Lockfile / Manifest ScanningYes (primary use case)Yes (via Syft cataloging)
OS Package CoverageAlpine, Debian, UbuntuAlpine, Debian, Ubuntu, RHEL, Amazon, Oracle, SUSE, Arch
License DetectionNoYes (via companion tool Grant)
SBOM InputSPDX, CycloneDXSPDX, CycloneDX, Syft JSON
Output FormatsTable, JSON, SARIF, Markdown, HTML, CycloneDXTable, JSON, SARIF, CycloneDX, template
Risk ScoringSeverity (CVSS)Composite score (CVSS + EPSS + KEV)
OpenVEX SupportYesYes
GitHub Actiongoogle/osv-scanner-actionanchore/scan-action@v7
Offline ModeYes (via –offline-vulnerabilities)Yes (via –offline cache)
LanguageGoGo

Database & Coverage

This is the biggest philosophical split between the two tools. OSV.dev is an aggregator, not a source.

Google built the OSV schema as a common format for vulnerability data, then wrote importers for GitHub Security Advisories, PyPA Advisory Database, RustSec, the Go vulnerability database, npm, Maven, Debian Security Tracker, Alpine SecDB, and more. Each advisory lands in OSV.dev with a precise affected-version range per ecosystem.

OSV-Scanner CLI scanning package-lock.json and requirements.txt, reporting 5 vulnerabilities across npm and PyPI ecosystems with GHSA and PYSEC advisory IDs

Grype takes a different path. Anchore’s Vunnel ETL tool pulls from NVD, GitHub Security Advisories, Alpine, Debian, Red Hat, Ubuntu, Amazon Linux (ALAS), Oracle Linux (ELSA), and SUSE, then normalizes everything into a local database the CLI ships with.

For language ecosystems, OSV’s per-ecosystem version ranges are usually tighter than NVD’s CPE matches, so OSV-Scanner reports fewer spurious findings on npm or PyPI manifests.

The practical difference shows up in false positives. For Linux distro packages, Grype’s vendor-specific feeds (Debian DSA, Red Hat OVAL) are more accurate than NVD alone. Teams that scan RHEL or Ubuntu containers often see cleaner results from Grype.

Grype scanning node:20-bookworm-slim container image, listing 2 Critical CVEs including CVE-2024-41996 and CVE-2023-45853, with composite CVSS plus EPSS plus KEV risk scoring

Both databases update daily. Neither requires a key or a paid subscription.

Ecosystem & Container Support

OSV-Scanner was built for source-code scanning first. Point it at a directory and it walks lockfiles: package-lock.json, yarn.lock, Pipfile.lock, poetry.lock, go.sum, Cargo.lock, Gemfile.lock, composer.lock, pom.xml, and more.

OSV-Scanner v2.0 (March 2025) rewrote container image scanning from scratch with layer-aware support. It now reports which layer introduced a package, the base image, and OS distribution โ€” covering Alpine, Debian, and Ubuntu-based images. Support for additional distros is narrower than Grype’s.

Grype is container-native. It reads Docker daemons, registries, Docker archives, OCI directories, OCI archives, and Singularity images directly, with Syft doing the cataloging step in process.

Grype’s language ecosystem coverage is comparable to OSV-Scanner’s on the most common stacks (Go, Java, JavaScript, Python, Ruby, PHP, Rust, .NET).

OSV.dev tends to have earlier coverage of newer ecosystems like Dart pub, Haskell Hackage, and Swift Package Manager because those maintainers publish directly to OSV.

If containers are your primary target, start with Grype. If you are scanning source repositories and lockfiles in pull requests, start with OSV-Scanner.

Output & CI Integration

Both tools are CI-friendly. OSV-Scanner outputs table, JSON, SARIF, Markdown, HTML, and CycloneDX.

The official action is google/osv-scanner-action, which includes a reusable workflow that posts findings as pull request comments. SARIF integrates with GitHub code scanning and GitLab.

Grype outputs table, JSON, SARIF, CycloneDX, and custom Go templates. The official action is anchore/scan-action@v7, also integrating with GitHub code scanning via SARIF.

Grype includes a composite risk score combining CVSS severity, EPSS exploit probability, and KEV catalog status. When a vulnerability appears in CISA’s KEV catalog, Grype treats it as maximum-threat regardless of EPSS โ€” observed exploitation outweighs predicted exploitation. OSV-Scanner does not have an equivalent scoring model.

OSV-Scanner has one quiet advantage for auditability: its output references OSV IDs, which link back to the original upstream advisory (GHSA, GO, PYSEC, RUSTSEC). Grype output references CVE and vendor IDs. Neither is wrong, but OSV’s provenance trail is more transparent.

Both tools support OpenVEX for suppressing findings the security team has already assessed. Both support offline mode, which matters in air-gapped environments.

Performance Reality

For a typical monorepo with a few dozen lockfiles, OSV-Scanner finishes in under five seconds locally. Its default mode queries the OSV.dev API, which adds some network time. The --offline-vulnerabilities flag downloads the full database and runs fully local, which is faster in CI and required in air-gapped setups.

Grype always runs against its local database. The current v6 schema database downloads at around 65 MB โ€” a significant reduction from earlier versions thanks to a 2025 schema overhaul. A fresh install pulls the database on first run; subsequent scans use the cached copy.

On container images, Grype is typically faster because the cataloging and matching happen in one process. OSV-Scanner’s container path adds a separate matching step after package extraction.

For a 500 MB Debian-based container, both tools finish in under 30 seconds on a modern laptop. Neither is slow enough to notice in CI.

Memory use is similar. Both tools stay under 500 MB of RSS on typical workloads.

Which to Pick

Choose OSV-Scanner if:

  • Your scan target is a source repo with lockfiles (npm, PyPI, Go, Cargo, Maven, RubyGems, Composer)
  • You want tight version-range matching with fewer false positives on language ecosystems
  • Google-backed provenance and the OSV schema’s traceability matter
  • You need markdown or HTML output for human-facing reports
  • You scan newer ecosystems like Dart pub, Swift Package Manager, or Haskell Hackage

Choose Grype if:

  • Your scan target is a container image or Linux filesystem
  • You want the composite risk score (CVSS + EPSS + KEV) for triage by exploit probability
  • License detection via the Grant companion tool is part of your workflow
  • You already use Syft for SBOM generation
  • You need deep OS package coverage across Alpine, Debian, Ubuntu, RHEL, Amazon, Oracle, and SUSE

Many teams run both. OSV-Scanner in the pull request pipeline for lockfile scanning, Grype on the built container image before push.

The two databases are different enough that the overlap catches issues either tool alone would miss. Neither replaces a full ASPM or dependency-track deployment, but for free CLI scanning, OSV-Scanner and Grype cover most practical SCA needs.

Both tools are also commonly compared against Trivy, the Aqua Security scanner that bundles SCA, IaC, and secrets detection into one binary. For more options, browse AppSec Santa’s SCA tools category.

Frequently Asked Questions

Is OSV-Scanner better than Grype?
It depends on what you scan. OSV-Scanner is stronger for language-manifest and lockfile scanning because OSV.dev aggregates 20+ curated advisory sources โ€” GitHub Advisories, PyPA, RustSec, Go, npm, Maven, and more โ€” into one schema with precise per-ecosystem version ranges. Grype is stronger for container images and Linux distro packages because its feed includes Alpine SecDB, Debian Security Tracker, Red Hat, Ubuntu, Amazon Linux, and Oracle Linux vendor data. For a pure lockfile scan in CI, OSV-Scanner usually wins on false-positive rate. For a container image scan, Grype usually wins on OS package coverage depth.
Are OSV-Scanner and Grype both free?
Yes. OSV-Scanner is Apache 2.0, maintained by Google’s Open Source Security Team. Grype is Apache 2.0, maintained by Anchore. Neither tool has a paid tier, usage limit, telemetry requirement, or license key. Both companies sell separate commercial platforms (Assured OSS for Google, Anchore Enterprise for Anchore), but the open-source scanners are fully featured and self-contained.
Does OSV-Scanner scan container images?
Yes, since v2.0 (released March 2025). The v2.0 release rewrote container scanning with layer-aware support โ€” it reports which layer introduced a package, the base image, and the OS distribution. Current support covers Alpine, Debian, and Ubuntu-based images. Grype’s container scanning is more mature and covers a wider range of distros including RHEL, Amazon Linux, Oracle, and SUSE.
Which tool has fewer false positives?
For language ecosystems (npm, PyPI, Go modules, Cargo, Maven), OSV-Scanner typically produces fewer false positives because OSV.dev’s data is curated per-ecosystem with precise affected-version ranges. Grype relies on NVD CPE matching for some ecosystems, which is known to over-match. For OS packages, Grype’s vendor-specific feeds (Alpine SecDB, Debian DSA) are more accurate than NVD alone.
Can I run both OSV-Scanner and Grype together?
Yes, and some teams do. A common pattern is OSV-Scanner on the source repo (lockfile scan in pull requests) and Grype on the built container image (pre-push scan). The two tools use different databases, so their overlap catches things either tool alone would miss. Both are fast enough to run in the same pipeline without meaningful CI time cost.
Suphi Cankurt

Years in application security. Reviews and compares 209 AppSec tools across 11 categories to help teams pick the right solution. More about me →