Skip to content

Commit 422fc0c

Browse files
committed
fix
1 parent 04b8fd0 commit 422fc0c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.github/workflows/secret-scan.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ jobs:
5050
uses: actions/upload-artifact@v4
5151
if: always()
5252
with:
53-
name: secret-scan-sarif
53+
name: secret-scan-sarif-${{ github.job }}
5454
path: gosecretscanner-results.sarif
55+
overwrite: true
5556
continue-on-error: true
5657

5758
# Job for code quality checks

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,14 @@ runs:
231231
echo ""
232232
233233
# Run the scanner
234+
# When saving to file: stdout (JSON/SARIF) goes to file, stderr (status) shows in console
234235
set +e
235236
if [ -n "$SARIF_FILE" ]; then
236-
"${SCAN_CMD[@]}" > "$SARIF_FILE" 2>&1
237+
"${SCAN_CMD[@]}" > "$SARIF_FILE"
237238
exit_code=$?
238239
SECRET_COUNT=$(jq '.runs[0].results | length' "$SARIF_FILE" 2>/dev/null || echo "0")
240+
echo ""
241+
echo "📊 Results: $SECRET_COUNT findings written to $SARIF_FILE"
239242
echo "sarif-file=$SARIF_FILE" >> $GITHUB_OUTPUT
240243
else
241244
OUTPUT=$("${SCAN_CMD[@]}" 2>&1)
@@ -279,8 +282,9 @@ runs:
279282
if: inputs.sarif-file != '' && always()
280283
uses: actions/upload-artifact@v4
281284
with:
282-
name: secret-scan-sarif
285+
name: secret-scan-sarif-${{ github.job }}
283286
path: ${{ inputs.sarif-file }}
287+
overwrite: true
284288
continue-on-error: true
285289

286290
- name: Stop llama.cpp server

0 commit comments

Comments
 (0)