fix(ci): correct Gitleaks SARIF artifact path so failed scans upload reports (#775) - #940
fix(ci): correct Gitleaks SARIF artifact path so failed scans upload reports (#775)#940utosjr1913 wants to merge 1 commit into
Conversation
|
@utosjr1913 is attempting to deploy a commit to the ritik4ever's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@utosjr1913 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes #775.
Gitleaks secret scanning is already wired into CI via
.github/workflows/gitleaks.yml(added in #931), running
gitleaks/gitleaks-action@v2againstgitleaks.tomlon everypush/PR to
mainanddevelop. This PR fixes a bug in that workflow that was silentlybreaking the report-upload step.
The bug
gitleaks-action@v2writes its findings togitleaks-results.sarif, but the workflow'supload step pointed at
results.sarif. When a secret is caught, the job correctly fails(blocking merge), but the "Upload Gitleaks Report" step then errors with "no files found"
instead of attaching the SARIF report.
Fix
path: results.sarif→path: gitleaks-results.sarifin the upload-artifact step.Verification against acceptance criteria
on: pull_requestalready present formain/develop.gitleaks-action@v2exits non-zero on detection; enforced once "Secret Detection" is added as a required status check in branch protection.gitleaks.toml—config-path: gitleaks.tomlalready wired, no changes needed.gitleaks detectagainst a dummy Stellar-style key matching thestellar-private-keyrule; scan flagged it and exited non-zero.Notes for maintainer
main(anddevelop) so failing scans actually block merge.