analyze-cve

analyze-cve is a command for coding agents from openshift-eng/ai-helpers. It costs 11 tokens per session (1,639 once invoked), scanned B, original, Apache-2.0.

A command that analyzes a Go codebase for a specified CVE, gathers vulnerability information, assesses risk, and can suggest or apply fixes.

In plain words
What is it for?
Use it to investigate CVEs in Go projects with dependency, call-graph, reachability, or static analysis methods.
Why use it?
It connects a known security flaw to the project so developers can determine impact instead of only seeing that a CVE exists.

Command

Part of the compliance plugin — 4 skills, 1 command shipped together

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/openshift-eng/ai-helpers/analyze-cve
Clone the repo
git clone --depth 1 https://github.com/openshift-eng/ai-helpers

Or install compliance, the plugin that ships this one along with the rest of its 4 skills, 1 command.

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 analyze-cve

README.md
[![agentmods](https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-cve.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-cve)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-cve"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-cve.svg" alt="Measured on agentmods" height="20"></a>
Per session 11 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,639 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.1 $0.00011 $0.01639
Opus 5 $0.00005 $0.00820
Sonnet 5 $0.00002 $0.00328
Haiku 4.5 $0.00001 $0.00164

Measured 2d ago against content hash 0da631d39b38, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

analyze-cve scanned grade B with 1 finding 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 2d ago.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

**Optional**: `graphviz` for visual call graph generation (`brew install graphviz` or `sudo apt-get install graphviz`)
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/compliance/commands/analyze-cve.md · 180 lines

How it starts

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

Name

compliance:analyze-cve

Synopsis

/compliance:analyze-cve <CVE-ID> [--algo=vta|rta|cha|static]

Description

The compliance:analyze-cve command performs comprehensive security vulnerability analysis for Go projects. Given a CVE identifier, it gathers vulnerability intelligence, analyzes the codebase for impact, generates a risk report, and optionally applies fixes.

Implementation

Phase 0: Setup and Tool Validation

  1. Parse Arguments

    • Extract <CVE-ID> (required) from the first argument
    • Extract --algo value if provided (optional, default: vta)
    • Valid --algo values: vta, rta, cha, static
  2. Check Required Tools

    go version 2>/dev/null || echo "MISSING: go"
    [ -f go.mod ] || echo "MISSING: go.mod"
    which govulncheck 2>/dev/null || echo "MISSING: govulncheck"
    which callgraph 2>/dev/null || echo "MISSING: callgraph"
    which digraph 2>/dev/null || echo "MISSING: digraph"
    
  3. If ANY Tool is Missing → Display installation instructions and exit with error:

    go install golang.org/x/vuln/cmd/govulncheck@latest
    go install golang.org/x/tools/cmd/callgraph@latest
    go install golang.org/x/tools/cmd/digraph@latest
    
  4. If All Tools Present → Continue to Phase 1


Phase 1: CVE Intelligence Gathering

  • Skill: cve-intelligence-gathering
  • Input: CVE-ID from arguments
  • Output: CVE profile (severity, affected packages, fixed versions, remediation guidance, Go relevance)

Decision Point:

  • IF invalid CVE format → Exit with error
  • IF CVE not found AND user declines to provide info → Exit with error
  • IF CVE is not Go-related → Generate "Not Applicable" report → Exit
  • IF CVE details found → Continue to Phase 2

Phase 2: Codebase Impact Analysis

Read the full file on GitHub · 180 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. 2d ago First seen · 180 lines · 11 tokens per session scan B 0da631d39b38

Subscribe to this mod's changes

analyze-cve is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed yesterday), licensed Apache-2.0. It adds 11 tokens to every session and 1,639 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.