Skip to content

Commit 445a2d4

Browse files
committed
AquaSec Scan update
1 parent c099d52 commit 445a2d4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

.github/workflows/aquasec_repository_scan.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,12 @@ jobs:
3030
set -euo pipefail
3131
3232
echo "=== Authenticating with AquaSec ==="
33+
echo "${{ github.repository_id }}"
3334
3435
METHOD="POST"
3536
AUTH_ENDPOINT="https://eu-1.api.cloudsploit.com/v2/tokens"
3637
TIMESTAMP=$(date -u +%s)
37-
POST_BODY='{
38-
"group_id": 1228,
39-
"allowed_endpoints": ["GET"],
40-
"validity": 240
41-
}'
38+
POST_BODY='{"group_id":1228,"allowed_endpoints":["GET"],"validity":240}'
4239
STRING_TO_SIGN="${TIMESTAMP}${METHOD}/v2/tokens${POST_BODY}"
4340
SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$AQUA_SECRET" -hex | sed 's/.*= //g')
4441
@@ -54,9 +51,8 @@ jobs:
5451
if [ "$RESPONSE_STATUS" = "200" ]; then
5552
echo "Login successful."
5653
BEARER_TOKEN=$(echo "$AUTH_RESPONSE" | jq -r '.data')
57-
echo "::add-mask::$BEARER_TOKEN"
5854
else
59-
echo "Login failed"
55+
echo "Login failed with error message: $(echo "$AUTH_RESPONSE" | jq -r '.errors')"
6056
exit 1
6157
fi
6258

0 commit comments

Comments
 (0)