File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -36,3 +36,24 @@ stages:
3636 containerRegistry : $(dockerRegistryServiceConnection)
3737 tags : |
3838 $(tag)
39+ # Publish Build Information
40+ - task : Bash@3
41+ displayName : " Log Image Details"
42+ inputs :
43+ targetType : inline
44+ script : |
45+ echo "Pushed Image: $(containerRegistry)/$(imageRepository):$(tag)"
46+ # Install Trivy Scanner on Agent
47+ - task : Bash@3
48+ displayName : " Install Trivy"
49+ inputs :
50+ targetType : inline
51+ script : |
52+ curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh
53+ # Run Trivy Scan
54+ - task : Bash@3
55+ displayName : " Run Trivy Scan"
56+ inputs :
57+ targetType : inline
58+ script : |
59+ ./bin/trivy image --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed $(containerRegistry)/$(imageRepository):$(tag)
You can’t perform that action at this time.
0 commit comments