Skip to content

Commit b383bce

Browse files
committed
Bug fix
1 parent 61cc54f commit b383bce

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/aquasec_repo_scan.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ jobs:
3434
run: |
3535
set -euo pipefail
3636
37+
echo "=== Validating secret variables ==="
38+
39+
if ! [[ "$REPOSITORY_ID" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]]; then
40+
echo "Error: AQUA_REPOSITORY_ID is not a valid UUID format"
41+
exit 1
42+
fi
43+
3744
echo "=== Authenticating with AquaSec ==="
45+
3846
METHOD="POST"
3947
AUTH_ENDPOINT="https://eu-1.api.cloudsploit.com/v2/tokens"
4048
TIMESTAMP=$(date -u +%s)
@@ -248,6 +256,7 @@ jobs:
248256
CATEGORIES = ["sast", "vulnerabilities", "iacMisconfigurations", "secrets", "pipelineMisconfigurations", "license"]
249257
250258
print("=== Generating Scan Summary Table ===")
259+
251260
try:
252261
with open(SARIF_PATH, "r", encoding="utf-8") as f:
253262
sarif = json.load(f)

0 commit comments

Comments
 (0)