patch-cve

A command for investigating and fixing known security weaknesses in project dependencies or container images. CVEs are public identifiers for reported software vulnerabilities.

In plain words
What is it for?
Use it to process one or more CVE identifiers by checking NVD, reviewing the relevant operating-system security tracker, and applying a package override, Dockerfile upgrade, or trivyignore entry.
Why use it?
It gives you a consistent way to check whether a vulnerability is already suppressed, investigate its details, and choose an appropriate fix or documented exception.

Command

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 commands/mazumba/opencode-dockerized/patch-cve
Clone the repo
git clone --depth 1 https://github.com/mazumba/opencode-dockerized
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,315 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.00026 $0.01315
Opus 5 $0.00013 $0.00658
Sonnet 5 $0.00005 $0.00263
Haiku 4.5 $0.00003 $0.00131

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

Security

Grade A, and why

patch-cve 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.

.opencode/config/commands/patch-cve.md · 122 lines

How it starts

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

Triage and remediate each CVE ID passed in $ARGUMENTS. Multiple CVEs may be space-separated.

Invocation

/patch-cve CVE-2026-42570
/patch-cve CVE-2026-42570 CVE-2026-48962 CVE-2026-9538

Steps

Process each CVE ID in sequence.

1. Check .trivyignore

Look for the CVE ID in .trivyignore in the project root.

  • If present and the exp: date has not passed today → skip this CVE, report it as already suppressed.
  • If present and the exp: date has passed → re-triage it from scratch.
  • If absent → proceed.

2. Fetch CVE details

Always fetch from NVD (https://nvd.nist.gov/vuln/detail/<CVE-ID>) for general CVE details.

If a Dockerfile exists in the project, inspect the FROM line to determine the base distro, then additionally check the appropriate distro security tracker:

  • Debian / Ubuntuhttps://security-tracker.debian.org/tracker/<CVE-ID>
  • Alpinehttps://security.alpinelinux.org/vuln/<CVE-ID>
  • Red Hat / UBI / CentOShttps://access.redhat.com/security/cve/<CVE-ID>
  • Other distros → search for the distro's own security advisory database

If no Dockerfile exists, NVD alone is sufficient.

Extract:

  • Description and CWE
  • Affected package name and installed version range
  • Fixed version (if any)
  • Attack vector and prerequisites (what conditions are required to exploit it)

3. Read AGENTS.md

If an AGENTS.md exists in the project root, read it before proceeding. Use it to:

  • Understand the project stack and package manager
  • Understand the quality gate protocol to follow after applying a fix
  • Understand any project-specific context relevant to reachability assessment

4. Detect ecosystem and fix path

Determine which of the following applies. Use AGENTS.md context to disambiguate when multiple match.

A — Node/JS package

The affected package appears in one of: bun.lock, package-lock.json, yarn.lock, pnpm-lock.yaml.

Check whether the installed version in the lockfile is within the vulnerable range and whether a fixed version exists.

Read the full file on GitHub · 122 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 · 122 lines · 26 tokens per session scan A 24347e85d10f

Subscribe to this mod's changes

patch-cve is a command published in the GitHub repository mazumba/opencode-dockerized (5 stars, last pushed 4d ago), licensed MIT. It adds 26 tokens to every session and 1,315 once invoked, about $0.0001 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-08-31.