Skip to content

Commit

Permalink
Update azure-pipelines.yml for Azure Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
akannan1087 committed Jan 9, 2025
1 parent acef259 commit 4ea0477
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,20 @@ stages:
targetType: inline
script: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh
- task: Bash@3
displayName: "Download JUnit Template"
inputs:
targetType: inline
script: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/junit.tpl -o junit.tpl
# Run Trivy Scan
- task: Bash@3
displayName: "Run Trivy Scan"
inputs:
targetType: inline
script: |
./bin/trivy image --format template --template "@contrib/junit.tpl" --output trivy-report.xml --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed $(containerRegistry)/$(imageRepository):$(tag)
./bin/trivy image --format template --template "junit.tpl" --output trivy-report.xml --severity HIGH,CRITICAL,MEDIUM --ignore-unfixed $(containerRegistry)/$(imageRepository):$(tag)
# Step 4: Publish Trivy XML Report as Artifact
- task: PublishPipelineArtifact@1
displayName: "Publish Trivy XML Report"
Expand Down

0 comments on commit 4ea0477

Please sign in to comment.