55 pull_request :
66
77jobs :
8- build :
9- runs-on : ubuntu-latest
10- steps :
11- - uses : actions/checkout@v4
12- - uses : actions/setup-java@v4
13- with :
14- distribution : adopt
15- java-version : 21
16- check-latest : true
17- - name : Cached Gradle packages
18- uses : actions/cache@v4
19- with :
20- key : ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
21- path : |
22- ~/.gradle/caches
23- ~/.gradle/wrapper
24- - run : ( ./gradlew build -x test )
25- name : " Executing build"
26- unit-test :
27- runs-on : ubuntu-latest
28- needs : build
29- steps :
30- - uses : actions/checkout@v4
31- - uses : actions/setup-java@v4
32- with :
33- distribution : adopt
34- java-version : 21
35- check-latest : true
36- - name : Cached Gradle packages
37- uses : actions/cache@v4
38- with :
39- key : ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
40- path : |
41- ~/.gradle/caches
42- ~/.gradle/wrapper
43- - run : ( ./gradlew test )
44- name : " Executing tests"
45- - run : ( ./gradlew jacocoTestCoverageVerification )
46- name : " Code coverage"
47- mutation-test :
48- runs-on : ubuntu-latest
49- needs : build
50- steps :
51- - uses : actions/checkout@v4
52- - uses : actions/setup-java@v4
53- with :
54- distribution : adopt
55- java-version : 21
56- check-latest : true
57- - name : Cached Gradle packages
58- uses : actions/cache@v4
59- with :
60- key : ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
61- path : |
62- ~/.gradle/caches
63- ~/.gradle/wrapper
64- - run : ( ./gradlew pitest )
65- name : " Executing mutation tests"
66- dependency-vulnerability-analysis :
67- runs-on : ubuntu-latest
68- needs : build
69- steps :
70- - uses : actions/checkout@v4
71- - uses : actions/setup-java@v4
72- with :
73- distribution : adopt
74- java-version : 21
75- check-latest : true
76- - name : Cached Gradle packages
77- uses : actions/cache@v4
78- with :
79- key : ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
80- path : |
81- ~/.gradle/caches
82- ~/.gradle/wrapper
83- - run : ( ./gradlew dependencyCheckAnalyze -PUseNVDKey )
84- name : " Executing dependency vulnerability checks"
85- env :
86- NVD_API_KEY : ${{ secrets.NVD_API_KEY }}
8+ # build:
9+ # runs-on: ubuntu-latest
10+ # steps:
11+ # - uses: actions/checkout@v4
12+ # - uses: actions/setup-java@v4
13+ # with:
14+ # distribution: adopt
15+ # java-version: 21
16+ # check-latest: true
17+ # - name: Cached Gradle packages
18+ # uses: actions/cache@v4
19+ # with:
20+ # key: ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
21+ # path: |
22+ # ~/.gradle/caches
23+ # ~/.gradle/wrapper
24+ # - run: ( ./gradlew build -x test )
25+ # name: "Executing build"
26+ # unit-test:
27+ # runs-on: ubuntu-latest
28+ # # needs: build
29+ # steps:
30+ # - uses: actions/checkout@v4
31+ # - uses: actions/setup-java@v4
32+ # with:
33+ # distribution: adopt
34+ # java-version: 21
35+ # check-latest: true
36+ # - name: Cached Gradle packages
37+ # uses: actions/cache@v4
38+ # with:
39+ # key: ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
40+ # path: |
41+ # ~/.gradle/caches
42+ # ~/.gradle/wrapper
43+ # - run: ( ./gradlew test )
44+ # name: "Executing tests"
45+ # - run: ( ./gradlew jacocoTestCoverageVerification )
46+ # name: "Code coverage"
47+ # mutation-test:
48+ # runs-on: ubuntu-latest
49+ # # needs: build
50+ # steps:
51+ # - uses: actions/checkout@v4
52+ # - uses: actions/setup-java@v4
53+ # with:
54+ # distribution: adopt
55+ # java-version: 21
56+ # check-latest: true
57+ # - name: Cached Gradle packages
58+ # uses: actions/cache@v4
59+ # with:
60+ # key: ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
61+ # path: |
62+ # ~/.gradle/caches
63+ # ~/.gradle/wrapper
64+ # - run: ( ./gradlew pitest )
65+ # name: "Executing mutation tests"
66+ # dependency-vulnerability-analysis:
67+ # runs-on: ubuntu-latest
68+ # # needs: build
69+ # steps:
70+ # - uses: actions/checkout@v4
71+ # - uses: actions/setup-java@v4
72+ # with:
73+ # distribution: adopt
74+ # java-version: 21
75+ # check-latest: true
76+ # - name: Cached Gradle packages
77+ # uses: actions/cache@v4
78+ # with:
79+ # key: ${{ runner.os }}-v1-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
80+ # path: |
81+ # ~/.gradle/caches
82+ # ~/.gradle/wrapper
83+ # - run: ( ./gradlew dependencyCheckAnalyze -PUseNVDKey )
84+ # name: "Executing dependency vulnerability checks"
85+ # env:
86+ # NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
8787 sast-code-snyk :
8888 runs-on : ubuntu-latest
89- needs : build
89+ # needs: build
9090 steps :
9191 - uses : actions/checkout@v4
9292 - name : Run Snyk to static code analysis for vulnerabilities
9393 uses : snyk/actions/maven-3-jdk-21@master
9494 env :
9595 SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
96+ with :
97+ args : --severity-threshold=high
9698 sast-dockerfile-trivy-hadolint :
9799 runs-on : ubuntu-latest
98- needs : build
100+ # needs: build
99101 steps :
100102 - uses : actions/checkout@v4
101103 -
uses :
hadolint/[email protected] 102104 with :
103105 dockerfile : Dockerfile
104106 failure-threshold : error
105- - name : Run Trivy vulnerability scanner in IaC mode
107+ - name : Run Trivy vulnerability for Dockerfile
106108 uses :
aquasecurity/[email protected] 107109 with :
108110 scan-type : config
109- scanners : misconfig
110- exit-code : ' 1'
111- severity : ' CRITICAL,HIGH'
111+ scan-ref : ' ./'
112+ exit-code : 1
113+ severity : ' CRITICAL,HIGH'
114+ trivy-config : ./config/trivy/trivy.yaml
0 commit comments