Skip to content

Commit 8d4fd5a

Browse files
committed
Fix: Ensure SECURE_API_TOKEN is injected properly
1 parent f0a0b29 commit 8d4fd5a

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

.github/workflows/scan.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ jobs:
2323
docker build -t worker ./worker
2424
docker build -t result ./result
2525
26-
- name: Set SECURE_API_TOKEN env and debug
26+
-
27+
name: Debug: Check if SECURE_API_TOKEN is available
28+
env:
29+
SECURE_API_TOKEN: "${{ secrets.SECURE_API_TOKEN }}"
2730
run: |
28-
export SECURE_API_TOKEN="${{ secrets.SECURE_API_TOKEN }}"
2931
echo "🔍 Token Length: ${#SECURE_API_TOKEN}"
3032
echo "🔍 Token Head: ${SECURE_API_TOKEN:0:5}"
3133
if [ -z "$SECURE_API_TOKEN" ]; then
@@ -37,15 +39,5 @@ jobs:
3739
3840
- name: Run Sysdig Scan (voting-app)
3941
run: |
40-
docker run --rm \
41-
--platform linux/amd64 \
42-
--user 0 \
43-
-v "$(pwd)/scan-logs:/home/nonroot/scan-logs" \
44-
-v /var/run/docker.sock:/var/run/docker.sock \
45-
-e SECURE_API_TOKEN="${{ secrets.SECURE_API_TOKEN }}" \
46-
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
47-
--apiurl "$SYS_DIG_SECURE_URL" \
48-
--loglevel debug \
49-
--skiptlsverify \
50-
docker://voting-app
42+
docker run --rm --platform linux/amd64 --user 0 -v "$(pwd)/scan-logs:/home/nonroot/scan-logs" -v /var/run/docker.sock:/var/run/docker.sock -e SECURE_API_TOKEN="${{ secrets.SECURE_API_TOKEN }}" quay.io/sysdig/sysdig-cli-scanner:1.22.4 --apiurl "$SYS_DIG_SECURE_URL" --loglevel debug --skiptlsverify docker://voting-app
5143

0 commit comments

Comments
 (0)