Skip to content

Commit 492682b

Browse files
Copilotpelikhan
andauthored
chore: remove trivy (#22065)
* Initial plan * chore: remove all uses and references to trivy Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/cfea477e-ce64-47b2-b393-49460ee42bec --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
1 parent 78ef8b9 commit 492682b

3 files changed

Lines changed: 6 additions & 32 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ test-runs/
149149
gosec-report.json
150150
gosec-results.sarif
151151
govulncheck-results.sarif
152-
trivy-results.sarif
153152

154153
# Generated action files - kept in .gitignore as build artifacts
155154
# Note: If workflows fail due to missing js/ files, these may need to be committed

DEVGUIDE.md

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ make clean # Remove binaries, coverage files, security reports, etc.
139139

140140
#### Run security scans
141141
```bash
142-
make security-scan # Run gosec, govulncheck, and trivy
142+
make security-scan # Run gosec and govulncheck
143143
```
144144
**When to use**: Before releases or when checking for vulnerabilities.
145145

@@ -815,20 +815,18 @@ The project includes automated security scanning to detect vulnerabilities, code
815815
### Running Security Scans Locally
816816

817817
```bash
818-
# Run all security scans (gosec, govulncheck, trivy)
818+
# Run all security scans (gosec, govulncheck)
819819
make security-scan
820820

821821
# Run individual scans
822822
make security-gosec # Go security linter
823823
make security-govulncheck # Go vulnerability database check
824-
make security-trivy # Filesystem/dependency scanner (requires trivy)
825824
```
826825

827826
### Security Scan Tools
828827

829828
- **gosec**: Static analysis tool for Go that detects security issues in source code
830829
- **govulncheck**: Official Go tool that checks for known vulnerabilities in dependencies
831-
- **trivy**: Comprehensive scanner for filesystem vulnerabilities, misconfigurations, and secrets
832830

833831
### Interpreting Results
834832

@@ -842,11 +840,6 @@ make security-trivy # Filesystem/dependency scanner (requires trivy)
842840
- Indicates if vulnerable code paths are actually called
843841
- Update affected dependencies to resolve issues
844842

845-
#### Trivy Results
846-
- Displays HIGH and CRITICAL severity findings
847-
- Covers Go dependencies, npm packages, and configuration files
848-
- Shows CVE details and available fix versions
849-
850843
### Suppressing False Positives
851844

852845
#### Gosec
@@ -864,13 +857,6 @@ secret := "example" // Known test value
864857
- No inline suppression available
865858
- Update dependencies or document accepted risks in security review
866859

867-
#### Trivy
868-
- Use `.trivyignore` file to exclude specific CVEs:
869-
```text
870-
# .trivyignore
871-
CVE-2023-XXXXX # False positive: not exploitable in our usage
872-
```
873-
874860
### CI/CD Integration
875861

876862
Security scans run automatically on:

Makefile

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ test-security:
187187
go test -v -timeout=3m -run '^FuzzYAML|^FuzzTemplate|^FuzzInput|^FuzzNetwork|^FuzzSafeJob' ./pkg/workflow/...
188188
@echo "✓ Security regression tests passed"
189189

190-
# Security scanning with gosec, govulncheck, and trivy
190+
# Security scanning with gosec and govulncheck
191191
.PHONY: security-scan
192-
security-scan: security-gosec security-govulncheck security-trivy
192+
security-scan: security-gosec security-govulncheck
193193
@echo "✓ All security scans completed"
194194

195195
.PHONY: security-gosec
@@ -211,16 +211,6 @@ security-govulncheck:
211211
govulncheck ./...
212212
@echo "✓ Govulncheck complete"
213213

214-
.PHONY: security-trivy
215-
security-trivy:
216-
@echo "Running trivy filesystem scan..."
217-
@if command -v trivy >/dev/null 2>&1; then \
218-
trivy fs --severity HIGH,CRITICAL .; \
219-
else \
220-
echo "⚠ Trivy not installed. Install with: brew install trivy (macOS) or see https://aquasecurity.github.io/trivy/latest/getting-started/installation/"; \
221-
fi
222-
@echo "✓ Trivy scan complete"
223-
224214
# Test JavaScript files
225215
.PHONY: test-js
226216
test-js: build-js
@@ -268,7 +258,7 @@ clean:
268258
@# Remove SBOM files
269259
rm -f sbom.spdx.json sbom.cdx.json
270260
@# Remove security scan reports
271-
rm -f gosec-report.json gosec-results.sarif govulncheck-results.sarif trivy-results.sarif
261+
rm -f gosec-report.json gosec-results.sarif govulncheck-results.sarif
272262
@# Remove downloaded logs (but keep .gitignore)
273263
@if [ -d .github/aw/logs ]; then \
274264
find .github/aw/logs -type f ! -name '.gitignore' -delete 2>/dev/null || true; \
@@ -810,10 +800,9 @@ help:
810800
@echo " lint-errors - Lint error messages for quality compliance"
811801
@echo " check-file-sizes - Check Go file sizes and function counts (informational)"
812802
@echo " check-validator-sizes - Check *_validation.go files against the 768-line hard limit"
813-
@echo " security-scan - Run all security scans (gosec, govulncheck, trivy)"
803+
@echo " security-scan - Run all security scans (gosec, govulncheck)"
814804
@echo " security-gosec - Run gosec Go security scanner"
815805
@echo " security-govulncheck - Run govulncheck for known vulnerabilities"
816-
@echo " security-trivy - Run trivy filesystem scanner"
817806
@echo " actionlint - Validate workflows with actionlint (depends on build)"
818807
@echo " validate-workflows - Validate compiled workflow lock files (depends on build)"
819808
@echo " install - Install binary locally"

0 commit comments

Comments
 (0)