docs: add before-push security checklist to CONTRIBUTING.md (Closes #50) - #92
Conversation
Closes Flamki#50 Signed-off-by: laurentketterle-hub <laurentketterle-hub@users.noreply.github.com>
📝 WalkthroughWalkthrough
ChangesSecurity guidance
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@CONTRIBUTING.md`:
- Around line 71-76: Update the credential-checking instructions in the staged
push workflow to state that the generic grep is insufficient. Require scanning
staged paths and content with policy-specific patterns or a dedicated secret
scanner, manually reviewing git diff --staged before git push, and preserving
.env.example as the documented placeholder exception.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| # 3. Scan for common credential patterns | ||
| git diff --staged | grep -E '(api_key|API_KEY|secret|SECRET|token|TOKEN|password|PASSWORD|private.key|PRIVATE.KEY)' | ||
|
|
||
| # 4. If no secrets found, proceed with push | ||
| git push | ||
| ``` |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Do not treat this grep as a complete secret scan.
The command only searches for generic words such as secret, token, and password. It misses the policy-defined S... private keys, sk-ant-... API keys, .env files, and generated wallet secrets when their contents do not contain those words. A clean result therefore does not justify the next git push command.
Scan staged paths and content with policy-specific patterns, or use a dedicated secret scanner. Require manual review of git diff --staged before pushing, and preserve .env.example as the documented placeholder exception.
🤖 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 `@CONTRIBUTING.md` around lines 71 - 76, Update the credential-checking
instructions in the staged push workflow to state that the generic grep is
insufficient. Require scanning staged paths and content with policy-specific
patterns or a dedicated secret scanner, manually reviewing git diff --staged
before git push, and preserving .env.example as the documented placeholder
exception.
Summary
Closes #50
Adds a concrete, copy-paste friendly Before Push Security Checklist to
CONTRIBUTING.mdwith:git status— verify the right branchgit diff --staged— review staged changesgrepscan — detect common credential patterns (API keys, tokens, secrets, private keys)SECURITY.mdfor full security policy and reporting processFiles Changed
CONTRIBUTING.md— Enhanced "Security Hygiene" section with actionable checklistVerification
Summary by CodeRabbit