Add a repeatable script for reproducing customer CVE scans - #2093
Add a repeatable script for reproducing customer CVE scans#2093NickJosevski wants to merge 1 commit into
Conversation
8fe03da to
e1440bd
Compare
Follow-up: how do we become aware of changes?Having the script in the repo is the right first step, but it only helps someone who thinks to run it. Notes below on what automating it would involve, so this can be picked up later. The "when" has two answers, not oneTwo independent things change the result:
Driver 2 is the one that bites. The README already records There is also a third axis the script doesn't cover yet: it scans latest, but customers run old. The versions worth watching on a schedule are the tips of each supported release branch, not just main. That's what actually shows up in customer reports. It needs state, or it's noiseRunning nightly and posting the raw output to Slack means the same 1 medium CVE every morning forever, which gets muted by week two. The alert has to be a diff. Two ways to get one:
Options
Suggested directionB for the scheduled watch, plus A's D is worth adding later for the customer-facing ergonomics. "Give me the report for version X" is a much nicer ask as a runbook with a version prompt than as a workflow dispatch, and it's a good dogfooding story. One addition regardless of platformAlert on the bundled runtime drifting behind the current patch, independently of whether any CVE is reported against it. It's the leading indicator, it's a one-line comparison, and per the EOL trap documented in the README, a clean scan on an old runtime usually means nobody is publishing advisories for it any more — not that it's safe. |
Reproducing a customer CVE report meant re-deriving the same steps every time. Customers scan the files on their deployment targets. They do not scan this repo or the NuGet graph. The surfaces give different answers. dotnet list package --vulnerable walks the NuGet graph and reports build-time reference shims that contribute no runtime assembly. No customer scanner ever sees those shims. The discrepancy has been a recurring source of confusion. The script downloads the published consolidated package, extracts every flavour and RID, prints the bundled .NET runtime version, then scans with Trivy and Grype. Two databases are used deliberately. Customer scanners disagree with each other and one tool is not a baseline. Results separate total matches from distinct CVEs. The same finding repeats across roughly 43 deps.json files. A customer reporting 42 vulnerabilities is routinely reporting one. Calamari version is usually the answer. Measured 2026-08-01. Version 2025.3.417 has 9 distinct CVEs and bundles .NET 6.0.36. That runtime reached end of life in November 2024. Version 2026.3.508 has 1 and bundles 8.0.29. The README covers reading results. It also records two traps found while building the script. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
e1440bd to
c901b7c
Compare
Background
Customers scan the files on their deployment targets. They do not scan this repo or the NuGet graph the give different answers.
dotnet list package --vulnerablewalks the NuGet graph and reports build-time reference shims that contribute no runtime assembly. No customer scanner ever sees those shims.Results
Adds
scripts/scan-calamari-cves/scan.sh.The script downloads the published consolidated package, extracts every flavour and RID, prints the bundled .NET runtime version, then scans with Trivy and Grype. Two databases are used because customer scanners disagree with each other.
Results separate total matches from distinct CVEs. The same finding repeats across roughly 43
deps.jsonfiles. A customer reporting 42 vulnerabilities is routinely reporting one.2025.3.4172026.3.508