-
Notifications
You must be signed in to change notification settings - Fork 3
feat(security): add gitleaks for secret detection #259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 4 files
Integrate gitleaks to detect and prevent secrets from being committed: - Add .gitleaks.toml configuration with default rules - Add gitleaks to pre-commit hook via lefthook (runs first in pipeline) - Add gitleaks job to CI workflow using gitleaks-action - Add gitleaks to nix flake for local development This replaces secretlint with a more widely adopted solution that provides comprehensive detection of API keys, tokens, and credentials.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR integrates gitleaks as a secret detection tool to prevent sensitive information from being committed to the repository. It replaces the previous secretlint solution with gitleaks, which is more widely adopted in the industry.
Key Changes:
- Configured gitleaks with default rules and file allowlists for lock files and snapshots
- Added gitleaks as the first job in the pre-commit hook pipeline via lefthook
- Integrated gitleaks scanning into the CI workflow as a dedicated job
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.gitleaks.toml |
New configuration file with default rules enabled and allowlist for lock files and snapshots |
lefthook.yaml |
Added gitleaks as the first pre-commit job to scan staged files before other checks |
flake.nix |
Added gitleaks package to the Nix development environment for local tooling |
.github/workflows/ci.yaml |
Added gitleaks job with full repository history scanning using the official gitleaks-action |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.gitleaks.toml
Outdated
| '''go\.sum$''', | ||
| '''pnpm-lock\.yaml$''', | ||
| ] |
Copilot
AI
Dec 21, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The allowlist includes 'go.sum' but this appears to be a Node.js/TypeScript project with no Go files. While this doesn't cause any issues, it's unnecessary and could be removed to keep the configuration focused on the actual project structure.
| '''go\.sum$''', | |
| '''pnpm-lock\.yaml$''', | |
| ] | |
| '''pnpm-lock\.yaml$''', | |
| ] |
4e62bd6 to
31ebbd3
Compare
glebedel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
What Changed
.gitleaks.tomlconfiguration with default rulesgitleaks-actionSummary by cubic
Add Gitleaks for secret detection across pre-commit, CI, and local dev to prevent secrets from being committed. Replaces secretlint with a more widely adopted tool.
Written for commit 71d21cb. Summary will update automatically on new commits.