Skip to content

focus on trivy, which presumably does everything tfscan does; also tr… #2

focus on trivy, which presumably does everything tfscan does; also tr…

focus on trivy, which presumably does everything tfscan does; also tr… #2

Workflow file for this run

name: 'static security scan - Trivy + tfsec'
# scans 'main' branch for vulnerabilities; pushes results to GitHub Security tab
on:
push:
branches:
- '**'
jobs:
security-scan:
name: secruity-scan
runs-on: ubuntu-latest
# q: what version of Terraform does this use??
steps:
- name: Clone repo
uses: actions/checkout@v3
# see: https://github.com/aquasecurity/trivy-action
- name: Run Trivy vulnerability scanner in IaC mode
uses: aquasecurity/[email protected]
with:
scan-type: 'config'
hide-progress: true
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@v3
with:
sarif_file: 'trivy-results.sarif'
- name: Generate Security Report
uses: peter-murray/github-security-report-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}