Skip to content

ci: add gitleaks secret-scan job (compliance #171)#198

Open
don-petry wants to merge 2 commits intomainfrom
claude/issue-171-20260418-1847
Open

ci: add gitleaks secret-scan job (compliance #171)#198
don-petry wants to merge 2 commits intomainfrom
claude/issue-171-20260418-1847

Conversation

@don-petry
Copy link
Copy Markdown
Collaborator

Summary

  • Adds a secret-scan job to .github/workflows/ci.yml per the org push-protection standard (standards/push-protection.md#required-ci-job)
  • Job uses gitleaks/gitleaks-action@v2.3.9 (SHA-pinned to ff98106e4c7b2bc287b24eaf42907196329070c7 per the Action Pinning Policy)
  • Full git history checkout (fetch-depth: 0) so every commit is scanned, not just the PR diff
  • --redact flag prevents leaked values from appearing in workflow logs
  • --exit-code 1 fails the build on any finding

Why this PR

The weekly compliance audit flags secret_scan_ci_job_present because ci.yml lacked a gitleaks job. Previous fix in PR #190 was never merged; this is a clean implementation on the new branch.

Test plan

  • CI secret-scan job passes on this PR
  • Weekly compliance audit no longer flags secret_scan_ci_job_present after merge

Closes #171

Generated with Claude Code

Adds the required `secret-scan` job to `ci.yml` per the org push-protection
standard (standards/push-protection.md#required-ci-job). The job uses
`gitleaks/gitleaks-action@v2.3.9` (SHA-pinned per the Action Pinning Policy)
with full git history checkout (`fetch-depth: 0`) and `--redact` to avoid
logging secret values.

Closes #171

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

coderabbitai Bot commented Apr 18, 2026

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 45 minutes and 52 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 52 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 570676c7-2a39-447c-8b13-cf80e0a8b8ad

📥 Commits

Reviewing files that changed from the base of the PR and between 32e618b and 71b5fe9.

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

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
Contributor

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 mandatory secret-scanning CI job using Gitleaks to satisfy org push-protection/compliance requirements and fail builds on detected secrets.

Changes:

  • Adds a new secret-scan job to ci.yml running gitleaks/gitleaks-action with full-history checkout.
  • Pins third-party GitHub Actions to SHAs per the action pinning policy.
  • Configures Gitleaks to redact findings and return a failing exit code on detections.

@sonarqubecloud
Copy link
Copy Markdown

don-petry added a commit that referenced this pull request Apr 19, 2026
Adds the required `secret-scan` job per the org push-protection standard
(standards/push-protection.md#layer-3--ci-secret-scanning-secondary-defense).

The job:
- Checks out full git history (fetch-depth: 0) for complete scan coverage
- Runs gitleaks/gitleaks-action@v2.3.9 pinned to SHA ff98106e4c7b2bc287b24eaf42907196329070c7
- Passes --redact to prevent secrets appearing in logs
- Passes --exit-code 1 to fail the build on any finding
- Passes GITLEAKS_LICENSE from secrets to satisfy the org-repo license requirement
  (prior attempt PR #198 omitted this env var, causing the CI failure)

Resolves the `secret_scan_ci_job_present` compliance finding.

Co-authored-by: don-petry <don-petry@users.noreply.github.com>
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