feat(p5): add settings-template.json with extended bypass patterns#15
Open
rocklambros wants to merge 1 commit into
Open
feat(p5): add settings-template.json with extended bypass patterns#15rocklambros wants to merge 1 commit into
rocklambros wants to merge 1 commit into
Conversation
P5 Task 115. Static permission-rule template the user merges into their own Claude Code settings.json manually (no CSCR-shipped merger code — Layer 1 of the B-pure architecture per docs/superpowers/specs/2026-05-24-cscr-modernization-design.md). Contents (24 deny rules) mirror the design doc § "What the template covers" verbatim, including the fresh-round F7 extended bypass patterns: - secret-file reads: .env, secrets/, AWS credentials, SSH private keys - secret-file writes/edits: .env variants - curl/wget pipe-to-shell: 4 direct + 3 shell-of-curl indirect variants (sh -c, bash -c, eval) - git force-push to main/master: --force + --force-with-lease - rm -rf on root and home Documented bypass classes the template does NOT catch (and which require hooks per the docs/how-to/write-your-own-hook.md guidance) include process substitution `bash <(curl ...)`, download-then-exec, tee-then-exec, and multi-step variable construction. Those are enumerated in the design doc § "What the template does NOT cover" and will be repeated in docs/explanation/enforcement-coverage.md per P5 Task 116+. The merge guide is a separate task (Task 116 → PR-16); this PR ships only the template JSON.
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a static Claude Code permission-rule template that users can manually merge into their settings as Layer 1 of the CSCR v2 B-pure architecture.
Changes:
- Adds
settings-template.jsonwith 24permissions.denyentries. - Covers secret-file access, curl/wget pipe-to-shell patterns, git force-push patterns, and destructive
rm -rfcommands.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+22
to
+24
| "Bash(git push --force master)", | ||
| "Bash(git push --force-with-lease main)", | ||
| "Bash(git push --force-with-lease master)", |
This was referenced May 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P5 Task 115 deliverable. Static permission-rule template the user merges manually into their own Claude Code settings (Layer 1 of the B-pure architecture). CSCR ships zero merger code.
24 deny rules covering:
.env,secrets/, AWS credentials, SSH private keys.envvariantscurl|sh,curl|bash,wget|sh,wget|bash) + 3 shell-of-curl indirect variants (sh -c *curl*,bash -c *curl*,eval *curl*) per fresh-round F7--forceand--force-with-leaserm -rf /,rm -rf ~,rm -rf $HOMEContents verbatim from
docs/superpowers/specs/2026-05-24-cscr-modernization-design.md§ "What the template covers".Honest framing
This template catches the specific patterns enumerated. Documented bypass classes it does NOT catch (and which require hooks per the upcoming
write-your-own-hook.md):bash <(curl ...)curl ... -o /tmp/x && sh /tmp/xcurl ... | tee /tmp/x; sh /tmp/xURL=...; curl $URL | shThese are noted in the design doc and will be repeated in
docs/explanation/enforcement-coverage.md(separate task).Test plan
uv run python -c "import json; json.load(open('settings-template.json'))"— 24 deny rules parse cleanlyReviewer
@fewdisc — verbatim content from the design doc. Worth confirming the rule strings match the Claude Code permission-rule format you expect (the format follows
<Tool>(<pattern>)per the platform docs; please flag if any specific rule string would be rejected by the current settings parser).Related
docs/how-to/merge-settings-template.md)docs/how-to/write-your-own-hook.md(11 hook patterns)