Skip to content

Commit

Permalink
Merge pull request #2960 from newrelic/add-trivy-yaml
Browse files Browse the repository at this point in the history
Add trivy.yaml file
  • Loading branch information
kaylareopelle authored Nov 19, 2024
2 parents 2e43f6e + fb2ceec commit 448f085
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
1 change: 1 addition & 0 deletions .build_ignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ lefthook.yml
log/
README.md
test/
trivy.yaml
lib/tasks/bump_version.rb
lib/tasks/coverage_report.rb
lib/tasks/multiverse.rake
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,21 @@ jobs:
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # tag v0.28.0
with:
scan-type: fs
scan-ref: .
trivy-config: trivy.yaml
format: table
exit-code: 1
ignore-unfixed: true
severity: CRITICAL,HIGH,MEDIUM,LOW
cache: false

- name: Run Trivy in report mode
# Only generate sarif when running nightly on the dev branch.
if: ${{ github.event_name == 'schedule' }}
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # tag v0.28.0
with:
scan-type: fs
scan-ref: .
trivy-config: trivy.yaml
format: sarif
output: trivy-results.sarif
ignore-unfixed: true
severity: 'CRITICAL,HIGH,MEDIUM,LOW'
cache: false

- name: Upload Trivy scan results to GitHub Security tab
# Only upload sarif when running nightly on the dev branch.
Expand Down
12 changes: 12 additions & 0 deletions trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
db:
repository:
- mirror.gcr.io/aquasec/trivy-db:2

severities:
- CRITICAL
- HIGH
- MEDIUM
- LOW

vulnerability:
ignore-unfixed: true

0 comments on commit 448f085

Please sign in to comment.