Created
November 30, 2020 17:24
-
-
Save CyprienLecallier/827a510a5a2eeaa9dac5019c284cfd1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
steps: | |
- script: | | |
sudo apt-get install rpm | |
wget https://github.com/aquasecurity/trivy/releases/download/v$(trivyVersion)/trivy_$(trivyVersion)_Linux-64bit.deb | |
sudo dpkg -i trivy_$(trivyVersion)_Linux-64bit.deb | |
trivy -v | |
displayName: 'Download and install Trivy' | |
- task: CmdLine@2 | |
displayName: "Run trivy scan" | |
inputs: | |
script: | | |
trivy image --exit-code 0 --severity LOW,MEDIUM,HIGH acr01.azurecr.io/image_name:$(Build.SourceVersion) | |
trivy image --exit-code 1 --severity CRITICAL acr01.azurecr.io/image_name:$(Build.SourceVersion) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment