Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Trivy

$ trivy Official Low Risk
Aqua Security · Security & Secrets · Apache-2.0 · macos / linux / windows

trivy scans filesystems, container images, SBOMs, and Terraform/Kubernetes manifests for CVEs, misconfigurations, and hardcoded secrets. Its uniform --format json, --severity filters, and --quiet flags make security gating effortless for coding agents.

FCRS-1.0 Score
93 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install trivy
CLI vs MCP Decision CLI Preferred vs MCP

Running trivy fs --format json locally avoids uploading source trees to external scanners and gives instant structured CVE output.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
✓ NO_COLOR Clean
— Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 24 / 25

Supports --format json (plus sarif, cyclonedx, spdx-json), --severity filtering, --quiet, and non-interactive exit codes.

  • Native --format json, --quiet, and --exit-code flags
Trust & Safety 23 / 25

Read-only scanner against target files/images; only writes its own vulnerability DB cache under ~/.cache/trivy.

  • Zero mutation of scanned targets
Setup & Portability 14 / 15

Single Go binary across brew, apt, Docker images, and GitHub releases.

  • Cross-platform static binary
Utility & Efficiency 14 / 15

Unifies dependency CVEs, container scanning, IaC misconfigs, and secret detection in one CLI.

  • Multi-scanner coverage (vuln, misconfig, secret, license)
Maintenance & Lineage 9 / 10

Flagship Aqua Security OSS project with continuous vulnerability DB updates.

  • Official aquasecurity/trivy repository
Docs & Verifiability 9 / 10

Comprehensive documentation covering JSON schemas, scanners, and air-gapped caches.

  • Detailed official docs at aquasecurity.github.io/trivy

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key
Credential Storage

No credentials needed for local filesystem/IaC scans; caches vulnerability DB in ~/.cache/trivy and optionally uses Docker/registry auth.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and open-source (Apache-2.0).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Trivy Agent Rules
- Always pass `--format json --quiet` (and `--severity HIGH,CRITICAL` on large repos) so progress bars and low-noise findings do not bloat context.
- Use `--skip-db-update` when running offline with an existing `~/.cache/trivy` database.

Agent-Ready Command Recipes

Safe Read-Only Queries

Scan local repo for high/critical vulnerabilities and secrets as JSON
trivy fs --scanners vuln,misconfig,secret --severity HIGH,CRITICAL --format json --quiet .

Performs read-only CVE, IaC, and secret checks and outputs clean JSON.

Scan a container image for OS and library CVEs
trivy image --severity CRITICAL --format json --quiet alpine:3.20

Reports critical vulnerabilities inside an image with progress bars suppressed (--quiet).

Strengths for Agents

  • + All-in-one CVE, IaC misconfiguration, and secret scanner with clean --format json --quiet output.
  • + Zero-auth local filesystem scanning with flexible --severity filtering.

Caveats & Pitfalls

  • ! First run downloads ~50MB+ vulnerability DB unless --skip-db-update is used with a pre-warmed cache.
  • ! Full --format json on large projects can be verbose—filter with --severity or jq.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI