Skip to content

Pin System.Security.Cryptography.Pkcs to 10.0.13 for GHSA-846f-f764-76mx / GHSA-2fmv-rv2c-59x7 - #1079

Merged
Zach Teutsch (zateutsch) merged 1 commit into
mainfrom
nmetulev-pkcs-cve-pin
Oct 14, 2026
Merged

Zach Teutsch (zateutsch) merged 1 commit into
mainfrom
nmetulev-pkcs-cve-pin

Conversation

@nmetulev

@nmetulev Nikola Metulev (nmetulev) commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What and why

Two new advisories (published 2026-10-13) affect System.Security.Cryptography.Pkcs 8.0.0 to 8.0.1, patched in 8.0.2 and 10.0.13:

NuGet.Packaging 7.9.0 brings in Pkcs 8.0.1 transitively. NuGet audit reports it as NU1902/NU1903, and TreatWarningsAsErrors turns those into restore failures. build-and-package already fails this way on open PRs (for example #1080):

error NU1903: Warning As Error: Package 'System.Security.Cryptography.Pkcs' 8.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-846f-f764-76mx
error NU1902: Warning As Error: Package 'System.Security.Cryptography.Pkcs' 8.0.1 has a known moderate severity vulnerability, https://github.com/advisories/GHSA-2fmv-rv2c-59x7

This PR pins Pkcs to 10.0.13 in Directory.Packages.props and references it from WinApp.Cli.csproj.

Upstream status, and when to remove the pin

The real fix belongs in NuGet.Packaging, and it hasn't shipped yet:

Remove this pin once winapp updates to a NuGet.Packaging release that depends on Pkcs 8.0.2 or later (or 10.0.13+). Check with dotnet nuget why src/winapp-CLI/WinApp.Cli/WinApp.Cli.csproj System.Security.Cryptography.Pkcs.

We pin rather than suppress NU1902/NU1903 or relax TreatWarningsAsErrors, so the next real advisory still fails the build.

Before / after

Nothing a user runs or sees changes. Restore resolves Pkcs 10.0.13 instead of 8.0.1.

Not tested / risks

NuGet audit data may not reproduce the warnings locally; CI is the real check.

Checklist

  • Tested locally on Windows: dotnet restore --force-evaluate -p:TreatWarningsAsErrors=true and a Release build with TreatWarningsAsErrors pass; dotnet nuget why resolves only Pkcs 10.0.13.

…6-84008

NuGet.Packaging 7.9.0 brings in 8.0.1, which the advisories published on 2026-10-13 flag, so restore fails with TreatWarningsAsErrors.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 14, 2026 09:02
@nmetulev Nikola Metulev (nmetulev) added the agent-preparing Agent is addressing feedback or completing required validation and CI label Oct 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Restore, dependency resolution, Release build, NativeAOT publish, and executable startup all succeeded with Pkcs 10.0.13.

0 open findings

What changed in this PR

Pins a patched Pkcs dependency to prevent NuGet audit failures caused by NuGet.Packaging 7.9.0.

Changes:

  • Adds a direct Pkcs package reference.
  • Centrally pins version 10.0.13 with removal guidance.
File Description
src/​winapp-CLI/​WinApp.Cli/​WinApp.Cli.csproj References the patched package directly.
src/​winapp-CLI/​Directory.Packages.props Pins Pkcs 10.0.13.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Build Metrics Report

Validation passed. All required build and validation jobs succeeded.

Binary Sizes

Artifact Baseline Current Delta
CLI (ARM64) 59.42 MB 59.48 MB 📈 +60.0 KB (+0.10%)
CLI (x64) 59.41 MB 59.46 MB 📈 +55.0 KB (+0.09%)
MSIX (ARM64) 24.66 MB 24.70 MB 📈 +47.6 KB (+0.19%)
MSIX (x64) 26.19 MB 26.21 MB 📈 +12.4 KB (+0.05%)
NPM Package 51.47 MB 51.52 MB 📈 +53.9 KB (+0.10%)
NuGet Package 51.58 MB 51.63 MB 📈 +49.7 KB (+0.09%)

.NET Test Results (TRX reports)

Other suites are reflected in the overall validation status above.

✅ 8668 passed, 39 skipped out of 8707 tests in 2174.9s (+199.2s vs. baseline)

Test Coverage

✅ 87.5% line coverage, 81.9% branch coverage · ✅ no change vs. baseline

CLI Startup Time

72ms median (x64, winapp --version) · ✅ -7ms vs. baseline

Try This Build

Installs the MSIX for your architecture, replacing any previously installed build. Needs the GitHub CLI — the command offers to install it and sign you in if it is missing.

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) 1079
Switching between builds often?

Put the tool on your PATH once:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/microsoft/winappCli/main/scripts/winapp-pr.ps1))) -AddToPath

Then this build is just:

winapp-pr 1079

Run winapp-pr with no arguments to pick from a list of open PRs.


Updated 2026-10-14 09:35:34 UTC · commit 980332c · workflow run

@nmetulev Nikola Metulev (nmetulev) added ready-for-review Agent work and technical checks complete; awaiting review or re-review, not approval or merge and removed agent-preparing Agent is addressing feedback or completing required validation and CI labels Oct 14, 2026
@nmetulev
Nikola Metulev (nmetulev) marked this pull request as draft October 14, 2026 15:39
@nmetulev
Nikola Metulev (nmetulev) marked this pull request as ready for review October 14, 2026 16:11
@zateutsch
Zach Teutsch (zateutsch) merged commit 46ff502 into main Oct 14, 2026
48 checks passed
@zateutsch
Zach Teutsch (zateutsch) deleted the nmetulev-pkcs-cve-pin branch October 14, 2026 20:07
Alexandre Zollinger Chohfi (azchohfi) added a commit that referenced this pull request Oct 19, 2026
Picks up the System.Security.Cryptography.Pkcs pin (#1079) that the failing restore needs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 72820671-e2ef-4a9e-b4e6-ddbb5679a467
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Agent work and technical checks complete; awaiting review or re-review, not approval or merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants