diff --git a/.github/workflows/tf-module-actions.yml b/.github/workflows/tf-module-actions.yml index 12e6ca4..d936fe3 100644 --- a/.github/workflows/tf-module-actions.yml +++ b/.github/workflows/tf-module-actions.yml @@ -20,3 +20,17 @@ jobs: output-file: README.md output-method: inject git-push: "true" + - 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'