Skip to content

ci: add gitleaks secret-scan job (gitleaks-action v2.3.9)#119

Open
don-petry wants to merge 28 commits into
mainfrom
claude/issue-96-20260418-1841
Open

ci: add gitleaks secret-scan job (gitleaks-action v2.3.9)#119
don-petry wants to merge 28 commits into
mainfrom
claude/issue-96-20260418-1841

Conversation

@don-petry
Copy link
Copy Markdown
Contributor

Summary

  • Adds the required secret-scan job to ci.yml using gitleaks/gitleaks-action@v2.3.9 (SHA-pinned per the Action Pinning Policy)
  • Adds .gitleaksignore to suppress 7 confirmed false-positive findings in commit 865de69b (documentation file paths containing the substring api-key)

Why this supersedes PR #107

PR #107 (still open) used direct binary install of gitleaks. The compliance audit check (pp_check_secret_scan_ci_job) regex specifically looks for uses: gitleaks/gitleaks-action@ — a binary install does not satisfy it. This PR uses the action.

Action pinning

  • gitleaks/gitleaks-action: ff98106e4c7b2bc287b24eaf42907196329070c7 (tag v2.3.9, verified via gh api repos/gitleaks/gitleaks-action/git/refs/tags/v2.3.9)
  • actions/checkout: 34e114876b0b11c390a56381ad16ebd13914f8d5 (tag v4, same SHA used throughout ci.yml)

Note on GITLEAKS_LICENSE

gitleaks-action v2 requires a free GITLEAKS_LICENSE key for repos in a GitHub organization. Set this as an org or repo secret named GITLEAKS_LICENSE (obtain one at gitleaks.io). Without it the CI job will fail with a license error.

Closes #96

Generated with Claude Code

Uses gitleaks/gitleaks-action@v2.3.9 (pinned to SHA) instead of the
direct binary install from PR #107. The compliance audit
(pp_check_secret_scan_ci_job) requires `uses: gitleaks/gitleaks-action@`
in ci.yml — a binary install does not satisfy the check.

Key decisions:
- Switched from direct binary install to gitleaks/gitleaks-action@v2.3.9
  (SHA ff98106e4c7b2bc287b24eaf42907196329070c7) to satisfy the
  compliance audit regex
- Added GITLEAKS_LICENSE env var (free key required for org repos per
  gitleaks-action docs; set GITLEAKS_LICENSE as an org or repo secret)
- fetch-depth: 0 ensures full git history is scanned
- .gitleaksignore suppresses 7 confirmed false-positive findings in
  commit 865de69 (documentation paths containing "api-key" substring)

Closes #96

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 18, 2026 18:46
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Warning

Review limit reached

@github-actions[bot], we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 35 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2060b368-d445-448c-8862-108d95dc21ea

📥 Commits

Reviewing files that changed from the base of the PR and between 0c85a39 and 1a859a7.

📒 Files selected for processing (2)
  • .github/workflows/ci.yml
  • .gitleaks.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/issue-96-20260418-1841

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 and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a GitHub Actions “secret-scan” job using gitleaks/gitleaks-action@v2.3.9 (SHA pinned) and introduces a .gitleaksignore file to suppress confirmed false positives so the new scan can run cleanly.

Changes:

  • Adds .gitleaksignore entries for 7 reviewed false-positive findings.
  • Adds a secret-scan job to .github/workflows/ci.yml using gitleaks/gitleaks-action (SHA pinned) and full-history checkout.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.gitleaksignore Adds documented suppression fingerprints for known false positives.
.github/workflows/ci.yml Adds a new secret-scan job using the gitleaks GitHub Action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
@github-actions
Copy link
Copy Markdown
Contributor

Auto-rebase blocked — the base branch contains .github/workflows/ changes that require the workflows permission to merge into this branch, but the auto-rebase workflow's token does not have that permission.

Please rebase this branch manually:

git fetch origin
git rebase origin/main
git push --force-with-lease

The gitleaks/gitleaks-action requires a paid license for GitHub org repos.
Switch to direct CLI install via wget + sha256 verification instead.
@don-petry
Copy link
Copy Markdown
Contributor Author

CI fix: replaced gitleaks/gitleaks-action with direct CLI install

The Secret scan (gitleaks) job was failing with:

[petry-projects] is an organization. License key is required.

gitleaks/gitleaks-action requires a paid license for GitHub org repos. This commit replaces it with a direct CLI install approach that:

  • Downloads gitleaks v8.30.1 binary via wget
  • Verifies the download with sha256sum
  • Runs gitleaks detect directly (no license needed)

Also removed the now-unnecessary security-events: write permission from the job.

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot
C Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@don-petry
Copy link
Copy Markdown
Contributor Author

@claude Please address all open review comments on this PR from CodeRabbit and Copilot.

@claude
Copy link
Copy Markdown

claude Bot commented May 6, 2026

Claude encountered an error —— View job


I'll analyze this and get back to you.

@don-petry
Copy link
Copy Markdown
Contributor Author

@dev-lead - please fix this PR

@don-petry
Copy link
Copy Markdown
Contributor Author

Dev-Lead Fix CI — failed

PR: #119 | SHA: 3c366508f485722836c29ef3288df40534e11353
Engine invocation failed (exit 41)

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
1 Security Hotspot

See analysis details on SonarQube Cloud

@github-actions
Copy link
Copy Markdown
Contributor

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved manually.

Please resolve the conflicts and push:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

@don-petry
Copy link
Copy Markdown
Contributor Author

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved.

dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention.

To resolve manually instead:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

@don-petry
Copy link
Copy Markdown
Contributor Author

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved.

dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention.

To resolve manually instead:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

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.

Compliance: secret_scan_ci_job_present

2 participants