Skip to content

Commit 46aa983

Browse files
committed
Don't use secret scanner for trivy - github already does it and it's hard to ignore the test key
1 parent d0d79ee commit 46aa983

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
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
@@ -58,6 +61,7 @@ jobs:
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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,10 +724,10 @@ brew install trivy # macOS
724724
725725
# Build and scan image (CRITICAL and HIGH severity only, like CI)
726726
docker 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:**

0 commit comments

Comments
 (0)