Skip to content

Commit 4f21909

Browse files
Merge branch 'main' into guibranco-patch-1
2 parents daa8242 + 8244a8e commit 4f21909

2 files changed

Lines changed: 11 additions & 18 deletions

File tree

.github/workflows/codacy.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,30 +48,23 @@ jobs:
4848
gh-code-scanning-compat: true
4949
max-allowed-issues: 2147483647
5050

51-
# 3️⃣ Extract only the first SARIF run to avoid duplicates
52-
- name: Extract first SARIF run
53-
run: |
54-
jq '{version: .version, "$schema": ."$schema", runs: [ .runs[0] ]}' results.sarif > filtered.sarif
55-
56-
# 4️⃣ Upload just that single-run SARIF
51+
# 3️⃣ Split and upload each SARIF run
5752
- name: Split and upload each SARIF run
5853
run: |
5954
count=$(jq '.runs | length' results.sarif)
6055
for i in $(seq 0 $((count-1))); do
6156
jq --argjson idx $i \
6257
'{version: .version, "$schema": ."$schema", runs: [ .runs[$idx] ]}' \
6358
results.sarif > run_${i}.sarif
64-
65-
# gzip and base64 encode
66-
gzip -c run_${i}.sarif | base64 -w 0 > run_${i}.sarif.b64
67-
68-
# Read encoded content into variable
69-
b64_sarif=$(cat run_${i}.sarif.b64)
70-
71-
gh api repos/${{ github.repository }}/code-scanning/sarifs \
72-
-f commit_sha=${{ github.sha }} \
73-
-f ref=${{ github.ref }} \
74-
-f sarif="$b64_sarif"
59+
60+
# Build a valid JSON payload and pipe directly into gh api
61+
gzip -c run_${i}.sarif | base64 -w 0 | \
62+
jq -Rs \
63+
--arg commit_sha "${{ github.sha }}" \
64+
--arg ref "${{ github.ref }}" \
65+
'{commit_sha: $commit_sha, ref: $ref, sarif: (. | rtrimstr("\n"))}' | \
66+
gh api repos/${{ github.repository }}/code-scanning/sarifs \
67+
--input -
7568
done
7669
env:
7770
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/infisical-secrets-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
fetch-depth: 0
2424

2525
- name: Infisical secrets check
26-
uses: guibranco/github-infisical-secrets-check-action@v4.2.2
26+
uses: guibranco/github-infisical-secrets-check-action@v5.0.1

0 commit comments

Comments
 (0)