Skip to content

Commit f434e12

Browse files
committed
Tighten prompt: require jq query of trivy-results.json for CVSS data
Run 24999949466 produced an excellent fix recommendation but inferred the CVSS score/vector from training knowledge instead of reading trivy-results.json (where the actual 8.1 score and AV:N/AC:H/... vector were available). Claude went deep on git history early and apparently skipped the jq query. Make this explicit: trivy-results.json is the canonical source for CVSS data, query it with jq, and only fall back to training knowledge when the CVE genuinely isn't in the scan (test mode).
1 parent 365d626 commit f434e12

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/container-scan.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,17 @@ jobs:
222222
223223
## Required reading (do this BEFORE writing reports)
224224
225-
1. `trivy-results.json` (in the workspace root) — authoritative metadata for every
226-
CVE flagged in the current scan. ALWAYS check here first for CVE details
227-
(severity, vector, package path, fix version, references). Use `jq` to query.
225+
1. `trivy-results.json` (in the workspace root) — **the authoritative source for
226+
CVSS score, CVSS vector, package path, fix version, and references.** Query
227+
it with `jq` before writing any report. Example:
228+
```
229+
jq '.Results[]?.Vulnerabilities[]? | select(.VulnerabilityID == "<CVE-ID>")' trivy-results.json
230+
```
231+
You MUST cite the exact CVSS score and vector from this file in the
232+
"Vulnerability details" section — do NOT infer or estimate them from your
233+
own knowledge if the CVE is present in the JSON. If the CVE is NOT in the
234+
JSON (test mode, or scan-target divergence), explicitly say so in the report
235+
and use your training knowledge as a clearly-labeled fallback.
228236
2. `.agents/skills/container-vulns/SKILL.md` — read fully. This is the repo's
229237
container-vulnerability playbook and tells you what the maintainers consider
230238
actionable vs. accepted risk.

0 commit comments

Comments
 (0)