-
Notifications
You must be signed in to change notification settings - Fork 29
/
anchore-pipeline.yml
54 lines (45 loc) · 1.51 KB
/
anchore-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
trigger: none
pr: none
pool:
vmImage: 'ubuntu-latest'
variables:
WebContainerImageName: eshopwebmvc
WebContainerDockerfile: $(System.DefaultWorkingDirectory)/Application-Source-Code/src/Web/Dockerfile
APIContainerImageName: eshoppublicapi
dockerRegistryEndpoint: 'AzureContainerRegistry-DevSecOps'
stages:
- stage: QualityCheckStage
displayName: Quality Check Stage
jobs:
- job: AnchoreJob
displayName: Run Anchore Scan
steps:
# - template: templates/docker-compose-build.yml
- script: |
docker image pull node:19
displayName: Pull Node Docker Image
- task: Anchore@0
displayName: Run Anchore Container Image Scan
inputs:
image: docker.io/library/node:19
# customPolicyPath: '.anchore/policy.json'
# dockerfile: $(WebContainerDockerfile)
includeAppPackages: true
printVulnerabilityReport: true
failBuild: true
debug: true
# - script: |
# echo $(policyStatus)
# echo $(billOfMaterials)
# cat $(billOfMaterials)
# echo $(vulnerabilities)
# cat $(vulnerabilities)
# displayName: Output Scan Results
# condition: succeededOrFailed()
# # Publish the Anchore report as an artifact to Azure Pipelines
# - task: PublishBuildArtifacts@1
# displayName: 'Publish Artifact: Anchore Report'
# condition: succeededOrFailed()
# inputs:
# PathtoPublish: '$(System.DefaultWorkingDirectory)/anchore-reports/'
# ArtifactName: AnchoreReport