File tree 2 files changed +29
-2
lines changed
2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ name: CI PRs
3
3
on :
4
4
pull_request :
5
5
6
+ env :
7
+ TRIVY_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-db,aquasec/trivy-db,ghcr.io/aquasecurity/trivy-db
8
+ TRIVY_JAVA_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-java-db,aquasec/trivy-java-db,ghcr.io/aquasecurity/trivy-java-db
9
+
6
10
jobs :
7
11
build :
8
12
runs-on : ubuntu-latest
17
21
timeout-minutes : 75
18
22
run : |
19
23
./mvnw -B -s .github/settings.xml -Pdocs clean install
24
+ scan :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+ - name : Run Trivy vulnerability scanner in repo mode
29
+ uses : aquasecurity/trivy-action@master
30
+ with :
31
+ scan-type : ' fs'
32
+ ignore-unfixed : true
33
+ format : ' table'
34
+ severity : ' CRITICAL,HIGH'
35
+ - name : ' Scanned'
36
+ shell : bash
37
+ run : echo "::info ::Scanned"
38
+ done :
39
+ runs-on : ubuntu-latest
40
+ needs : [ scan, build ]
41
+ steps :
42
+ - name : ' Done'
43
+ shell : bash
44
+ run : echo "::info ::Done"
Original file line number Diff line number Diff line change 5
5
inputs :
6
6
enableSecurityScan :
7
7
type : boolean
8
- default : false
8
+ default : true
9
9
description : ' Enable security scan with Trivy'
10
10
push :
11
11
branches :
15
15
16
16
env :
17
17
MAVEN_THREADS : ' -T 1'
18
+ TRIVY_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-db,aquasec/trivy-db,ghcr.io/aquasecurity/trivy-db
19
+ TRIVY_JAVA_DB_REPOSITORY : public.ecr.aws/aquasecurity/trivy-java-db,aquasec/trivy-java-db,ghcr.io/aquasecurity/trivy-java-db
18
20
19
21
jobs :
20
22
build :
@@ -193,7 +195,7 @@ jobs:
193
195
GCR_JSON_KEY : ${{ secrets.GCR_JSON_KEY }}
194
196
scan :
195
197
runs-on : ubuntu-latest
196
- if : ${{ inputs.enableSecurityScan != null && inputs.enableSecurityScan }}
198
+ if : ${{ inputs.enableSecurityScan == null || inputs.enableSecurityScan }}
197
199
steps :
198
200
- uses : actions/checkout@v4
199
201
- name : Run Trivy vulnerability scanner in repo mode
You can’t perform that action at this time.
0 commit comments