|
50 | 50 | STRING_TO_SIGN="${TIMESTAMP}${METHOD}/v2/tokens${POST_BODY}" |
51 | 51 | SIGNATURE=$(echo -n "$STRING_TO_SIGN" | openssl dgst -sha256 -hmac "${AQUA_SECRET}" -hex | sed 's/.*= //g') |
52 | 52 |
|
53 | | - AUTH_RESPONSE=$(curl -s -X $METHOD "$AUTH_ENDPOINT" \ |
| 53 | + AUTH_RESPONSE=$(curl -s --max-time 30 -X $METHOD "$AUTH_ENDPOINT" \ |
54 | 54 | -H "Content-Type: application/json" \ |
55 | 55 | -H "X-API-Key: $AQUA_KEY" \ |
56 | 56 | -H "X-Timestamp: $TIMESTAMP" \ |
|
80 | 80 | |
81 | 81 | REQUEST_URL="${SCAN_RESULTS_ENDPOINT}?repositoryIds=${REPOSITORY_ID}&size=${PAGE_SIZE}&page=${PAGE_NUM}" |
82 | 82 | |
83 | | - PAGE_RESPONSE=$(curl -s -X GET "$REQUEST_URL" \ |
| 83 | + PAGE_RESPONSE=$(curl -s --max-time 30 -X GET "$REQUEST_URL" \ |
84 | 84 | -H "Authorization: Bearer $BEARER_TOKEN" \ |
85 | 85 | -H "Accept: application/json") |
86 | 86 | |
@@ -326,14 +326,16 @@ jobs: |
326 | 326 | - name: GitHub scan summary comment |
327 | 327 | if: github.event_name == 'pull_request' |
328 | 328 | uses: actions/github-script@v8 |
| 329 | + env: |
| 330 | + SUMMARY_TABLE: ${{ steps.scan_summary_table.outputs.table }} |
329 | 331 | with: |
330 | 332 | github-token: ${{ secrets.GITHUB_TOKEN }} |
331 | 333 | script: | |
332 | 334 | const link = `https://github.com/${context.repo.owner}/${context.repo.repo}/security/code-scanning?query=pr%3A${context.issue.number}+is%3Aopen`; |
333 | 335 | const sentence = `AquaSec has completed a full security repository scan ✅ You can find the analysis results for this PR branch on [this overview](${link}).\n Below is the summary of the findings:`; |
334 | | - const summaryTable = `${{ steps.scan_summary_table.outputs.table }}`; |
335 | | - const body = `${sentence}\n\n${summaryTable}`; |
336 | | - github.rest.issues.createComment({ |
| 336 | + const summaryTable = process.env.SUMMARY_TABLE; |
| 337 | + const body = sentence + "\n\n" + summaryTable; |
| 338 | + await github.rest.issues.createComment({ |
337 | 339 | issue_number: context.issue.number, |
338 | 340 | owner: context.repo.owner, |
339 | 341 | repo: context.repo.repo, |
|
0 commit comments