Skip to content

1.0.44 Automating Trivy Scan #2

1.0.44 Automating Trivy Scan

1.0.44 Automating Trivy Scan #2

Workflow file for this run

name: run-trivy
on:
push:
branches:
- development
- main
pull_request:
jobs:
build:
name: Run Trivy
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/trivy-action@master
with:
scan-type: 'config'
hide-progress: false
format: 'sarif'
output: 'trivy-results.sarif'
exit-code: '1'
ignore-unfixed: true
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'