Skip to content

Commit 0b3b7af

Browse files
committed
ci(config): enforce supply chain protections
- Enable locked-mode restore to prevent dependency hijacking - Require package lock files for reproducible builds - Set signatureValidationMode to accept to allow unsigned packages (BenchmarkDotNet, Dapper, MediatR are unsigned) Refs: NU3004
1 parent daa9275 commit 0b3b7af

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
<Version Condition="$(Version) == ''">0.1.0.0</Version>
66
</PropertyGroup>
77

8+
<PropertyGroup>
9+
<!-- Force locked-mode restore for supply-chain safety. -->
10+
<RestoreLockedMode>true</RestoreLockedMode>
11+
</PropertyGroup>
12+
813
<!-- Global Coverage Exclusions -->
914
<PropertyGroup>
1015
<ExcludeFromCodeCoverage>**/Migrations/**;**/obj/**;**/bin/**;**/wwwroot/**;**/node_modules/**</ExcludeFromCodeCoverage>

nuget.config

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,18 @@
44
<clear />
55
</fallbackPackageFolders>
66

7-
<!-- Optional: also clear any bad package sources -->
87
<packageSources>
98
<clear />
109
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
1110
</packageSources>
11+
12+
<packageSourceMapping>
13+
<packageSource key="nuget.org">
14+
<package pattern="*" />
15+
</packageSource>
16+
</packageSourceMapping>
17+
18+
<config>
19+
<add key="signatureValidationMode" value="accept" />
20+
</config>
1221
</configuration>

0 commit comments

Comments
 (0)