File tree Expand file tree Collapse file tree 2 files changed +32
-17
lines changed Expand file tree Collapse file tree 2 files changed +32
-17
lines changed Original file line number Diff line number Diff line change 36
36
- name : Build Image
37
37
run : make build
38
38
39
-
40
- security :
41
- container :
42
- image : litmuschaos/snyk:1.0
43
- volumes :
44
- - /home/runner/work/_actions/:/home/runner/work/_actions/
45
- runs-on : ubuntu-latest
46
- steps :
47
- - uses : actions/checkout@v2
48
- - uses : snyk/actions/setup@master
49
- - name : Install packages
50
- run : pip3 install -r requirements.txt
51
- - run : snyk auth ${SNYK_TOKEN}
52
- - name : Snyk monitor
53
- run : snyk test --file=requirements.txt --command=python3
54
-
55
-
56
39
trivy :
57
40
runs-on : ubuntu-latest
58
41
steps :
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Security Scan
3
+ on :
4
+ workflow_dispatch :
5
+
6
+ jobs :
7
+ snyk :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - uses : actions/checkout@master
11
+ - name : Run Snyk to check for vulnerabilities
12
+ uses : snyk/actions/python@master
13
+ env :
14
+ SNYK_TOKEN : ${{ secrets.SNYK_TOKEN }}
15
+
16
+ trivy :
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@master
20
+ - name : Build an image from Dockerfile
21
+ run : |
22
+ docker build -f build/Dockerfile -t docker.io/litmuschaos/py-runner:${{ github.sha }} . --build-arg TARGETARCH=amd64
23
+
24
+ - name : Run Trivy vulnerability scanner
25
+ uses : aquasecurity/trivy-action@master
26
+ with :
27
+ image-ref : ' docker.io/litmuschaos/py-runner:${{ github.sha }}'
28
+ format : ' table'
29
+ exit-code : ' 1'
30
+ ignore-unfixed : true
31
+ vuln-type : ' os,library'
32
+ severity : ' CRITICAL,HIGH'
You can’t perform that action at this time.
0 commit comments