1
1
name : Sysdig Image Scan
2
2
3
3
on :
4
+ workflow_dispatch :
4
5
push :
5
6
branches :
6
7
- main
7
- workflow_dispatch :
8
8
9
9
jobs :
10
10
image-scan :
11
11
runs-on : ubuntu-latest
12
12
13
- # 🧪 環境変数の注入(Secretsから取得)
14
13
env :
15
14
SECURE_API_TOKEN : ${{ secrets.SECURE_API_TOKEN }}
16
15
SYS_DIG_SECURE_URL : https://app.au1.sysdig.com
@@ -19,39 +18,51 @@ jobs:
19
18
- name : 🛎️ Checkout code
20
19
uses : actions/checkout@v3
21
20
22
- - name : 🏗️ Build Docker images
21
+ - name : 🧱 Build Docker images
23
22
run : |
24
23
docker build -t voting-app ./vote
25
24
docker build -t worker ./worker
26
25
docker build -t result ./result
27
26
28
- - name : 🔍 Run Sysdig Scan ( voting-app)
27
+ - name : 🔍 Scan voting-app with Sysdig
29
28
run : |
30
29
docker run --rm \
30
+ --platform linux/amd64 \
31
+ --user 0 \
32
+ -v "${{ github.workspace }}/scan-logs:/home/nonroot/scan-logs" \
31
33
-v /var/run/docker.sock:/var/run/docker.sock \
34
+ -e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
32
35
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
33
- scan \
34
- --apiurl $SYS_DIG_SECURE_URL \
35
- --token $SECURE_API_TOKEN \
36
- docker://voting-app
36
+ --apiurl $SYS_DIG_SECURE_URL \
37
+ --loglevel debug \
38
+ --skiptlsverify \
39
+ docker://voting-app
37
40
38
- - name : 🔍 Run Sysdig Scan ( worker)
41
+ - name : 🔍 Scan worker with Sysdig
39
42
run : |
40
43
docker run --rm \
44
+ --platform linux/amd64 \
45
+ --user 0 \
46
+ -v "${{ github.workspace }}/scan-logs:/home/nonroot/scan-logs" \
41
47
-v /var/run/docker.sock:/var/run/docker.sock \
48
+ -e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
42
49
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
43
- scan \
44
- --apiurl $SYS_DIG_SECURE_URL \
45
- --token $SECURE_API_TOKEN \
46
- docker://worker
50
+ --apiurl $SYS_DIG_SECURE_URL \
51
+ --loglevel debug \
52
+ --skiptlsverify \
53
+ docker://worker
47
54
48
- - name : 🔍 Run Sysdig Scan ( result)
55
+ - name : 🔍 Scan result with Sysdig
49
56
run : |
50
57
docker run --rm \
58
+ --platform linux/amd64 \
59
+ --user 0 \
60
+ -v "${{ github.workspace }}/scan-logs:/home/nonroot/scan-logs" \
51
61
-v /var/run/docker.sock:/var/run/docker.sock \
62
+ -e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
52
63
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
53
- scan \
54
- --apiurl $SYS_DIG_SECURE_URL \
55
- --token $SECURE_API_TOKEN \
56
- docker://result
64
+ --apiurl $SYS_DIG_SECURE_URL \
65
+ --loglevel debug \
66
+ --skiptlsverify \
67
+ docker://result
57
68
0 commit comments