-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add security guardrails to prevent credential exposure #29
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
base: main
Are you sure you want to change the base?
Conversation
… artifacts Add security warnings and best practices throughout SDD workflow to prevent API keys and sensitive data from being committed in proof artifacts. Changes: - Add Security Considerations section to spec template - Add security warnings to proof artifact creation workflow - Add security validation gate to spec implementation validation - Document pre-commit hook options for secret scanning - Add security best practices section to README Related to issue #28 Co-authored-by: Damien Storm <ryderstorm@users.noreply.github.com>
WalkthroughThis PR introduces comprehensive security guidance across documentation and prompt templates to prevent accidental commit of API keys and credentials in proof artifacts. Changes include pre-commit hook setup instructions, explicit security warnings in workflow prompts, and a new validation gate to detect sensitive data. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ 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 |
|
@claude fix the markdown issues that failed CI |
|
Claude finished @ryderstorm's task —— View job Fixing Markdown IssuesTasks
Changes MadeFixed markdownlint errors in CONTRIBUTING.md by converting bold text headers to proper markdown headings:
Each heading now has a blank line after it as required by markdownlint rule MD036. SummaryThe markdown linting issues have been resolved. The CI checks should now pass when re-run. The changes have been committed and pushed to the PR branch |
Fixes markdownlint errors MD036/no-emphasis-as-heading by converting bold text used as headings to proper markdown heading syntax (####). Co-authored-by: Damien Storm <ryderstorm@users.noreply.github.com>
Clarify responsibility for reviewing artifacts before pushing to remotes.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
prompts/validate-spec-implementation.md (1)
77-78: Minor: Rephrase to avoid repetitive sentence structure.The static analysis tool flagged that three successive sentences start the same way. While this is a style preference rather than a blocker, consider rewording GATE E or the section intro to improve readability.
- **GATE D:** All changed files are either in "Relevant Files" list OR explicitly justified in git commit messages → **REQUIRED**. - **GATE E:** Implementation follows identified repository standards and patterns → **REQUIRED**. - **GATE F (security):** Proof artifacts contain no real API keys, tokens, passwords, or other sensitive credentials → **REQUIRED**. + **GATE D:** All changed files are either in "Relevant Files" list OR explicitly justified in git commit messages → **REQUIRED**. + **GATE E:** Code follows identified repository standards and patterns → **REQUIRED**. + **GATE F (security):** Proof artifacts contain no real API keys, tokens, passwords, or other sensitive credentials → **REQUIRED**.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
CONTRIBUTING.md(1 hunks)README.md(1 hunks)prompts/generate-spec.md(1 hunks)prompts/generate-task-list-from-spec.md(1 hunks)prompts/manage-tasks.md(2 hunks)prompts/validate-spec-implementation.md(3 hunks)
🧰 Additional context used
🪛 LanguageTool
prompts/validate-spec-implementation.md
[style] ~78-~78: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ndards and patterns → REQUIRED. - GATE F (security): Proof artifacts contain...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🔇 Additional comments (8)
CONTRIBUTING.md (1)
32-73: Well-structured pre-commit hooks guidance.The Secret Scanning Pre-commit Hooks section provides clear, actionable options with concrete configuration examples. The placement after Development Setup and before Common Commands is appropriate.
prompts/generate-spec.md (1)
220-227: Security Considerations section well-integrated into spec template.The new section fits naturally into the spec structure and prompts implementers to think about security requirements early in the planning phase. The guidance aligns with PR objectives around API key exposure prevention and proof artifact security.
prompts/generate-task-list-from-spec.md (1)
86-86: Security Note placement is strategic and effective.Positioning the security warning at the planning stage (before task execution) gives developers clear guidance early when they're defining proof artifacts. The reminder that artifacts will be committed to the repository provides important context for the placeholder requirement.
prompts/validate-spec-implementation.md (2)
142-142: Security Check within Detailed Checks is comprehensive.The security check at line 142 ("Proof artifacts contain no real API keys, tokens, passwords, or sensitive data") provides a concrete verification step that reinforces GATE F. Placement in the Detailed Checks section ensures this gets validated during the evidence verification phase.
169-169: Auto-CRITICAL severity for credentials is appropriate.The Red Flags section correctly classifies real API keys, tokens, passwords, or credentials in proof artifacts as auto-CRITICAL. This severity level aligns with the security objectives and helps catch the most serious issues.
prompts/manage-tasks.md (2)
202-209: Comprehensive Security Warning with clear examples.The security warning explicitly reminds developers that proof artifacts will be committed to the repository and provides concrete placeholder examples (
[YOUR_API_KEY_HERE],[REDACTED]). The guidance on sanitizing outputs and reviewing before commit aligns well with the PR objectives and makes the security requirement actionable.
229-234: Security Check integrated into proof artifact verification workflow.Including the Security Check in the proof artifact creation checklist and the SECURITY VERIFICATION item ensures developers actively verify the absence of credentials before committing. This represents a critical workflow integration point that supports the goal of preventing accidental credential exposure.
README.md (1)
201-212: README security section is appropriate; the tool references across documents serve different purposes.The README correctly lists three valid pre-commit secret scanning tools including talisman, which is actively maintained and remains a legitimate 2025 option. CONTRIBUTING.md separately documents gitleaks (recommended), truffleHog, and detect-secrets as contributor setup options. This is not an inconsistency requiring correction—README provides general best-practice guidance while CONTRIBUTING.md specifies project-specific contributor setup. Both talisman and detect-secrets are valid, maintained tools suitable for their respective contexts.
|
|
||
| ```yaml | ||
| # Add to .pre-commit-config.yaml | ||
| repos: |
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.
Maintaining the references and/or versions of these tools might be a challenge. Not against it but do we have any other references to 3rd party tools in the workflow?
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.
I don't think so, no. And pre-commit has an autoupdate command for automatically updating versions for hooks.
@claude answer RoberKelly's question, then make a small improvement to the changes in this PR to include a note about how users should check hook versions and use pre-commit autoupdate regularly.
Summary
Adds security guardrails throughout the SDD workflow to prevent API keys and sensitive data from being committed in proof artifacts.
Changes
Closes #28
🤖 Generated with Claude Code
Summary by CodeRabbit
Documentation