Skip to content

Commit e97b79c

Browse files
committed
fix(clusterfuzzlite): don't upload SARIF when a clean run produced none
#131's my-llvm .rs edit triggered the ClusterFuzzLite workflow for the first time since the #130 build fix — validating it: fuzz_main built and ran 177M executions in 301s with ZERO crashes. The job still failed on the final step: `upload-sarif` runs `if: always()` but a clean run writes no vulnerabilities.sarif, so it errored 'Path does not exist'. Guard the upload with `hashFiles('vulnerabilities.sarif') != ''` so a no-crash run passes cleanly. Applied to both cflite_pr.yml and cflite_batch.yml. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BwV2DWsjkBiNP3oscimMLV
1 parent 109f8f5 commit e97b79c

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/cflite_batch.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
mode: batch
2929
output-sarif: true
3030
- uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
31-
if: always()
31+
# Only upload when a SARIF was actually produced: a CLEAN fuzz run
32+
# (no crashes) writes no `vulnerabilities.sarif`, and an unconditional
33+
# `always()` upload then fails with "Path does not exist".
34+
if: always() && hashFiles('vulnerabilities.sarif') != ''
3235
with:
3336
sarif_file: vulnerabilities.sarif

.github/workflows/cflite_pr.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
mode: code-change
3232
output-sarif: true
3333
- uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3
34-
if: always()
34+
# Only upload when a SARIF was actually produced: a CLEAN fuzz run
35+
# (no crashes) writes no `vulnerabilities.sarif`, and an unconditional
36+
# `always()` upload then fails with "Path does not exist".
37+
if: always() && hashFiles('vulnerabilities.sarif') != ''
3538
with:
3639
sarif_file: vulnerabilities.sarif

0 commit comments

Comments
 (0)