grype

Grype is an open-source vulnerability scanner developed by Anchore that detects known vulnerabilities (CVEs) in container images, filesystems, and software bill of materials (SBOMs). Intended for integrating vulnerability scanning into CI/CD pipelines, prioritizing scan results, and generating SBOMs in conjunction with Syft.

Last repository push
GitHub Stars
219
Forks
38
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "grype" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ea79e40b631a678f3620311f62045366fd9332b64501f56702cf1f8a95b76d62. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Grype is an open-source vulnerability scanner developed by Anchore that detects known vulnerabilities (CVEs) in container images, filesystems, and software bill of materials (SBOMs). Intended for integrating vulnerability scanning into CI/CD pipelines, prioritizing scan results, and generating SBOMs in conjunction with Syft.

0 Downloads

Introduction source: third_party · TerminalSkills · 1.0.0 Reference

SkillPi interpretation

Tasks
Expert guidance for Grype, the open-source vulnerability scanner by Anchore that finds known vulnerabilities (CVEs) in container images, filesystems, and SBOMs. Helps developers integrate Grype into CI/CD pipelines, triage findings, and combine it with Syft for SBOM generation.
Inputs and outputs
grype myapp -o json # JSON for CI processing grype myapp -o table # Human-readable (default) grype myapp -o sarif # SARIF for GitHub Security tab grype myapp -o cyclonedx # CycloneDX format ```
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: grype
description: Expert guidance for Grype, the open-source vulnerability scanner by Anchore that finds known vulnerabilities (CVEs) in container images, filesystems, and SBOMs. Helps developers integrate Grype into CI/CD pipelines, triage findings, and combine it with Syft for SBOM generation.
license: Apache-2.0
compatibility: No special requirements
metadata:
  author: terminal-skills
  version: 1.0.0
  category: devops
  tags:
  - vulnerability-scanning
  - container-security
  - sbom
  - cve
  - supply-chain

Grype — Container Vulnerability Scanner

Overview

Grype, the open-source vulnerability scanner by Anchore that finds known vulnerabilities (CVEs) in container images, filesystems, and SBOMs. Helps developers integrate Grype into CI/CD pipelines, triage findings, and combine it with Syft for SBOM generation.

Instructions

Scanning

# Install
brew install grype

# Scan a container image
grype alpine:3.19
grype nginx:latest
grype ghcr.io/myorg/myapp:v1.2.3

# Scan a local directory
grype dir:./my-project

# Scan a Dockerfile / built image
docker build -t myapp .
grype myapp

# Scan an SBOM (generated by Syft)
syft myapp -o spdx-json > sbom.json
grype sbom:sbom.json

# Fail on severity threshold
grype myapp --fail-on critical          # Exit 1 if critical CVEs found
grype myapp --fail-on high              # Exit 1 if high or critical

# Output formats
grype myapp -o json                     # JSON for CI processing
grype myapp -o table                    # Human-readable (default)
grype myapp -o sarif                    # SARIF for GitHub Security tab
grype myapp -o cyclonedx               # CycloneDX format

CI/CD Integration

# .github/workflows/security.yml — Scan images before deployment
jobs:
  vulnerability-scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - name: Generate SBOM
        uses: anchore/sbom-action@v0
        with:
          image: myapp:${{ github.sha }}
          output-file: sbom.spdx.json

      - name: Scan for vulnerabilities
        uses: anchore/scan-action@v4
        id: scan
        with:
          image: myapp:${{ github.sha }}
          fail-build: true
          severity-cutoff: high
          output-format: sarif

      - name: Upload SARIF
        if: always()
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}

Ignore Known False Positives

# .grype.yaml — Configuration and ignore rules
ignore:
  # Ignore specific CVEs (with justification)
  - vulnerability: CVE-2023-12345
    reason: "Not exploitable in our configuration — we don't use affected feature"

  - vulnerability: CVE-2023-67890
    package:
      name: openssl
      version: 3.1.0
    reason: "Patched in our custom build"

  # Ignore all vulnerabilities in test dependencies
  - package:
      location: "**/test/**"

# Only scan for these severity levels
fail-on-severity: high

# DB update settings
db:
  auto-update: true
  validate-age: true
  max-allowed-built-age: 120h          # Re-download if DB is older than 5 days

Combining with Syft

# Syft generates SBOMs, Grype scans them — powerful combination

# Generate SBOM
syft myapp:latest -o spdx-json > sbom.json

# Scan the SBOM for vulnerabilities
grype sbom:sbom.json -o json > vulnerabilities.json

# Quick pipeline: build → SBOM → scan → sign
docker build -t myapp:v1.2.3 .
syft myapp:v1.2.3 -o spdx-json > sbom.json
grype sbom:sbom.json --fail-on critical
cosign attest --predicate sbom.json --type spdxjson myapp:v1.2.3

Installation

# macOS
brew install grype

# Linux
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin

# Docker
docker run anchore/grype:latest myapp:latest

Examples

Example 1: Setting up Grype for a microservices project

User request:

I have a Node.js API and a React frontend running in Docker. Set up Grype for monitoring/deployment.

The agent creates the necessary configuration files based on patterns like # Install, sets up the integration with the existing Docker setup, configures appropriate defaults for a Node.js + React stack, and provides verification commands to confirm everything is working.

Example 2: Troubleshooting ci/cd integration issues

User request:

Grype is showing errors in our ci/cd integration. Here are the logs: [error output]

The agent analyzes the error output, identifies the root cause by cross-referencing with common Grype issues, applies the fix (updating configuration, adjusting resource limits, or correcting syntax), and verifies the resolution with appropriate health checks.

Guidelines

  1. Scan in CI/CD — Run Grype on every build; catch vulnerabilities before they reach production
  2. Fail on high/critical — Use --fail-on high in CI; don't deploy images with known high-severity CVEs
  3. SBOM + scan — Generate SBOM with Syft, scan with Grype, attach both to the image with Cosign
  4. Ignore with justification — When ignoring CVEs, document why in .grype.yaml; auditors need to see the reasoning
  5. Update the vulnerability DB — Grype uses a local vulnerability database; ensure it's updated daily in CI
  6. SARIF for GitHub — Output SARIF format and upload to GitHub Security tab; developers see CVEs inline on PRs
  7. Base image matters — Most CVEs come from the base image; use minimal bases (distroless, alpine, scratch) to reduce attack surface
  8. Scan running containers — Periodically scan deployed images; new CVEs are discovered daily against existing packages

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value88/100

Highlights

  • 提供容器镜像、文件系统和 SBOM 的漏洞扫描完整解决方案
  • 涵盖 CI/CD 集成、忽略规则配置和与 Syft 结合的最佳实践
Trigger Precision92/100

Highlights

  • 触发词精准覆盖漏洞扫描、容器安全、SBOM、CVE 等核心场景
  • description 清晰明确,边界清晰,无歧义
Structure and Standards95/100

Highlights

  • 文档结构清晰,包含完整的安装、扫描、集成和配置指南
  • 提供端到端示例和详细的操作步骤,frontmatter 完整
Execution Reliability90/100

Highlights

  • 提供多种安装方式和详细的命令参数说明
  • CI/CD 集成示例完整,覆盖主要异常处理和配置选项
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 33, 148
Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • raw.githubusercontent.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.