Skip to content

Commit cdb776d

Browse files
authored
Merge pull request #8594 from dotnet/marcpopMSFT-binskimworkaround
Change binskim to filter and only run on build legs
2 parents 2ab364d + 8c22ce0 commit cdb776d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

azure-pipelines.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ extends:
5959
enabled: true
6060
tsa:
6161
enabled: true
62-
binskim:
63-
analyzeTargetGlob: +:f|**\*.dll;+:f|**\*.exe;
6462
stages:
6563
- stage: build
6664
displayName: Build
@@ -89,6 +87,14 @@ extends:
8987
enableInternalSources: true
9088
enableTelemetry: true
9189
helixRepo: dotnet/templating
90+
templateContext:
91+
sdl:
92+
binskim:
93+
analyzeTargetGlob: +:f|artifacts\bin\**\*.dll;+:f|artifacts\bin\**\*.exe;
94+
# WORKAROUND: BinSkim requires the folder exist prior to scanning.
95+
preSteps:
96+
- powershell: New-Item -ItemType Directory -Path $(Build.SourcesDirectory)/artifacts/bin -Force
97+
displayName: Create artifacts/bin directory
9298
jobs:
9399
- ${{ each config in parameters.buildConfigurations }}:
94100
- job: Windows_NT_${{ config.buildConfig }}

0 commit comments

Comments
 (0)