File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 4343
4444 scan_container :
4545 runs-on : ubuntu-latest
46+ permissions :
47+ security-events : write # Required for uploading SARIF results
48+ contents : read
4649
4750 steps :
4851 - name : Checkout code
5861 format : ' sarif'
5962 output : ' trivy-results.sarif'
6063 severity : ' CRITICAL,HIGH'
64+ scanners : ' vuln' # Only scan vulnerabilities, not secrets (avoids false positives in vendored gems)
6165
6266 - name : Upload Trivy results to GitHub Security tab
6367 uses : github/codeql-action/upload-sarif@v3
Original file line number Diff line number Diff line change @@ -724,10 +724,10 @@ brew install trivy # macOS
724724
725725# Build and scan image (CRITICAL and HIGH severity only, like CI)
726726docker build -t clinch:local .
727- trivy image --severity CRITICAL,HIGH clinch:local
727+ trivy image --severity CRITICAL,HIGH --scanners vuln clinch:local
728728
729729# Scan only for fixable vulnerabilities
730- trivy image --severity CRITICAL,HIGH --ignore-unfixed clinch:local
730+ trivy image --severity CRITICAL,HIGH --scanners vuln -- ignore-unfixed clinch:local
731731` ` `
732732
733733**CI/CD Integration:**
You can’t perform that action at this time.
0 commit comments