Skip to content

Commit 77f0e24

Browse files
committed
AquaSec workflow fix
1 parent 66f5c89 commit 77f0e24

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/aquasec_repository_scan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ jobs:
2929
run: |
3030
echo "=== Authenticating with AquaSec ==="
3131
32-
TIMESTAMP=$(date +%s)
32+
TIMESTAMP=$(date -u +%s)
3333
AUTH_ENDPOINT="https://eu-1.api.cloudsploit.com/"
3434
METHOD="POST"
35-
POST_BODY='{"validity":240,"allowed_endpoints":["GET"]}'
35+
POST_BODY='{"validity":240,"allowed_endpoints":["GET","POST"]}'
3636
STRING_TO_SIGN="${TIMESTAMP}${METHOD}/v2/tokens${POST_BODY}"
3737
SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$AQUA_SECRET" -hex | sed 's/.*= //g')
3838

39-
AUTH_RESPONSE=$(curl -s -X POST "$AUTH_ENDPOINT" \
39+
AUTH_RESPONSE=$(curl -s -X "$METHOD" "$AUTH_ENDPOINT" \
4040
-H "Content-Type: application/json" \
4141
-H "X-API-Key: $AQUA_KEY" \
4242
-H "X-Timestamp: $TIMESTAMP" \

0 commit comments

Comments
 (0)