ci: Only run vuln scanner when Go deps are updated (#89433)

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
This commit is contained in:
Dave Henderson 2024-06-20 09:07:15 -04:00 committed by GitHub
parent b7df121294
commit 1cc58d19f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,9 +1,14 @@
name: Trivy Scan
on:
pull_request:
# only run on PRs where go.mod/go.sum/etc have been updated
paths:
- go.*
push:
branches:
- main
paths:
- go.*
jobs:
trivy-scan:
@ -25,6 +30,8 @@ jobs:
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
trivyignores: .trivyignore
# for the PR check, ignore JS-related issues
skip-files: 'yarn.lock,package.json'
- name: Run Trivy vulnerability scanner (SARIF)
uses: aquasecurity/trivy-action@0.22.0
with: