Open Source SCA Tools: Trivy vs Grype vs OSV-Scanner
TL;DR: The open source SCA (software composition analysis) tools to compare in September 2026 are Trivy, Grype, OSV-Scanner and Dependency-Check. All four make outbound calls by default. Trivy, Grype and Dependency-Check match most packages locally, while OSV-Scanner sends package names and versions to the OSV.dev API. Choose Trivy to also scan infrastructure-as-code and secrets, Grype to start from a software bill of materials (SBOM), and OSV-Scanner for pull-request checks. Haxset Research read each project's documentation as published on 16 September 2026.
Key points
- Grype fails a scan when its database was built more than 5 days ago and it can't download a newer one.
- Anchore's
scan-actionv7.4.2 for Grype fails the build at medium severity or higher by default, unlike Grype's command line. - In Dependency-Check v13.0.0, the Node Audit analyzer is on by default and sends
package-lock.jsonfiles to the npm audit API.
Which open source SCA and dependency scanning tools are still maintained?
Trivy, Grype, OSV-Scanner and OWASP Dependency-Check are all maintained: each shipped a release in August or September 2026. All four are free to use under the Apache 2.0 license. In this post, SCA and dependency scanning mean the same thing.
| As of 16 Sep 2026 | Trivy | Grype | OSV-Scanner | Dependency-Check |
|---|---|---|---|---|
| Maintainer | Aqua Security | Anchore | OWASP | |
| Latest release | v0.74.0, 14 Aug 20261 | v0.118.0, 27 Aug 20262 | v2.6.0, 14 Sep 20263 | v13.0.0, 3 Aug 20264 |
| Change to know | GitHub Action tags moved to malware in March 2026 | No database updates for versions before v0.88.0 since 6 Mar 2026 | v2.0.0 (March 2025) renamed flags, such as --experimental-offline | 12.1.0 or later is mandatory |
On 19 March 2026, an attacker with compromised credentials moved 76 of the 77 aquasecurity/trivy-action version tags to malware for about 12 hours.1 Our comparison of infrastructure-as-code (IaC) scanners covers the incident too. Dependency-Check's README calls an upgrade to 12.1.0 or later mandatory, because of API changes at the National Vulnerability Database (NVD).4
Which vulnerability database does each tool use, and what leaves your machine?
Trivy, Grype and Dependency-Check match most packages against a local copy of vulnerability data, while OSV-Scanner queries the OSV.dev API by default. All four can make other outbound calls. Their documentation and source code describe sending package metadata or the tool's own version and usage data.
| Tool | Vulnerability data | Sent by default | Offline options (examples) |
|---|---|---|---|
| Trivy1 | Own database: distribution feeds, GitHub advisories and more | Version check, usage data, Maven repository requests for pom.xml | Databases in your own registry, --skip-db-update, --offline-scan |
| Grype2 | Anchore's database: distribution feeds, GitHub advisories, NVD | Database update check, version check | grype db import, update and version checks off, higher age limit |
| OSV-Scanner3 | The OSV.dev API | Package names, versions and file hashes, plus deps.dev lookups for some inputs | --offline after one database download |
| Dependency-Check4 | A local copy of NVD data | package-lock.json files to npm audit, JAR hashes to Maven Central (CLI), usage data (tool name and version) | NVD mirror, --noupdate, --disableNodeAudit, --disableCentral, SCARF_NO_ANALYTICS=true |
Trivy's usage data holds a hashed installation ID, its version, the operating system and scan options, never file paths or image names.1 Both the version check and the usage data go to check.trivy.dev, so stopping every request there takes both --skip-version-check and --disable-telemetry.
Grype's FAQ says it "doesn't send any data to external services". By default, Grype checks toolbox-data.anchore.io for a newer release on every run, and grype.anchore.io for a newer database at most every two hours once a database is cached. A fresh CI runner downloads one on every run.2 On an offline runner, raise db.max-allowed-built-age (default 5 days), or set db.validate-age: false, which lets scans run on an old database.2
Grype's documentation has no offline guide. The table's Grype offline row is our reading.
OSV-Scanner's README lists "package names, versions, ecosystems, and file hashes" as the data it sends to OSV.dev.3 Its deps.dev lookups send names and versions but no source code. To run offline, download the databases once with --offline-vulnerabilities --download-offline-databases, then scan with --offline.
Dependency-Check's README warns that updates "will be extremely slow" without an NVD API key.4 Its documentation says that turning off the Central analyzer "could lead to false negatives" and suggests a Nexus or Artifactory server instead.
How does each tool fail a build?
Run from the command line, only OSV-Scanner fails a build on vulnerabilities by default. Trivy, Grype and Dependency-Check exit with 0 until you set a threshold.
Vulnerability Exploitability eXchange (VEX) documents let a tool filter vulnerabilities by their status. OpenVEX and CSAF (Common Security Advisory Framework) are two VEX formats.
| Tool | Default exit | Threshold flag and exit code | Ignore list | VEX |
|---|---|---|---|---|
| Trivy1 | 0 | --exit-code 1, with --severity | .trivyignore, with expiry dates | Labeled experimental |
| Grype2 | 0 | --fail-on <severity>, exits 2 | Rules in .grype.yaml | OpenVEX and CSAF |
| OSV-Scanner3 | 1 | None | osv-scanner.toml, with expiry dates | Not documented |
| Dependency-Check4 | 0 | --failOnCVSS <score>, exits 15 | Suppression XML, with expiry dates | Not documented |
Common Vulnerability Scoring System (CVSS) scores run from 0 to 10, so Dependency-Check's default threshold of 11 never fails a build. Its documentation lists no exit code, and the command-line source returns 15, so recheck it after upgrades.4
OSV-Scanner's source code shows two more details. It has no severity threshold flag. It exits with 0 when call analysis finds that your code calls none of the vulnerable functions, unless you pass --all-vulns.3 The documentation adds exit code 128 for a scan that finds no packages.
How do you add an SCA tool to CI?
Add a pipeline step that runs the tool and writes SARIF (Static Analysis Results Interchange Format), which GitHub code scanning imports.
hljs sh# Trivy v0.74.0: exits 1 on HIGH or CRITICAL vulnerabilities
trivy fs --scanners vuln --severity HIGH,CRITICAL --exit-code 1 --format sarif -o trivy.sarif .
# Grype v0.118.0: exits 2 on high or critical
grype . --fail-on high -o sarif --file grype.sarif
# OSV-Scanner v2.6.0: exits 1 on a vulnerability (0 if call analysis clears all of them)
osv-scanner scan source -r --format sarif --output-file osv.sarif .
# Dependency-Check v13.0.0: exits 15 at CVSS 7.0 or higher
dependency-check.sh --project myapp --scan . --format SARIF --failOnCVSS 7 --nvdApiKey "$NVD_API_KEY"
According to their READMEs, aquasecurity/trivy-action v0.36.0 keeps exit-code: 0, and anchore/scan-action v7.4.2 fails the build at medium or higher. Trivy's Action v0.36.0 is from April 2026, after the March 2026 incident. OSV-Scanner's v2.6.0 reusable workflows default to fail-on-vuln: true.3 Pin each Action and container image by commit SHA or digest, because a version tag can be moved.
Trivy vs Grype: which should you choose?
Choose Trivy if you want one tool for dependencies, IaC files, secrets and licenses, or if you scan Maven source trees. Choose Grype if your pipeline starts from an SBOM, or if you want results ranked by risk. Both scan container images and filesystems against a database they download.
For a source tree with a pom.xml, Trivy builds a dependency graph and looks up dependencies it can't find locally in remote Maven repositories.1 Grype's pom.xml support reports direct dependencies only, not transitive ones.2
Grype reads SBOMs in Syft JSON, SPDX and CycloneDX formats. Trivy's documentation warns that passing SBOMs from other tools "may result in inaccurate detection" because Trivy relies on its own custom properties.1 Grype sorts results by a risk score. It combines CVSS impact with threat, based on the Exploit Prediction Scoring System (EPSS) or CISA's Known Exploited Vulnerabilities (KEV) catalog.2
OSV-Scanner vs Trivy and Grype: which fits a pull-request check?
OSV-Scanner suits a lockfile check on pull requests, and Trivy or Grype suits container images. Google's pull-request workflow compares scans of the target branch and the pull request branch, and fails only on new vulnerabilities.3
Call analysis (reachability analysis) for Go is on by default and checks whether your code calls the vulnerable function. Rust call analysis is experimental and runs dependency build scripts, which "may execute arbitrary code".3 We would not turn it on for pull requests from forks, which can add dependencies.
For container images, OSV-Scanner lists operating system packages only for Alpine, Debian and Ubuntu. Trivy and Grype also list Red Hat Enterprise Linux.12
What are the alternatives to OWASP Dependency-Check?
Trivy, Grype and OSV-Scanner are maintained open source alternatives to OWASP Dependency-Check, and all three read package-lock.json, poetry.lock and pom.xml files.123
Dependency-Check matches dependencies to Common Platform Enumeration (CPE) identifiers, and its documentation says false positives "may occur" from that step.4 Grype matches language packages against GitHub Security Advisories and falls back to CPE only for other packages.2 If your builds already use Dependency-Check's Maven, Gradle, Ant or Jenkins integration, keep it.
Method and limits
We read each tool's documentation and, where it is silent, its source code, as published on or before 16 September 2026. We did not run the tools, so this post reports no detection results, speeds or false-positive rates. Haxset offers a product in this category.
How Haxset can help
Haxset's AI PR Scanner runs AI SAST (static application security testing), secret detection, dependency scanning and IaC checks on every GitHub or GitLab pull request. Dependency scanning checks each exact version in the supported lockfiles a pull request changes against public vulnerability databases. Each vulnerable dependency appears on the pull request with an ID such as D1. The entry names the package, its version, the advisory IDs and, when one exists, the version to upgrade to.
Haxset does not keep the prompts its AI models process and does not train models on them. It stores only scan metadata and scan results. To try it on your own repositories, contact us.
Related research
- IaC Scanning Tools: Checkov vs Trivy vs KICS vs Terrascan
- AI Pull Request Security Scanning and Continuous Monitoring
- What Is AI SAST? What the LLM Actually Does
References
-
Aqua Security, Trivy repository and documentation at release v0.74.0, documentation pages "Others", "Trivy Databases", "Connectivity and Network considerations", "Usage Telemetry", "Filtering", "Vulnerability Scanning", "Vulnerability Exploitability Exchange (VEX)", "SBOM scanning", "Programming Language", "Java" and "OS", GitHub, 14 August 2026, and GHSA-69fq-xp46-6x23: Trivy ecosystem supply chain temporarily compromised, security advisory, 21 March 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9
-
Anchore, Grype repository at release v0.118.0, source files
cmd/grype/cli/commands/root.go,cmd/grype/cli/commands/update.goandgrype/db/v6/installation/curator.go, GitHub, 27 August 2026, and Grype documentation in anchore/oss-docs at commit cf25048, 11 September 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 -
Google, OSV-Scanner repository and documentation at release v2.6.0, README section "Data Sources and Privacy", documentation pages "Offline Mode", "Migration Guide", "Output", "Configuration", "Project Source Scanning", "Supported Artifacts and Manifests" and "GitHub Action", and the source files
pkg/osvscanner/osvscanner.goandcmd/osv-scanner/internal/helper/flags.go, GitHub, 14 September 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 -
OWASP, Dependency-Check repository and documentation at release v13.0.0, README, documentation pages "Remote Data Sources", "File Type Analyzers", "Central Analyzer", "Node Audit Analyzer", "Telemetry", "Suppressing False Positives" and "Command Line Arguments", and the source files
App.java,CliParser.java,TelemetryCollector.javaanddependencycheck.properties, GitHub, 3 August 2026. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
Interested in how this research applies to your organization?
Get in touch
