forked from AErmie/DevSecOps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snyk-securityScan-pipeline.yml
39 lines (35 loc) · 1.06 KB
/
snyk-securityScan-pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
trigger: none
pool:
vmImage: 'ubuntu-latest'
variables:
pathToDockerFile: 'Dockerfile'
ACRConnectionName: 'AzureContainerRegistry-DevSecOps'
ACRLoginServer: 'adinermieacr.azurecr.io'
ACRRepository: 'eshoponweb'
stages:
- stage: QualityCheckStage
displayName: Quality Check Stage
jobs:
- job: SnykJob
displayName: Run Snyk Security Scan
steps:
- task: Docker@2
displayName: Build Container
inputs:
containerRegistry: $(ACRConnectionName)
repository: $(ACRRepository)
command: build
Dockerfile: $(pathToDockerFile)
tags: |
$(Build.BuildId)
- task: SnykSecurityScan@0
displayName: Run Snyk Security Scan
inputs:
serviceConnectionEndpoint: 'Snyk-DevSecOps'
testType: 'container'
dockerImageName: '$(ACRLoginServer)/$(ACRRepository):$(Build.BuildId)'
dockerfilePath: 'Dockerfile'
monitorOnBuild: true
failOnIssues: true
projectName: 'DevSecOpsDemo'
organization: 'AErmie'