forked from AErmie/DevSecOps
-
Notifications
You must be signed in to change notification settings - Fork 4
/
snyk_securityScan-pipeline.yml
58 lines (52 loc) · 1.65 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
trigger: none
pr: 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: SnykContainerJob
displayName: Run Snyk Container Security Scan
steps:
# - task: Docker@2
# displayName: Build Container
# inputs:
# containerRegistry: $(ACRConnectionName)
# repository: $(ACRRepository)
# command: build
# Dockerfile: $(pathToDockerFile)
# tags: |
# $(Build.BuildId)
- script: |
docker image pull docker.io/library/node:19
displayName: Pull Node Docker Image
- task: SnykSecurityScan@1
displayName: Run Snyk Container Security Scan
inputs:
serviceConnectionEndpoint: 'Snyk-DevSecOps'
testType: 'container'
dockerImageName: docker.io/library/node:19
# dockerfilePath: 'PATHTODOCKERFILE'
monitorWhen: 'never' # "always", "onIssuesFound", or "never"
failOnIssues: true
projectName: 'DevSecOpsDemo'
organization: 'aermie'
- job: SnykApplicationJob
displayName: Run Snyk Application Security Scan
steps:
- task: SnykSecurityScan@1
displayName: Run Snyk Application Security Scan
inputs:
serviceConnectionEndpoint: 'Snyk-DevSecOps'
testType: 'app'
targetFile: './Application-Source-Code'
monitorWhen: 'always'
failOnIssues: true
projectName: 'DevSecOps-App'
organization: 'aermie'