Skip to content

Commit 456600d

Browse files
committed
workflo_dispatch
1 parent 05d88d5 commit 456600d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/windows.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Windows Server 2025
22

33
on:
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)

0 commit comments

Comments
 (0)