File tree Expand file tree Collapse file tree 5 files changed +90
-65
lines changed Expand file tree Collapse file tree 5 files changed +90
-65
lines changed Original file line number Diff line number Diff line change 38
38
- name : Check
39
39
run : ./gradlew check
40
40
41
- - uses : actions/upload-artifact@v3
41
+ - uses : actions/upload-artifact@v4
42
42
if : always()
43
43
with :
44
44
name : integration-test-logs
Original file line number Diff line number Diff line change
1
+ name : Snyk scheduled Docker base image scan
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 3 * * 1'
6
+ workflow_dispatch :
7
+
8
+ env :
9
+ DOCKER_IMAGE : radarbase/radar-output-restructure
10
+
11
+ jobs :
12
+ security :
13
+ runs-on : ubuntu-latest
14
+
15
+ steps :
16
+ - uses : actions/checkout@v3
17
+
18
+ - name : Run Snyk to check for vulnerabilities
19
+ continue-on-error : true # To make sure that SARIF upload gets called
20
+ uses : snyk/actions/docker@master
21
+ env :
22
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
23
+ with :
24
+ image : ${{ env.DOCKER_IMAGE }}
25
+ # 'exclude-app-vulns' only tests vulnerabilities in the base image.
26
+ # Code base vulnerabilities are tested the scheduled-snyk.yaml action.
27
+ args : >-
28
+ --file=Dockerfile
29
+ --fail-on=upgradable
30
+ --severity-threshold=high
31
+ --policy-path=.snyk
32
+ --exclude-app-vulns
33
+ --org=radar-base
34
+ --sarif-file-output=snyk.sarif
35
+
36
+ # Detected vulnerabilities will appear on Github in Security->Code_scanning_alerts tab
37
+ - name : Upload result to GitHub Code Scanning
38
+ uses : github/codeql-action/upload-sarif@v3
39
+ with :
40
+ sarif_file : snyk.sarif
Original file line number Diff line number Diff line change
1
+ name : Snyk scheduled code base scan
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 2 * * 1'
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ security :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+
15
+ - name : Run Snyk to check for vulnerabilities
16
+ uses : snyk/actions/gradle-jdk17@master
17
+ continue-on-error : true # To make sure that SARIF upload gets called
18
+ env :
19
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
20
+ with :
21
+ args : >-
22
+ --all-projects
23
+ --configuration-matching='^runtimeClasspath$'
24
+ --fail-on=upgradable
25
+ --severity-threshold=high
26
+ --policy-path=.snyk
27
+ --org=radar-base
28
+ --sarif-file-output=snyk.sarif
29
+
30
+ # Detected vulnerabilities will appear on Github in Security->Code_scanning_alerts tab
31
+ - name : Upload result to GitHub Code Scanning
32
+ uses : github/codeql-action/upload-sarif@v3
33
+ with :
34
+ sarif_file : snyk.sarif
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- name : Snyk test
1
+ name : Snyk test on PR commits
2
+
2
3
on :
3
4
pull_request :
4
5
branches :
8
9
jobs :
9
10
security :
10
11
runs-on : ubuntu-latest
12
+
11
13
steps :
12
14
- uses : actions/checkout@v3
13
- - uses : snyk/actions/setup@master
14
- with :
15
- snyk-version : v1.1032.0
16
-
17
- - uses : actions/setup-java@v3
15
+ - uses : actions/setup-node@v3
18
16
with :
19
- distribution : temurin
20
- java-version : 17
21
-
22
- - name : Setup Gradle
23
- uses : gradle/gradle-build-action@v2
17
+ node-version : 16
18
+ cache : npm
24
19
25
20
- name : Run Snyk to check for vulnerabilities
21
+ uses : snyk/actions/gradle-jdk17@master
26
22
env :
27
23
SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
28
- run : >
29
- snyk test
30
- --configuration-matching='^runtimeClasspath$'
31
- --org=radar-base
32
- --policy-path=$PWD/.snyk
33
- --all-projects
34
- --severity-threshold=high
35
- --fail-on=upgradable
24
+ with :
25
+ args : >-
26
+ --all-projects
27
+ --configuration-matching='^runtimeClasspath$'
28
+ --fail-on=upgradable
29
+ --severity-threshold=high
30
+ --policy-path=.snyk
31
+ --org=radar-base
You can’t perform that action at this time.
0 commit comments