File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 11name : Windows Server 2025
22
33on :
4+ workflow_dispatch :
5+ inputs :
6+ run_binskim :
7+ description : ' Run BinSkim security hardening check'
8+ type : boolean
9+ default : true
410 pull_request :
511 types : [synchronize, opened]
612 push :
@@ -174,6 +180,7 @@ jobs:
174180 dotnet test -c Release -f net48 --runtime win-x64
175181
176182 - name : Verify security hardening with BinSkim
183+ if : inputs.run_binskim == true
177184 shell : powershell
178185 run : |
179186 # Official install: download .nupkg from NuGet, unzip, run exe from tools/
@@ -191,6 +198,9 @@ jobs:
191198
192199 $sarifFile = "$env:TEMP\binskim.sarif"
193200 & $binskimExe analyze $dll --output $sarifFile
201+ # Ignore BinSkim's own exit code (it returns 1 on PDB load failures etc.);
202+ # rely solely on SARIF result filtering below.
203+ $LASTEXITCODE = 0
194204
195205 # Ignore findings we cannot address:
196206 # ERR997 - PDB unavailable (Release builds have no PDB by default)
You can’t perform that action at this time.
0 commit comments