Compare commits
2 Commits
f8a295eaec
...
5b48f0d051
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b48f0d051 | |||
| 5248e7ee21 |
+1
-25
@@ -1,31 +1,7 @@
|
||||
{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(cargo:*)",
|
||||
"Bash(git:*)",
|
||||
"Bash(ls:*)",
|
||||
"Bash(mkdir:*)",
|
||||
"Bash(mv:*)",
|
||||
"Bash(rm:*)",
|
||||
"Bash(touch:*)",
|
||||
"Bash(echo:*)",
|
||||
"Bash(pwd:*)",
|
||||
"Bash(grep:*)",
|
||||
"Bash(find:*)",
|
||||
"Bash(head:*)",
|
||||
"Bash(tail:*)",
|
||||
"Bash(wc:*)",
|
||||
"Bash(cat:*)",
|
||||
"Bash(python3:*)",
|
||||
"Bash(node:*)",
|
||||
"Bash(npm:*)",
|
||||
"Bash(which:*)",
|
||||
"Bash(sed:*)",
|
||||
"Bash(awk:*)",
|
||||
"Bash(sort:*)",
|
||||
"Bash(uniq:*)",
|
||||
"Bash(diff:*)",
|
||||
"Bash(rg:*)",
|
||||
"Bash(:*)",
|
||||
"Read",
|
||||
"Edit",
|
||||
"Write",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Claude Code
|
||||
.claude/settings.local.json
|
||||
.claude/scheduled_tasks.lock
|
||||
.mcp.json
|
||||
|
||||
# Local environment (secrets)
|
||||
@@ -14,6 +15,7 @@ _merge_parsed.json
|
||||
.huskies_port
|
||||
.huskies/bot.toml.bak
|
||||
.huskies/build_hash
|
||||
.huskies/source-map.json
|
||||
|
||||
# Coverage report (generated by script/test_coverage, not tracked in git)
|
||||
.coverage_report.json
|
||||
|
||||
@@ -70,31 +70,7 @@ setup wizard instructions and guide the user through it conversationally.\n";
|
||||
pub(super) const STORY_KIT_CLAUDE_SETTINGS: &str = r#"{
|
||||
"permissions": {
|
||||
"allow": [
|
||||
"Bash(cargo:*)",
|
||||
"Bash(git:*)",
|
||||
"Bash(ls:*)",
|
||||
"Bash(mkdir:*)",
|
||||
"Bash(mv:*)",
|
||||
"Bash(rm:*)",
|
||||
"Bash(touch:*)",
|
||||
"Bash(echo:*)",
|
||||
"Bash(pwd:*)",
|
||||
"Bash(grep:*)",
|
||||
"Bash(find:*)",
|
||||
"Bash(head:*)",
|
||||
"Bash(tail:*)",
|
||||
"Bash(wc:*)",
|
||||
"Bash(cat:*)",
|
||||
"Bash(python3:*)",
|
||||
"Bash(node:*)",
|
||||
"Bash(npm:*)",
|
||||
"Bash(which:*)",
|
||||
"Bash(sed:*)",
|
||||
"Bash(awk:*)",
|
||||
"Bash(rg:*)",
|
||||
"Bash(diff:*)",
|
||||
"Bash(sort:*)",
|
||||
"Bash(uniq:*)",
|
||||
"Bash(:*)",
|
||||
"Read",
|
||||
"Edit",
|
||||
"Write",
|
||||
|
||||
@@ -614,24 +614,13 @@ fn scaffold_story_kit_claude_settings_uses_canonical_bash_syntax() {
|
||||
);
|
||||
}
|
||||
|
||||
// Common safe commands must be allowlisted in canonical form.
|
||||
for required in &[
|
||||
r#""Bash(cargo:*)""#,
|
||||
r#""Bash(git:*)""#,
|
||||
r#""Bash(ls:*)""#,
|
||||
r#""Bash(cat:*)""#,
|
||||
r#""Bash(grep:*)""#,
|
||||
r#""Bash(find:*)""#,
|
||||
r#""Bash(python3:*)""#,
|
||||
r#""Bash(node:*)""#,
|
||||
r#""Bash(npm:*)""#,
|
||||
r#""Bash(rg:*)""#,
|
||||
r#""Bash(sed:*)""#,
|
||||
r#""Bash(awk:*)""#,
|
||||
] {
|
||||
assert!(
|
||||
settings.contains(required),
|
||||
"settings.json missing required allowlist pattern: {required}"
|
||||
);
|
||||
}
|
||||
// The wildcard `Bash(:*)` must be present — covers all bash commands.
|
||||
// (Previously this asserted a curated per-command list; replaced with a
|
||||
// single wildcard since coders kept hitting auto-deny on patterns the
|
||||
// list missed, and the per-command gate offers no real safety in this
|
||||
// trusted single-user deployment.)
|
||||
assert!(
|
||||
settings.contains(r#""Bash(:*)""#),
|
||||
"settings.json missing wildcard Bash allowlist: {settings}"
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user