Skip to content

Commit f0a0b29

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

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/scan.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,17 @@ jobs:
2323
docker build -t worker ./worker
2424
docker build -t result ./result
2525
26-
- name: Debug: Check if SECURE_API_TOKEN is available
26+
- name: Set SECURE_API_TOKEN env and debug
2727
run: |
28-
echo "Token Length: ${#SECURE_API_TOKEN}"
29-
echo "Token Head: ${SECURE_API_TOKEN:0:5}"
28+
export SECURE_API_TOKEN="${{ secrets.SECURE_API_TOKEN }}"
29+
echo "🔍 Token Length: ${#SECURE_API_TOKEN}"
30+
echo "🔍 Token Head: ${SECURE_API_TOKEN:0:5}"
3031
if [ -z "$SECURE_API_TOKEN" ]; then
31-
echo "SECURE_API_TOKEN is NOT set!"
32+
echo "SECURE_API_TOKEN is NOT set!"
3233
exit 1
3334
else
34-
echo "SECURE_API_TOKEN is available."
35+
echo "SECURE_API_TOKEN is available."
3536
fi
36-
env:
37-
SECURE_API_TOKEN: ${{ secrets.SECURE_API_TOKEN }}
3837
3938
- name: Run Sysdig Scan (voting-app)
4039
run: |
@@ -43,9 +42,10 @@ jobs:
4342
--user 0 \
4443
-v "$(pwd)/scan-logs:/home/nonroot/scan-logs" \
4544
-v /var/run/docker.sock:/var/run/docker.sock \
46-
-e SECURE_API_TOKEN=${{ secrets.SECURE_API_TOKEN }} \
45+
-e SECURE_API_TOKEN="${{ secrets.SECURE_API_TOKEN }}" \
4746
quay.io/sysdig/sysdig-cli-scanner:1.22.4 \
48-
--apiurl $SYS_DIG_SECURE_URL \
47+
--apiurl "$SYS_DIG_SECURE_URL" \
4948
--loglevel debug \
5049
--skiptlsverify \
5150
docker://voting-app
51+

0 commit comments

Comments
 (0)