trivy

trivy is a skill for Claude Code, Codex from fmind/dot. It costs 42 tokens per session (815 once invoked), scanned A, original, MIT.

A Trivy-based security scanning workflow for checking source files, dependencies, infrastructure settings, secrets, licenses, software inventories, and container images.

In plain words
What is it for?
Use it to scan repositories, Docker or other container images, Terraform or OpenTofu, Kubernetes, and GitHub Actions files.
Why use it?
It helps find known vulnerabilities, unsafe configuration, exposed secrets, and licensing issues before they reach production.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/fmind/dot/trivy
Any agent
npx skills add fmind/dot --skill trivy
Clone the repo
git clone --depth 1 https://github.com/fmind/dot

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trivy

README.md
[![agentmods](https://agentmods.dev/badge/skills/fmind/dot/trivy.svg)](https://agentmods.dev/skills/fmind/dot/trivy)
Your own site
<a href="https://agentmods.dev/skills/fmind/dot/trivy"><img src="https://agentmods.dev/badge/skills/fmind/dot/trivy.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 815 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.00815
Opus 5 $0.00021 $0.00407
Sonnet 5 $0.00008 $0.00163
Haiku 4.5 $0.00004 $0.00081

Measured yesterday against content hash c35cbfb3d5cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

trivy scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/trivy/SKILL.md · 57 lines

How it starts

The opening of the file, as written. The whole thing — 57 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Trivy

One scanner for the whole repository: dependencies, infrastructure as code, secrets, licenses, container images, and SBOMs. The policy lives in trivy.yaml (HIGH/CRITICAL, ignore-unfixed, scanners: vuln, misconfig, secret, license) so local runs and CI report the same findings.

Commands

trivy --config trivy.yaml fs .                                    # repository: deps, IaC, secrets, licenses
trivy --config trivy.yaml config .                                # IaC only: Dockerfile, Terraform, Kubernetes, GitHub Actions
trivy --config trivy.yaml image --input tmp/image.tar             # local image tarball, before any push (check:image)
trivy --config trivy.yaml image <registry>/<slug>@<digest>        # pushed image, by immutable digest
trivy --config trivy.yaml image --format cyclonedx -o sbom.json <registry>/<slug>@<digest>
trivy --config trivy.yaml fs --tf-vars terraform.example.tfvars . # OpenTofu modules need variables to evaluate

Mise Task

Expose the repository scan as check:scan in mise.toml per mise; mise run check then runs it locally and in CI:

[tasks."check:scan"]
description = "Scan dependencies, IaC, licenses, and secrets (Trivy)"
run = "trivy --config trivy.yaml fs ." # mise appends extra path arguments

Language-native scanners stay separate as check:vuln (govulncheck, uv audit, pnpm audit) because they know the lockfile semantics better; keep both tasks, trivy fs adds IaC, secrets, and licenses on top.

Triage

  1. Group findings by severity, then split fixable from unfixed.
  2. Prefer the minimal upgrade of the affected dependency or base image; re-run the scan to prove the fix.
  3. Record an accepted risk in .trivyignore (one CVE or path per line, with a # reason) instead of lowering the global severity bar.
  4. Treat a secret finding as compromised: rotate it, then clean the history per gitleaks.

Gotchas

  • Always pass --config trivy.yaml: precedence is --config > TRIVY_CONFIG > ./trivy.yaml, and the owner's shell exports a global TRIVY_CONFIG, so a bare trivy fs . silently uses the global policy.
  • Commit a project trivy.yaml: copy the global one so CI, hooks, and agents share one policy.
  • Scan digests, not tags: a tag can move after the scan; the digest is what ships.
  • Databases update on first run: a scan needs network access once per day for the vulnerability database; use --skip-db-update in offline reruns.

Read the full file on GitHub · 57 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 57 lines · 42 tokens per session scan A c35cbfb3d5cc

Subscribe to this mod's changes

trivy is a skill published in the GitHub repository fmind/dot (4 stars, last pushed today), licensed MIT. It adds 42 tokens to every session and 815 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.