Skip to content

Commit

Permalink
Sync eng/common directory with azure-sdk-tools for PR 2740 (#27034)
Browse files Browse the repository at this point in the history
* Change credscan to use v3 and enable to scan entire repo

* Check string emtpy

* add quotes around parameters

Co-authored-by: sima-zhu <sizhu@microsoft.com>
  • Loading branch information
2 people authored and rickle-msft committed Feb 11, 2022
1 parent 541bcf6 commit 3139364
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions eng/common/pipelines/templates/steps/credscan.yml
Expand Up @@ -12,15 +12,17 @@ steps:
$changedFiles | ForEach-Object { Add-Content -Path "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$_"}
}
else {
Set-Content "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/sdk/${{ parameters.ServiceDirectory }}"
$scanFolder = ""
if ("${{ parameters.ServiceDirectory }}" -ne '') {
$scanFolder = "sdk/${{ parameters.ServiceDirectory }}"
}
Set-Content "${{ parameters.SourceDirectory }}/credscan.tsv" -Value "${{ parameters.SourceDirectory }}/$scanFolder"
}
Get-Content "${{ parameters.SourceDirectory }}/credscan.tsv"
displayName: CredScan setup
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
displayName: CredScan running
inputs:
toolMajorVersion: V2
toolVersion: latest
scanFolder: "${{ parameters.SourceDirectory }}/credscan.tsv"
suppressionsFile: ${{ parameters.SuppressionFilePath }}
- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
Expand Down

0 comments on commit 3139364

Please sign in to comment.