Skip to content

Commit

Permalink
fix: uploading trivy scan
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielg2020 committed May 15, 2024
1 parent cc08ba1 commit f5c437f
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/security-terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,18 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Setup Trivy
- name: Scan Terraform
uses: aquasecurity/trivy-action@master
with:
scan-type: "config"
hide-progress: true
format: "sarif"
output: "trivy-results.sarif"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"

- name: Scan Terraform
run: |
find infra/terrform -type d -exec trivy config --severity HIGH,CRITICAL --exit-code 1 --format table {} \;
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "trivy-results.sarif"

0 comments on commit f5c437f

Please sign in to comment.