Skip to content

Commit

Permalink
Add CredScan task to ADO pipeline (microsoft#5517)
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyashton authored Aug 9, 2023
1 parent 6457659 commit 00e2336
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,23 @@ jobs:
parameters:
perf_or_release: ${{ variables['perf_or_release'] }}
perf_tests: ${{ variables['perf_tests'] }}

- job: CredScan
variables:
Codeql.SkipTaskAutoInjection: true
skipComponentGovernanceDetection: true
pool:
vmImage: "ubuntu-20.04"
steps:
# Scan for credentials in the repo
- task: CredScan@3
inputs:
suppressionsFile: .gdn/CredScanSuppressions.json
# To suppress folders, rather than individual files, we require both of the following options
debugMode: true
folderSuppression: true

# Break the build if any credentials (or other Guardian scans) find issues
- task: PostAnalysis@2
inputs:
GdnBreakAllTools: true
13 changes: 13 additions & 0 deletions .gdn/CredScanSuppressions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"tool": "Credential Scanner",
"suppressions": [
{
"folder": ["3rdparty"],
"_justification": "Ignore 3rdparty test credentials"
},
{
"folder": ["tests/testdata"],
"_justification": "Ignore test credentials"
}
]
}

0 comments on commit 00e2336

Please sign in to comment.