@@ -10,58 +10,68 @@ jobs:
10
10
image-scan :
11
11
runs-on : ubuntu-latest
12
12
13
+ env :
14
+ SYS_DIG_SECURE_URL : https://app.au1.sysdig.com
15
+
13
16
steps :
14
17
- name : 🛎️ Checkout code
15
18
uses : actions/checkout@v3
16
19
17
- - name : 🏗️ Build Docker images
20
+ - name : 🐳 Build Docker images
18
21
run : |
19
22
docker build -t voting-app ./vote
20
23
docker build -t worker ./worker
21
24
docker build -t result ./result
22
25
23
- - name : 🔍 Run Sysdig Scan (voting-app)
26
+ - name : 🔍 DEBUG: Check if SECURE_API_TOKEN is available
27
+ run : |
28
+ echo "🔍 Token Length: ${#SECURE_API_TOKEN}"
29
+ echo "🔍 Token Head: ${SECURE_API_TOKEN::5}"
30
+ if [ -z "$SECURE_API_TOKEN" ]; then
31
+ echo "❌ SECURE_API_TOKEN is NOT set!"
32
+ exit 1
33
+ else
34
+ echo "✅ SECURE_API_TOKEN is available."
35
+ fi
24
36
env :
25
37
SECURE_API_TOKEN : ${{ secrets.SECURE_API_TOKEN }}
38
+
39
+ - name : 🔍 Run Sysdig Scan (voting-app)
26
40
run : |
27
41
docker run --rm \
28
42
--platform linux/amd64 \
29
43
--user 0 \
30
- -e SECURE_API_TOKEN=$SECURE_API_TOKEN \
31
44
-v /var/run/docker.sock:/var/run/docker.sock \
45
+ -e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
32
46
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
33
- scan \
34
- --apiurl https://app.au1.sysdig.com \
47
+ --apiurl $SYS_DIG_SECURE_URL \
35
48
--skiptlsverify \
49
+ --loglevel debug \
36
50
docker://voting-app
37
51
38
52
- name : 🔍 Run Sysdig Scan (worker)
39
- env :
40
- SECURE_API_TOKEN : ${{ secrets.SECURE_API_TOKEN }}
41
53
run : |
42
54
docker run --rm \
43
55
--platform linux/amd64 \
44
56
--user 0 \
45
- -e SECURE_API_TOKEN=$SECURE_API_TOKEN \
46
57
-v /var/run/docker.sock:/var/run/docker.sock \
58
+ -e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
47
59
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
48
- scan \
49
- --apiurl https://app.au1.sysdig.com \
60
+ --apiurl $SYS_DIG_SECURE_URL \
50
61
--skiptlsverify \
62
+ --loglevel debug \
51
63
docker://worker
52
64
53
65
- name : 🔍 Run Sysdig Scan (result)
54
- env :
55
- SECURE_API_TOKEN : ${{ secrets.SECURE_API_TOKEN }}
56
66
run : |
57
67
docker run --rm \
58
68
--platform linux/amd64 \
59
69
--user 0 \
60
- -e SECURE_API_TOKEN=$SECURE_API_TOKEN \
61
70
-v /var/run/docker.sock:/var/run/docker.sock \
71
+ -e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
62
72
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
63
- scan \
64
- --apiurl https://app.au1.sysdig.com \
73
+ --apiurl $SYS_DIG_SECURE_URL \
65
74
--skiptlsverify \
75
+ --loglevel debug \
66
76
docker://result
67
77
0 commit comments