Commit e8e79a0
chore(csharp): patch C# SDK generator container for 2026-05-06 grype scan (#15738)
* [Grype Scan][csharp-sdk] Scaffold PR for 40 vulnerabilities
* chore(csharp): patch C# SDK generator container for 2026-05-06 grype scan
Remediate the 40 vulnerabilities reported against the csharp-sdk image:
- Bump Node base image from 22.12-alpine3.20 to 22.22.2-alpine3.22
(fixes the Node binary CVEs and upgrades npm-bundled cross-spawn,
minimatch, glob, tar, and diff to non-vulnerable versions).
- Switch the runtime base image from dotnet/sdk:10.0-alpine to
dotnet/aspnet:10.0-alpine and install csharpier in a separate sdk
build stage; this drops the SDK-bundled
System.Security.Cryptography.Xml 10.0.5 DLL flagged by
GHSA-37gx-xxp4-5rgx and GHSA-w3x6-4m5h-cxqf.
- Add 'apk upgrade' to pick up the alpine 3.23 nghttp2-libs 1.69.0-r0
fix for CVE-2026-27135.
- Patch npm's bundled ip-address (10.1.1), picomatch (4.0.4), and
brace-expansion (2.0.3) using the same in-place pattern as the
Java SDK Dockerfile.
- Delete the .github/grype-scans/scan-csharp-sdk-20260506.md scaffold
file and add a chore changelog entry under the unreleased folder.
* fix: keep .NET SDK in csharp-sdk image; drop unused PowerShell instead
The previous switch from dotnet/sdk to dotnet/aspnet broke the C# SDK
generator because some fixtures (e.g. csharp-namespace-collision:fully-
qualified-namespaces) run `dotnet format` during generation, which
requires the full SDK rather than the runtime-only image.
Revert the runtime to mcr.microsoft.com/dotnet/sdk:10.0-alpine and
remove the unused PowerShell install that ships with the SDK image.
Powershell is what brought the vulnerable
System.Security.Cryptography.Xml 10.0.5 DLL flagged by
GHSA-37gx-xxp4-5rgx and GHSA-w3x6-4m5h-cxqf into the layer; the C# SDK
generator does not invoke pwsh, so removing it eliminates the finding
without affecting `dotnet format` or csharpier. Local
`grype --only-fixed` confirms 0 fixable vulnerabilities remain.
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: David Konigsberg <72822263+davidkonigsberg@users.noreply.github.com>1 parent 994e929 commit e8e79a0
2 files changed
Lines changed: 80 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
2 | 11 | | |
3 | 12 | | |
4 | 13 | | |
| |||
13 | 22 | | |
14 | 23 | | |
15 | 24 | | |
16 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
17 | 29 | | |
18 | 30 | | |
19 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
20 | 42 | | |
21 | 43 | | |
22 | 44 | | |
23 | 45 | | |
24 | 46 | | |
25 | 47 | | |
26 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
27 | 93 | | |
28 | 94 | | |
29 | 95 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments