Commit 55e4018
committed
security: harden Docker image and CI pipeline (OWASP compliance)
Addresses multiple items from the OWASP Docker Security Cheat Sheet:
- Switch base image to mcr.microsoft.com/dotnet/aspnet:10.0-noble-chiseled
(smaller attack surface, no shell, fewer CVEs, non-root by default)
- Add USER app directive so container runs as non-root (OWASP Rule 2)
- Remove curl|sh pattern for Azure Artifact Credential Provider
- Replace raw PAT secret with BuildKit --mount=type=secret file (nugetconfig)
so credentials are never written to any image layer or build cache
- Generate NuGet auth config in CI via heredoc; clean up with if: always()
- Fix PR docker build step: add context and ACCESS_TO_NUGET_FEED=false
- Downgrade Node from non-LTS v25 to Active LTS v24 (Krypton)1 parent f2643a6 commit 55e4018
2 files changed
Lines changed: 37 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
66 | 88 | | |
67 | 89 | | |
68 | 90 | | |
| |||
71 | 93 | | |
72 | 94 | | |
73 | 95 | | |
| 96 | + | |
| 97 | + | |
74 | 98 | | |
75 | 99 | | |
76 | 100 | | |
| |||
80 | 104 | | |
81 | 105 | | |
82 | 106 | | |
83 | | - | |
| 107 | + | |
84 | 108 | | |
85 | 109 | | |
86 | 110 | | |
| |||
90 | 114 | | |
91 | 115 | | |
92 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
93 | 121 | | |
94 | 122 | | |
95 | 123 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| 33 | + | |
34 | 34 | | |
0 commit comments