Skip to content

Commit 0f6a01b

Browse files
[build] Fix BinSkim failure in 'Convert NuGet to MSI' job (#10961)
The 'Convert NuGet to MSI' job fails with: Could not parse glob pattern D:\a\_work\1\s\bin\Build*\** BINSKIM : error ERR997.NoValidAnalysisTargets : No valid analysis targets were specified. This happens because the 1ES template applies sdl.binskim config globally to all jobs. The analyzeTargetGlob pattern 'bin\Build*\**' only matches build/test job output directories, but the MSI conversion job has no bin\Build*\ directory — it produces output under bin\msi-nupkgs\ instead. Add bin\msi-nupkgs\** to the glob so the MSI conversion job has valid scan targets. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1047b55 commit 0f6a01b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build-tools/automation/azure-pipelines.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,12 @@ extends:
6060
enableAllTools: false
6161
binskim:
6262
scanOutputDirectoryOnly: true
63-
# Only scan actual build output, not test assemblies under bin/Test*
64-
analyzeTargetGlob: bin\Build*\**
63+
# Scan build output and MSI conversion output, but not test assemblies
64+
# under bin/Test* which produce BA2021 false positives.
65+
# Both patterns are needed because the 1ES template applies sdl config
66+
# globally: build/test jobs produce bin\Build*\ output, while the
67+
# "Convert NuGet to MSI" job only produces bin\msi-nupkgs\ output.
68+
analyzeTargetGlob: bin\Build*\**;bin\msi-nupkgs\**
6569
codeql:
6670
compiled:
6771
enabled: false

0 commit comments

Comments
 (0)