We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66f5c89 commit 77f0e24Copy full SHA for 77f0e24
1 file changed
.github/workflows/aquasec_repository_scan.yml
@@ -29,14 +29,14 @@ jobs:
29
run: |
30
echo "=== Authenticating with AquaSec ==="
31
32
- TIMESTAMP=$(date +%s)
+ TIMESTAMP=$(date -u +%s)
33
AUTH_ENDPOINT="https://eu-1.api.cloudsploit.com/"
34
METHOD="POST"
35
- POST_BODY='{"validity":240,"allowed_endpoints":["GET"]}'
+ POST_BODY='{"validity":240,"allowed_endpoints":["GET","POST"]}'
36
STRING_TO_SIGN="${TIMESTAMP}${METHOD}/v2/tokens${POST_BODY}"
37
SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$AQUA_SECRET" -hex | sed 's/.*= //g')
38
39
- AUTH_RESPONSE=$(curl -s -X POST "$AUTH_ENDPOINT" \
+ AUTH_RESPONSE=$(curl -s -X "$METHOD" "$AUTH_ENDPOINT" \
40
-H "Content-Type: application/json" \
41
-H "X-API-Key: $AQUA_KEY" \
42
-H "X-Timestamp: $TIMESTAMP" \
0 commit comments