Skip to content

fix(ci): correct Gitleaks SARIF artifact path so failed scans upload reports (#775) - #940

Open
utosjr1913 wants to merge 1 commit into
ritik4ever:mainfrom
utosjr1913:fix/775-gitleaks-ci-sarif-path
Open

fix(ci): correct Gitleaks SARIF artifact path so failed scans upload reports (#775)#940
utosjr1913 wants to merge 1 commit into
ritik4ever:mainfrom
utosjr1913:fix/775-gitleaks-ci-sarif-path

Conversation

@utosjr1913

Copy link
Copy Markdown

Summary

Closes #775.

Gitleaks secret scanning is already wired into CI via .github/workflows/gitleaks.yml
(added in #931), running gitleaks/gitleaks-action@v2 against gitleaks.toml on every
push/PR to main and develop. This PR fixes a bug in that workflow that was silently
breaking the report-upload step.

The bug

gitleaks-action@v2 writes its findings to gitleaks-results.sarif, but the workflow's
upload 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.sarifpath: gitleaks-results.sarif in the upload-artifact step.

Verification against acceptance criteria

  • Gitleaks Action runs on every PRon: pull_request already present for main/develop.
  • Blocks merge if secrets foundgitleaks-action@v2 exits non-zero on detection; enforced once "Secret Detection" is added as a required status check in branch protection.
  • Allowlist via existing gitleaks.tomlconfig-path: gitleaks.toml already wired, no changes needed.
  • Test commit with fake secret caught — verified locally with gitleaks detect against a dummy Stellar-style key matching the stellar-private-key rule; scan flagged it and exited non-zero.

Notes for maintainer

  • Recommend adding "Secret Detection" as a required status check under branch protection for main (and develop) so failing scans actually block merge.

@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

@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.

@drips-wave

drips-wave Bot commented Sep 4, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 6d3afb87-7837-41f9-8707-e311d927c756


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Gitleaks secrets scanning to CI

1 participant