Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update policheck to use newer auth #363

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions eng/common/pipelines/templates/steps/policheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ parameters:
ExclusionDataBaseFileName: ''
TargetDirectory: ''
PublishAnalysisLogs: false
PoliCheckBlobSAS: "$(azuresdk-policheck-blob-SAS)"
ExclusionFilePath: "$(Build.SourcesDirectory)/eng/guardian-tools/policheck/PolicheckExclusions.xml"

steps:
- pwsh: |
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb?${{ parameters.PoliCheckBlobSAS }}" `
"$(Build.BinariesDirectory)"

# Output downloaded files
Get-ChildItem $(Build.BinariesDirectory) | Select-Object -Property Mode,Length,Name
displayName: 'Download PoliCheck Exclusion Database'
- task: AzurePowerShell@5
displayName: 'Download Policheck Exclusion Database'
inputs:
azureSubscription: 'Azure SDK Artifacts'
ScriptType: 'InlineScript'
azurePowerShellVersion: LatestVersion
pwsh: true
Inline: |
azcopy copy "https://azuresdkartifacts.blob.core.windows.net/policheck/${{ parameters.ExclusionDataBaseFileName }}.mdb" "$(Build.BinariesDirectory)"
env:
AZCOPY_AUTO_LOGIN_TYPE: 'PSCRED'

- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2
displayName: 'Run PoliCheck'
Expand All @@ -36,4 +39,4 @@ steps:

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