/node-cve:analyze-cve-reposfrom node-cve
Analyzes CVE reachability against downstream repository forks at version-specific release branches. Used in Phase 2 of node-cve:triage to determine if a vulnerable code path is reachable in Node team repos.
Ships in node-cve. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when Phase 2 of the node-cve:triage command needs to determine whether a CVE's vulnerable code path is actually reachable in a Node team repository. Each CVE is analyzed against the release branch (or, for upstream-only components, the shipped tag) that corresponds to the OCP version selected in Phase 1, one agent per CVE and repository. If the fork, branch or tag is not found, the CVE is classified as Uncertain for that repository.
.work/node-cve/repos/<owner>-<repo-name>-<branch>/ (the triage command does this before spawning parallel analysis agents)node-team plugin (shared component and version data)The links to node-team files below resolve in a repository checkout and on the docs site. When the plugins are installed they do not resolve, because every plugin lives in its own versioned cache directory. Get the real directory from the helper script, then read the files from there with the Read tool:
bash "${CLAUDE_PLUGIN_ROOT}/skills/report-findings/scripts/node-cve-lib.sh" refs
The helper script is node-cve-lib.sh. It is the only Bash command this plugin needs, which keeps headless runs with a strict tool allowlist working. Do not write ad-hoc curl, jira or git commands and do not chain commands. Use the Read, Grep, Glob and Write tools for file work. Shell variables do not persist between Bash tool calls, so pass values as literal arguments.
Paths written as .work/node-cve/triage-YYYY-MM-DD/ stand for the run directory that init printed as TRIAGE_DIR=. Use that path as is, also after midnight; the helper keeps using it for the whole run.
If refs fails, invoke the node-team:node skill and read references/shared/ from its base directory. If the files still cannot be found, stop with "node-team shared references not found". Never fall back to data from memory.
Analysis must target the release branch corresponding to the selected OpenShift version. The main branch may have newer dependencies or Go versions that mask vulnerabilities present in shipped releases. Analysis targets the downstream fork, or the upstream repository at the shipped tag for the components the shared components reference maps upstream only (conmon-rs, cri-tools).
Component to repository mapping: Read the component-to-repo table and the pscomponent: label mapping from the node-team shared components reference. Trackers labeled pscomponent:crun or pscomponent:conmon are not analyzed: those packages belong to the containers team (see "Not owned by the Node team" there). Precedence for choosing the repository: if the tracker carries a pscomponent: label listed in the label mapping table, the label wins. Otherwise use the row for the tracker's Jira component. A row that lists two repositories (Node / Kueue: the operand openshift/kubernetes-sigs-kueue and the operator openshift/kueue-operator) needs a choice: pick the repository from the affected package or image named in the tracker summary or description, following the Kueue note in the components reference, and classify as Uncertain with note "component maps to more than one repository" if it stays ambiguous. A bare Node component without a usable label does not identify a repository. In that case use the package named in the tracker summary (the text between the CVE ID and the colon, for example cri-o:) to pick a row, and if that is still ambiguous classify as Uncertain with note "component does not map to a repository".
Version mapping: Read the formulas and the branch naming conventions from the node-team shared version map and derive the release branch from them. The map is the only source. Do not apply a formula from memory, since OCP 4.Y and OCP 5.Y use different ones.
If the component does not map to a known repo, classify as Uncertain and skip analysis. If the downstream fork or release branch does not exist, classify as Uncertain with note "downstream fork/branch not found" and skip analysis.
The triage command clones or refreshes the repository with the helper before this skill runs and passes on the DIR= and COMMIT= values it printed (directory, short commit hash and commit date). Record the commit in the evidence. If this skill runs on its own, do the same:
bash "${CLAUDE_PLUGIN_ROOT}/skills/report-findings/scripts/node-cve-lib.sh" clone https://github.com/openshift/cri-o release-5.0
The second argument is a release branch or a tag. Components that shared/components.md maps to upstream tags (conmon-rs, cri-tools) are cloned at the tag that ships in the selected OCP version, for example clone https://github.com/containers/conmon-rs v0.6.6.
Exit code 3 means the fork or branch does not exist: classify as Uncertain with note "downstream fork/branch not found". Exit code 4 means the clone failed although the branch exists: classify as Uncertain with note "clone failed". An existing directory is always refreshed to the branch tip, so a stale clone is never analyzed.
Fetch vulnerability details to understand what to look for in the source code:
Search the web for the CVE ID to find advisories, affected packages, vulnerable functions, and fixed versions
Check the Jira issue description and comments for additional context (affected package, vulnerable API, attack vector). The helper returns them as JSON:
bash "${CLAUDE_PLUGIN_ROOT}/skills/report-findings/scripts/node-cve-lib.sh" issue OCPBUGS-XXXXX
golang.org/x/net/html, crypto/x509, capnproto.org/go/capnp)html.Parse, x509.ParseCertificate)If vulnerability details cannot be determined, classify as Uncertain with note "insufficient CVE details available".
First decide which kind of package the CVE affects. The check differs, and using the wrong one produces false "Unaffected" results.
4a. Go standard library or Go toolchain CVE (the affected package has no domain in its import path, for example crypto/x509, net/http, archive/tar, or the CVE is against cmd/go or the runtime):
Standard library packages never appear in go.mod, go.sum, or vendor/modules.txt. Never classify a stdlib CVE as Unaffected because it is missing from those files. What matters is the Go version the shipped binary is built with. Look it up with the Read and Grep tools inside the repo directory:
go.mod and note the go and toolchain directives.golang[-:_]?[0-9]+\.[0-9]+|GO_VERSION|go-toolset|build_root_image with the globs Dockerfile*, *.Dockerfile, .ci-operator.yaml and *.spec.go directive is a minimum language version and toolchain a suggested one. The builder image (.ci-operator.yaml build_root_image, FROM lines in Dockerfile*, openshift/ or images/ directories) decides what actually compiles the release binary. Prefer it as evidence.GOTOOLCHAIN=auto, a go or toolchain directive newer than the builder makes go download and use that newer toolchain. Downstream release builds run offline with RHEL go-toolset, which sets GOTOOLCHAIN=local, so the builder version counts. Only use the directive version instead when the build sets GOTOOLCHAIN to something other than local (grep for GOTOOLCHAIN with the same globs), and say so in the evidence.4b. Third-party Go module: Grep for the module path (for example golang.org/x/net), not the package path (golang.org/x/net/html), in go.mod, go.sum and vendor/modules.txt, since dependency files list modules. If present, compare the version with the fixed version. At or above the fix: Unaffected with the version as evidence. Repos with several go.mod files (for example staging/ in openshift/kubernetes) need each relevant file checked.
4c. Rust repos (conmon-rs): check Cargo.toml and Cargo.lock.
Only for 4b and 4c: if the affected package is not in the dependency tree at all, classify as Unaffected with high confidence and continue with the next CVE.
This is the core analysis step. Read the repository source code to determine if the vulnerable code path is actually exercised.
Find imports and usage of the affected package with the Grep tool, scoped to the repo directory:
"crypto/x509", with glob *.go. Go import blocks list one quoted path per line without the word import, so a pattern like import.*<pkg> misses most imports. The quoted path matches single imports, import blocks and aliased imports.use <crate>(::|;) with glob *.rs.x509.ParseCertificate, or the alias used in that file) across *.go and *.rs.Ignore test-only code: _test.go files in Go, and in Rust #[cfg(test)] modules, tests/ and benches/ directories. Tests alone do not make a CVE reachable. Separate first-party code from vendor/. A vulnerable function that is only called from inside a vendored dependency still counts, but the call path must then be traced from first-party code into that dependency.
Read the files that use the affected package. For each call site:
Trace the call path from entry points (main, HTTP handlers, gRPC servers, CLI commands) to the vulnerable function. Determine if the path is reachable in normal operation.
Check for mitigating controls:
Assess exploitability in context:
Use exactly one of these classification values. The enum value is what goes into JSON output, the label is what goes into reports, Jira comments and Slack:
| Finding | Enum value | Label | Confidence |
|---|---|---|---|
| Vulnerable function called with attacker-controlled input, no mitigations | REACHABLE | Reachable | HIGH |
| Vulnerable function called, but input is partially validated | REACHABLE | Reachable | MEDIUM |
| Vulnerable function called, but only with trusted/internal data | PRESENT_NOT_EXPLOITABLE | Present but not exploitable | HIGH |
| Package imported (or stdlib version vulnerable) but vulnerable function not called | PRESENT_NOT_REACHABLE | Present but not reachable | HIGH |
| Third-party package not in dependency tree, or dependency / Go toolchain version already contains the fix | UNAFFECTED | Unaffected | HIGH |
| Repo too large to fully analyze, CVE details insufficient, fork/branch missing, clone failed, or Go builder version unknown and no call sites found | UNCERTAIN | Uncertain | LOW |
Confidence is one of HIGH, MEDIUM, LOW. Lower it by one level whenever the analysis was incomplete (call paths not fully traced, builder Go version inferred rather than read).
Write a concise analysis for the report:
COMMIT= value from Step 2)Save the analysis with the Write tool to <TRIAGE_DIR>/<CVE-ID>-<owner>-<repo>-<ref>-analysis.md (for example CVE-2025-61729-openshift-cri-o-release-5.0-analysis.md), so the same CVE analyzed against two repositories gets two files. Start the file with a line Classification: <label> (<confidence>), so later runs can reuse it from the cache.
{
"skill": "analyze-cve-repos",
"cve_id": "CVE-2026-32281",
"repo": "https://github.com/openshift/cri-o",
"branch": "release-5.0",
"commit": "abc1234",
"ocp_version": "5.0",
"classification": "REACHABLE",
"confidence": "HIGH",
"evidence": {
"affected_package": "crypto/x509",
"package_kind": "go-stdlib",
"go_version_found": "1.25.3 (build_root_image in .ci-operator.yaml)",
"vulnerable_function": "x509.ParseCertificate",
"call_sites": [
"pkg/server/tls.go:42 - called from TLS handshake path",
"pkg/server/auth.go:118 - called during client cert validation"
],
"call_path": "main -> server.New -> setupTLS -> x509.ParseCertificate",
"input_source": "network (client TLS certificates, attacker-controlled)",
"mitigations": "none found",
"fixed_version": "go1.25.5"
},
"remediation_hint": "Update the Go builder image to 1.25.5 or later. Vulnerable function processes untrusted client certificates during TLS handshake."
}
The values above are illustrative. classification is one of the enum values from Step 6, confidence one of HIGH, MEDIUM, LOW, and package_kind one of go-stdlib, go-module, rust-crate.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
npx claudepluginhub openshift-eng/ai-helpers --plugin node-cveOther plugins' skills for the same job