Skip to content
Home SCA Tools Anchore Grype
Anchore Grype

Anchore Grype

Category: SCA
License: Free (Open-Source, Apache 2.0)
Suphi Cankurt
Suphi Cankurt
AppSec Enthusiast
Updated February 8, 2026
6 min read
Key Takeaways
  • Grype scans container images and SBOMs in seconds using NVD, GitHub Advisories, and distribution-specific vulnerability feeds.
  • EPSS and KEV risk scoring produces a composite 0-10 score to prioritize vulnerabilities by actual exploitability.
  • Pairs with Syft for an SBOM-first workflow — Syft generates the SBOM, Grype scans it for vulnerabilities across 20+ ecosystems.
  • Open-source under Apache 2.0 with 11,500 GitHub stars, outputting SARIF, JSON, and CycloneDX formats for CI/CD integration.

Grype is a free, open-source vulnerability scanner for container images and filesystems. Built by Anchore and released under Apache 2.0, it has 11.5k GitHub stars and over 50 million combined downloads across the Anchore open-source suite (Syft, Grype, Grant).

It matches packages against NVD, GitHub Security Advisories, and distribution-specific feeds. You point it at a container image, a directory, or an SBOM file, and it returns a list of known vulnerabilities sorted by risk.

Grype is a single Go binary. No daemon, no server, no account required. Install it, run it, get results.

What is Anchore Grype?

Grype scans container images, filesystems, and SBOMs to find packages with known security vulnerabilities. It covers 20+ language ecosystems (Go, Python, JavaScript, Java, Rust, Ruby, PHP, .NET, and more) plus major Linux distributions (Alpine, Debian, Ubuntu, RHEL, Amazon Linux, Oracle Linux, SUSE, Arch, Gentoo).

As part of the Anchore open-source ecosystem, Grype pairs with Syft for SBOM generation. Generate an SBOM once with Syft, then rescan it with Grype as vulnerability databases update, without needing the original image.

Risk-Based Scoring
Combines CVSS severity, EPSS exploit probability, and KEV catalog status into a single 0-10 risk score. Sort results by what actually matters instead of raw severity alone.
20+ Ecosystems
Scans OS packages (APK, DEB, RPM) and language dependencies (npm, pip, Maven, Go, Cargo, Composer, NuGet, and more) against multiple vulnerability databases.
SBOM-First Workflow
Accepts CycloneDX, SPDX, and Syft JSON formats. Scan an SBOM file instead of re-analyzing the original image every time the database updates.

Key features

Risk scoring and prioritization

Grype goes beyond raw CVSS scores. Each finding includes an EPSS score (30-day exploitation probability with percentile ranking), KEV catalog status, and a composite risk score from 0.0 to 10.0. Default sorting puts the most actionable findings first. You can also sort by severity, epss, kev, package, or vulnerability depending on your workflow.

Anchore open-source ecosystem architecture showing SBOM generation, vulnerability scanning, and policy enforcement

EPSS vs. CVSS
CVSS measures how bad a vulnerability could be. EPSS measures how likely it is to be exploited in the next 30 days. A critical-severity CVE with a low EPSS score is less urgent than a high-severity CVE that’s actively exploited. Grype’s risk score combines both signals.

Supported ecosystems

EcosystemPackage types
JavaScriptnpm, yarn
Pythonpip, Poetry, Pipenv, wheel
JavaMaven (JAR, WAR, EAR), Gradle
GoGo modules
RustCargo
RubyBundler (Gemfile)
PHPComposer
.NETNuGet, dotnet
DartPub
HaskellCabal, Stack
ElixirMix
ErlangRebar
SwiftCocoaPods, Swift PM
RCRAN
Linux (APK)Alpine
Linux (DEB)Debian, Ubuntu
Linux (RPM)RHEL, CentOS, Fedora, Amazon Linux, Oracle Linux, SUSE, Arch

Output formats

FormatUse case
TableTerminal output during development (default)
JSONCI/CD integration, programmatic analysis
SARIFGitHub code scanning, VS Code SARIF Viewer
CycloneDX JSONSBOM-compatible output for Dependency-Track
CycloneDX XMLSBOM-compatible output for legacy systems
TemplateCustom output via Go templates

Multiple vulnerability sources

Grype aggregates data from NVD, GitHub Security Advisories, Alpine SecDB, Debian Security Tracker, Red Hat Security Data, Ubuntu/Canonical, Amazon Linux (ALAS), and Oracle Linux (ELSA). The database updates daily via a SQLite archive hosted at grype.anchore.io. Data processing runs through Vunnel, Anchore’s open-source vulnerability ETL tool.

Container and filesystem scanning

Scan from registries, local Docker/Podman daemons, exported archives (Docker and OCI), OCI directories, or Singularity images. For non-container use cases, grype dir:/path scans a local directory and grype file:/path scans an individual file. The --platform flag handles multi-architecture images.

OpenVEX support

Use VEX (Vulnerability Exploitability eXchange) documents to filter results. If your security team has already assessed a finding and determined it’s not exploitable in your environment, attach a VEX document and Grype will suppress it from future scans.

Installation

1
Install the binary – Use curl, Homebrew, or a package manager. The official install script is the fastest path: curl -sSfL https://get.anchore.io/grype | sudo sh -s -- -b /usr/local/bin
2
Verify installation – Run grype version to confirm. The database downloads automatically on first scan.
3
Scan something – Point it at an image: grype alpine:latest. Results appear in seconds, sorted by risk score.
4
Add to CI – Use anchore/scan-action@v7 in GitHub Actions or run the CLI directly in any pipeline.
# Homebrew (macOS/Linux)
brew install grype

# Curl script (Linux/macOS)
curl -sSfL https://get.anchore.io/grype | sudo sh -s -- -b /usr/local/bin

# Windows (winget)
winget install Anchore.Grype

# Docker
docker pull anchore/grype:latest

Usage

# Scan container image from registry
grype alpine:latest

# Scan local Docker image
grype docker:myapp:v1.0

# Scan image archive
grype docker-archive:./image.tar

# Scan filesystem directory
grype dir:/path/to/project

# Scan SBOM file
grype sbom:./sbom.json

# Pipe Syft output directly
syft alpine:latest -o cyclonedx-json | grype

# Fail on high or critical
grype alpine:latest --fail-on high

# Output SARIF for GitHub Security
grype alpine:latest -o sarif > results.sarif

# Sort by EPSS score
grype alpine:latest --sort-by epss

# Show only fixable vulnerabilities
grype alpine:latest --only-fixed

# Search the database directly
grype db search --vuln CVE-2024-1234
grype db search --pkg openssl

# Explain a specific finding
grype explain --id CVE-2024-1234

CI/CD integration

GitHub Actions

The official action is anchore/scan-action@v7. It wraps Grype and outputs SARIF for GitHub’s Security tab.

name: Container Vulnerability Scan
on: [push, pull_request]

jobs:
  grype-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build container image
        run: docker build -t myapp:${{ github.sha }} .

      - name: Scan image with Grype
        uses: anchore/scan-action@v7
        id: scan
        with:
          image: myapp:${{ github.sha }}
          fail-build: true
          severity-cutoff: high

      - name: Upload SARIF
        uses: github/codeql-action/upload-sarif@v4
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}

GitLab CI

grype-scan:
  image: anchore/grype:latest
  stage: security
  variables:
    GRYPE_DB_AUTO_UPDATE: "true"
  script:
    - grype docker:${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA}
      --fail-on high
      -o sarif > gl-container-scanning-report.sarif
  artifacts:
    reports:
      container_scanning: gl-container-scanning-report.sarif

Jenkins Pipeline

pipeline {
    agent any
    stages {
        stage('Build Image') {
            steps {
                sh 'docker build -t myapp:${BUILD_NUMBER} .'
            }
        }
        stage('Vulnerability Scan') {
            steps {
                sh '''
                    grype docker:myapp:${BUILD_NUMBER} \
                        --fail-on critical \
                        -o json > grype-results.json
                '''
            }
        }
    }
    post {
        always {
            archiveArtifacts artifacts: 'grype-results.json'
        }
    }
}

Configuration

Create a .grype.yaml configuration file:

# Fail on vulnerabilities of this severity or higher
fail-on-severity: high

# Ignore specific vulnerabilities
ignore:
  - vulnerability: CVE-2021-12345
    package:
      name: openssl
      version: 1.1.1k
  - vulnerability: GHSA-xxxx-yyyy-zzzz

# Database settings
db:
  cache-dir: ~/.cache/grype/db
  update-url: https://toolbox-data.anchore.io/grype/databases/listing.json
  max-allowed-built-age: 120h
  auto-update: true

# Default output format
output: table

# Default sort strategy
sort-by: risk

When to use Grype

Grype works best as a fast, focused vulnerability scanner in CI/CD pipelines. It does one job and does it well.

Strengths:

  • Single binary, no server or account needed
  • Risk scoring combines CVSS, EPSS, and KEV data for better prioritization
  • SBOM-first workflow with Syft avoids redundant image analysis
  • 20+ language ecosystems plus all major Linux distributions
  • Database updates daily from multiple upstream sources

Limitations:

  • CLI only, no web dashboard (use Anchore Enterprise for that)
  • No license compliance scanning (pair with FOSSA or Black Duck if you need it)
  • No auto-fix PRs (Grype detects, it doesn’t remediate)
Best for
Teams that want a fast, lightweight container vulnerability scanner in their CI/CD pipeline without managing infrastructure or paying for a commercial platform.

How it compares:

vs.Key difference
TrivyTrivy bundles SBOM generation, vuln scanning, IaC checks, and secrets detection. Grype focuses on vulnerability matching with better risk scoring.
Snyk ContainerCommercial platform with fix PRs, dashboards, and policy management. Grype is free and self-contained.
Docker ScoutBuilt into Docker Desktop with supply chain attestations. Grype is registry-agnostic and runs anywhere.

For more on how Grype fits into a broader security program, see What is SCA? and our SCA in CI/CD guide.

Frequently Asked Questions

What is Anchore Grype?
Grype is a free, open-source vulnerability scanner that checks container images, filesystems, and SBOMs against multiple vulnerability databases. It’s written in Go, released under Apache 2.0, and maintained by Anchore. It works as a standalone CLI binary with no daemon or server required.
How does Grype compare to Trivy?
Both are open-source CLI vulnerability scanners. Grype focuses specifically on vulnerability matching and pairs with Syft for SBOM generation. Trivy bundles SBOM generation, vulnerability scanning, IaC checks, and secret detection in a single binary. Grype’s EPSS and KEV-based risk scoring is more advanced, while Trivy has broader scanning scope.
What vulnerability databases does Grype use?
Grype pulls from NVD (NIST), GitHub Security Advisories (GHSA), Alpine SecDB, Debian Security Tracker, Red Hat Security Data, Ubuntu/Canonical, Amazon Linux (ALAS), and Oracle Linux (ELSA). The database updates daily and is distributed as compressed SQLite archives.
Can Grype scan SBOMs?
Yes. Grype accepts SBOMs in CycloneDX, SPDX, and Syft JSON formats. You can generate an SBOM once with Syft and rescan it with Grype as new vulnerabilities are disclosed, without needing access to the original image.
Does Grype support EPSS scoring?
Yes. Grype includes EPSS (Exploit Prediction Scoring System) scores showing the 30-day probability of exploitation, plus KEV (Known Exploited Vulnerabilities) catalog integration. A composite risk score from 0.0 to 10.0 combines CVSS, EPSS, and severity data.