Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cc490bf
Test of AquaSec API
tmikula-dev Nov 27, 2025
345b1af
Test of AquaSec API
tmikula-dev Nov 27, 2025
10807d7
Test of AquaSec API
tmikula-dev Nov 27, 2025
66f5c89
AquaSec workflow fix
tmikula-dev Nov 27, 2025
77f0e24
AquaSec workflow fix
tmikula-dev Nov 27, 2025
2713be6
AquaSec workflow fix
tmikula-dev Nov 27, 2025
8330826
AquaSec workflow fix
tmikula-dev Nov 27, 2025
8d1b523
AquaSec workflow fix
tmikula-dev Nov 27, 2025
371f052
AquaSec Scan update
tmikula-dev Dec 10, 2025
057d3f8
AquaSec Scan update
tmikula-dev Dec 10, 2025
0d3ff0e
AquaSec Scan update
tmikula-dev Dec 10, 2025
c099d52
AquaSec Scan update
tmikula-dev Dec 10, 2025
445a2d4
AquaSec Scan update
tmikula-dev Dec 10, 2025
a661cb0
AquaSec Scan update
tmikula-dev Dec 10, 2025
e55896e
Merge branch 'refs/heads/master' into feature/78-API-caller-for-AquaS…
tmikula-dev Dec 10, 2025
f92d2d6
Fetching aquasec scan data logic + converting logic from json to sari…
tmikula-dev Dec 30, 2025
0ec7cec
Scan summary table for GH comment logic
tmikula-dev Dec 30, 2025
2a60d75
Bug fix
tmikula-dev Dec 30, 2025
02a236b
Bug fix
tmikula-dev Dec 30, 2025
61cc54f
Revert "Bug fix"
tmikula-dev Dec 30, 2025
b383bce
Bug fix
tmikula-dev Dec 30, 2025
9ebfc65
Code rabbit suggestions implemented
tmikula-dev Dec 30, 2025
a692286
Generated comment bug fixes
tmikula-dev Dec 30, 2025
0d9ddf0
Letting fingerprint logic on GH side
tmikula-dev Dec 30, 2025
a9aca29
Deleting obsolete trivy solution from the project
tmikula-dev Jan 7, 2026
aa38c44
Merge branch 'master' into feature/78-API-caller-for-AquaSec-scan
tmikula-dev Jan 7, 2026
7a580f0
Reacting on the comments to implement SHA into the workflows
tmikula-dev Jan 7, 2026
bf05a69
Deleting the debugging dev script.
tmikula-dev Jan 7, 2026
74da4b1
bug fix
tmikula-dev Jan 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/aquasec_repository_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: AquaSec Full Repository Scan

on:
workflow_dispatch:
pull_request:
types: [ opened, synchronize ]

permissions:
contents: read
issues: write
pull-requests: write
security-events: write

jobs:
aquasec:
name: AquaSec Full Repository Scan
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
fetch-depth: 0

- name: Retrieve AquaSec Scan Results
env:
AQUA_KEY: ${{ secrets.AQUA_KEY }}
AQUA_SECRET: ${{ secrets.AQUA_SECRET }}
run: |
set -euo pipefail

echo "=== Authenticating with AquaSec ==="

METHOD="POST"
AUTH_ENDPOINT="https://eu-1.api.cloudsploit.com/v2/tokens"
TIMESTAMP=$(date -u +%s)
POST_BODY='{
"group_id": 1155,
"allowed_endpoints": ["GET", "POST"],
"validity": 240,
"csp_roles": ["developer", "devops"]
}'
STRING_TO_SIGN="${TIMESTAMP}${METHOD}/v2/tokens${POST_BODY}"
SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "$AQUA_SECRET" -hex | sed 's/.*= //g')


AUTH_RESPONSE=$(curl -s -X "$METHOD" "$AUTH_ENDPOINT" \
-H "Content-Type: application/json" \
-H "X-API-Key: $AQUA_KEY" \
-H "X-Signature: $SIGNATURE" \
-H "X-Timestamp: $TIMESTAMP" \
-d "$POST_BODY")

RESPONSE_STATUS=$(echo "$AUTH_RESPONSE" | jq -r '.status')

if [ "$RESPONSE_STATUS" = "200" ]; then
echo "Login successful."
BEARER_TOKEN=$(echo "$AUTH_RESPONSE" | jq -r '.data')
echo "::add-mask::$BEARER_TOKEN"
else
echo "Login failed"
exit 1
fi

echo "=== Receiving AquaSec Scan Results ==="

SCAN_RESULTS_ENDPOINT="https://eu-central-1.edge.cloud.aquasec.com/codesec/api/v1/scans/results"
SCAN_RESULTS=$(curl -s -X GET \
"$SCAN_RESULTS_ENDPOINT?repositoryIds=${{ github.repository_id }} \
-H "Authorization: Bearer $BEARER_TOKEN" \
-H "Accept: application/json")

if [ -z "$SCAN_RESULTS" ]; then
echo "Failed to retrieve scan results"
exit 1
fi

echo "=== Scan Results ==="
echo "$SCAN_RESULTS" | jq '.'
143 changes: 0 additions & 143 deletions .github/workflows/trivy_repository_scan.yml

This file was deleted.

Loading