-
Notifications
You must be signed in to change notification settings - Fork 40
100 lines (81 loc) · 2.18 KB
/
security.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: "Security Audit"
on:
push:
branches: [ develop, master ]
pull_request:
branches: [ develop ]
schedule:
- cron: '23 4 * * 1'
jobs:
codeql:
name: CodeQL
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
env:
JAVA_DISTRIBUTION: temurin
JAVA_VERSION: 21
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
cache: 'maven'
- name: Verify Maven and Java
run: |
mvn --version
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: 'java'
- name: Build package
run: |
mvn --quiet -B -U --fail-fast -DskipTests package
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
snyk:
name: Snyk (Maven)
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Perform Snyk Check (Maven)
uses: snyk/actions/maven@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
args: --severity-threshold=critical
snyk-docker:
name: Snyk (Docker)
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
env:
PUBLIC_IMAGE: fairdata/fairdatapoint
TAG_DEVELOP: develop
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Docker build
run: |
docker pull $PUBLIC_IMAGE:$TAG_DEVELOP
docker build --cache-from $PUBLIC_IMAGE:$TAG_DEVELOP -t fdp:snyk-test -f Dockerfile.build .
- name: Perform Snyk Check (Docker)
uses: snyk/actions/docker@master
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
image: fdp:snyk-test
args: --severity-threshold=critical