File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ # uses Trivy to scan every pull request, rejecting those with severe, fixable vulnerabilities
2+ # scans on PR to master and weekly with same behavior
3+ # cron scan is same as codeql-analysis job
4+ name : Trivy
5+
6+ on :
7+ pull_request :
8+ branches :
9+ - master
10+ push :
11+ branches :
12+ - master
13+ schedule :
14+ - cron : ' 10 18 * * 2'
15+
16+ jobs :
17+ scan :
18+ runs-on : ubuntu-latest
19+
20+ if : ${{ github.repository == 'CrunchyData/postgres-operator' }}
21+
22+ steps :
23+ - uses : actions/checkout@v3
24+
25+ - name : Log all detected vulnerabilities
26+ uses : aquasecurity/trivy-action@master
27+ with :
28+ scan-type : fs
29+ hide-progress : true
30+
31+ # Upload actionable results to the GitHub Security tab.
32+ # Pull request checks fail according to repository settings.
33+ #
34+ # - https://docs.github.com/en/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github
35+ # - https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning
36+ - name : Report actionable vulnerabilities
37+ uses : aquasecurity/trivy-action@master
38+ with :
39+ scan-type : fs
40+ ignore-unfixed : true
41+ format : ' sarif'
42+ output : ' trivy-results.sarif'
43+
44+ - name : Upload Trivy scan results to GitHub Security tab
45+ uses : github/codeql-action/upload-sarif@v2
46+ with :
47+ sarif_file : ' trivy-results.sarif'
You can’t perform that action at this time.
0 commit comments