Skip to content

Add a repeatable script for reproducing customer CVE scans - #2093

Draft
NickJosevski wants to merge 1 commit into
mainfrom
nj/cve-scan-script
Draft

Add a repeatable script for reproducing customer CVE scans#2093
NickJosevski wants to merge 1 commit into
mainfrom
nj/cve-scan-script

Conversation

@NickJosevski

@NickJosevski NickJosevski commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Background

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 caused repeated confusion.

Results

Adds scripts/scan-calamari-cves/scan.sh.

./scripts/scan-calamari-cves/scan.sh                # latest main CI build
./scripts/scan-calamari-cves/scan.sh 2026.3.508     # a specific version
./scripts/scan-calamari-cves/scan.sh --local        # your working tree

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. 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:

Calamari Distinct CVEs Bundled .NET
2025.3.417 9 6.0.36, end of life November 2024
2026.3.508 1 8.0.29, current patch

The README covers how to read results. It also records two traps found while building the script.

How to review this PR

General quality.

⚠️ Does this change require a corresponding Server Change?
⚠️ If so - please add a "Requires Server Change" label to this PR!

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant