Skip to content

Commit b063cde

Browse files
Use WIF to connect storage container (Azure#5525)
Moving away from SAS tokens for connecting to storage so switching to using a Workload Identity Federation connection to the container to download the needed files. Co-authored-by: Wes Haggard <[email protected]>
1 parent 9f30ba4 commit b063cde

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

eng/common/pipelines/templates/steps/policheck.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@ parameters:
22
ExclusionDataBaseFileName: ''
33
TargetDirectory: ''
44
PublishAnalysisLogs: false
5-
PoliCheckBlobSAS: "$(azuresdk-policheck-blob-SAS)"
65
ExclusionFilePath: "$(Build.SourcesDirectory)/eng/guardian-tools/policheck/PolicheckExclusions.xml"
76

87
steps:
9-
- pwsh: |
10-
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb?${{ parameters.PoliCheckBlobSAS }}" `
11-
"$(Build.BinariesDirectory)"
12-
displayName: 'Download PoliCheck Exclusion Database'
8+
- task: AzurePowerShell@5
9+
displayName: 'Download Policheck Exclusion Database'
10+
inputs:
11+
azureSubscription: 'Azure SDK Artifacts'
12+
ScriptType: 'InlineScript'
13+
azurePowerShellVersion: LatestVersion
14+
pwsh: true
15+
Inline: |
16+
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb" "$(Build.BinariesDirectory)"
17+
env:
18+
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'
1319

1420
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
1521
displayName: 'Run PoliCheck'
@@ -33,4 +39,4 @@ steps:
3339

3440
- ${{ if eq(parameters.PublishAnalysisLogs, 'true') }}:
3541
- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
36-
displayName: 'Publish Security Analysis Logs'
42+
displayName: 'Publish Security Analysis Logs'

0 commit comments

Comments
 (0)