Skip to content

Add secret scan ymls #1839

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

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Show file tree
Hide file tree
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: 21 additions & 0 deletions .vsts-ci/misc-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
branches:
include:
- master
- legacy/1.x

pr:
branches:
include:
- master
- legacy/1.x

resources:
- repo: self
clean: true

jobs:
- template: templates/credscan.yml
31 changes: 31 additions & 0 deletions .vsts-ci/templates/credscan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
parameters:
pool: 'Hosted VS2017'
jobName: 'credscan'
displayName: Secret Scan

jobs:
- job: ${{ parameters.jobName }}
pool:
name: ${{ parameters.pool }}

displayName: ${{ parameters.displayName }}

steps:
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')

- task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@2
displayName: 'Scan for secrets'
inputs:
debugMode: false

- task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2
displayName: 'Publish Secret Scan Logs to Build Artifacts'
continueOnError: true

- task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1
displayName: 'Check for failures'
inputs:
CredScan: true
ToolLogsNotFoundAction: Error