chore(security): add scripts and agent skills to triage image vulnerabilities #2412
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.71) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.71 · 538 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.376
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.071
Real PR Conversation Timeline
1 comments
"Review active on #2412"
general
weight: 0.35
KaivalyaMDabhadkar
Summary
Part of #2380. Triaging the critical and high findings of the image scan and keeping
.openvex.jsoncurrent is manual and undocumented today. #2388 did it for every image by hand. This pull request turns that work into scripts and two agent skills.Scripts in
scripts/openvex/scan.shscans images like the weekly image scan, without and with.openvex.json. For each image it prints the critical and high counts, and the ID and the PURL of each critical or high finding that the document does not cover. It takes the severity from the CVSS score, as the Security tab does.trace.shruns a Python program in its image and lists the Python distributions and the OS packages (dpkg or apk) that its processes load. Asitecustomizehook records the modules and shared libraries of each process.statements.py:-
addmerges a list of findings and reasons into the document, with one statement for each vulnerability and justification, and one product for each image.-
pruneremoves the packages that the scanned images no longer have. SECURITY.md asks for this, but nobody does it by hand.- Both format the document like #2388 and set its version to one more than on
origin/main.Skills in
skills/openvex/They follow the layout of the MongoDB migration skills:
triage-image-vulnerabilities: find the findings that the document does not cover, read each advisory, collect the evidence for each kind of package, decide, add the statements, and rescan. It stops and asks the maintainer when the vulnerable code runs and an attacker can reach it.prune-openvex-statements: scan the published images and remove the stale statements.Other changes
.versions.yamlpins Grype (v0.118.0, the version the scans use now), and thesecurity-scanaction passes it toanchore/scan-action. So the scripts and CI report the same findings, and Renovate updates both.scan.sh.Testing
statements.py formaton the.openvex.jsonof #2388 gives the same file, byte for byte.statements.py add: rows for new and existing vulnerabilities and images, the same rows twice (no change), and an unknown justification (rejected).statements.py pruneon a scan ofgpu-resetremoves the packages that the scan does not report and keeps the others, and on a real scan offile-server-cleanupremoves nothing.mainto 2, and stays 2 on a second run.scan.shonfile-server-cleanup:main-6e388bereports 2 critical findings with the PURLs, as the CI scan does, and 0 with the document of #2388.trace.shonfile-server-cleanup:main-6e388belists click, prometheus_client and the Alpine packages that the process loads.Type of Change
Component(s) Affected
Checklist
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added tools to scan container images with and without OpenVEX statements, report uncovered critical and high findings, and save results in JSON and SARIF formats.
Added tools to trace Python runtime usage and identify packages associated with loaded files.
Added commands to create, format, and prune OpenVEX statements using scan results.
Documentation
Expanded guidance for image scanning, reviewing findings, managing statements, and interpreting CVSS severity scores.
* Added workflows for pruning OpenVEX statements and triaging image vulnerabilities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->