File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ inputs:
1313 description : >-
1414 What Trivy data to cache; one or more of restore, save, success, or use.
1515
16+ database :
17+ default : update
18+ description : >-
19+ How Trivy should handle its data; one of update or skip.
20+
1621 setup :
1722 default : v0.57.0,cache
1823 description : >-
6772 env :
6873 TRIVY_CACHE_DIR : >-
6974 ${{ contains(fromJSON(steps.parsed.outputs.cache), 'use') && inputs.cache-directory || '' }}
75+ TRIVY_SKIP_CHECK_UPDATE : ${{ inputs.database == 'skip' }}
76+ TRIVY_SKIP_DB_UPDATE : ${{ inputs.database == 'skip' }}
77+ TRIVY_SKIP_JAVA_DB_UPDATE : ${{ inputs.database == 'skip' }}
7078 run : |
7179 # Run Trivy
7280 trivy '${{ inputs.scan-type }}' '${{ inputs.scan-target }}' || result=$?
Original file line number Diff line number Diff line change 1616 cache :
1717 # Run only one of these jobs at a time across the entire project.
1818 concurrency : { group: trivy-cache }
19+ # Do not fail this workflow when this job fails.
20+ continue-on-error : true
1921
2022 runs-on : ubuntu-latest
2123 steps :
2729 TRIVY_SCANNERS : license,secret,vuln
2830
2931 licenses :
32+ # Run this job after the cache job regardless of its success or failure.
3033 needs : [cache]
34+ if : >-
35+ ${{ !cancelled() }}
36+
3137 runs-on : ubuntu-latest
3238 steps :
3339 - uses : actions/checkout@v4
@@ -46,13 +52,16 @@ jobs:
4652 TRIVY_SCANNERS : license
4753 with :
4854 cache : restore,use
55+ database : skip
4956
5057 vulnerabilities :
51- if : ${{ github.repository == 'CrunchyData/postgres-operator' }}
58+ # Run this job after the cache job regardless of its success or failure.
59+ needs : [cache]
60+ if : >-
61+ ${{ github.repository == 'CrunchyData/postgres-operator' && !cancelled() }}
5262 permissions :
5363 security-events : write
5464
55- needs : [cache]
5665 runs-on : ubuntu-latest
5766 steps :
5867 - uses : actions/checkout@v4
6675 TRIVY_SCANNERS : secret,vuln
6776 with :
6877 cache : restore,use
78+ database : skip
6979
7080 # Produce a SARIF report of actionable results. This step fails only when
7181 # Trivy is unable to scan.
7888 TRIVY_SCANNERS : secret,vuln
7989 with :
8090 cache : use
91+ database : skip
8192 setup : none
8293
8394 # Submit the SARIF report to GitHub code scanning. Pull requests checks
You can’t perform that action at this time.
0 commit comments