chore: add gitleaks secret-scan workflow and fix .env.example provider vars - #140
Conversation
|
Warning Review limit reached
Next review available in: 21 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA new GitHub Actions ChangesSecret Scan CI and Config Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/secret-scan.yml (1)
14-16: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDisable checkout credential persistence.
actions/checkoutwrites the token into the local git config by default. In this job that is redundant because the next step already getsGITHUB_TOKENviaenv, so keeping persisted git credentials only broadens the token exposure surface.Suggested fix
- uses: actions/checkout@v4 with: fetch-depth: 0 + persist-credentials: false🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/secret-scan.yml around lines 14 - 16, The checkout step in the secret-scan workflow is persisting credentials unnecessarily, widening token exposure. Update the existing actions/checkout@v4 step to disable credential persistence while keeping the current fetch-depth behavior; use the checkout configuration in this job so the later step continues to rely on GITHUB_TOKEN via env without writing it into local git config.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/secret-scan.yml:
- Around line 14-16: The checkout step in the secret-scan workflow is persisting
credentials unnecessarily, widening token exposure. Update the existing
actions/checkout@v4 step to disable credential persistence while keeping the
current fetch-depth behavior; use the checkout configuration in this job so the
later step continues to rely on GITHUB_TOKEN via env without writing it into
local git config.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6620b37b-b344-49f2-8fc9-355941900ef9
📒 Files selected for processing (2)
.env.example.github/workflows/secret-scan.yml
What
Secret ScanGitHub Actions workflow runninggitleaks/gitleaks-action@v2on pushes/PRs to master (uses the existing tuned.gitleaks.toml)..env.example: the OpenAI-compatible section referencedprovider: "other"andCUSTOM_LLM_API_KEY, but the code (core/src/providers/factory.ts) uses provider idopenai-compatibleand env varOPFOR_API_KEY.Why
A tuned
.gitleaks.tomlexisted but no workflow ran it — nothing scanned PRs for committed secrets. The.env.exampledrift is a first-run papercut that sends new users to the wrong variable.Verified
npm run typecheck,npm run lint,npm run format:checkall pass; committed with the full pre-commit hook (incl. gitleaks, 0 leaks), no--no-verify.Summary by CodeRabbit