Answer security round 4: 1 🔴, 1 🟡; refuse the format options that start gpg, and load no settings from the case's clone

This commit is contained in:
2026-10-16 22:42:11 +02:00
parent e57309a415
commit 57cd5f76a4
4 changed files with 11 additions and 10 deletions
+3 -2
View File
@@ -50,8 +50,9 @@ def permission_flags(clone, version_dir, report):
*(f"{tool}({tree})" for tool in ("Read", "Grep", "Glob") for tree in trees),
]
denied = ["Bash(git *)", f"Edit(/{clone}/.git/**)", f"Edit(/{clone}/.claude/**)"]
# No "user" source: ~/.claude/settings.json would add ~/code to the trees and run its hooks.
return ["--setting-sources", "project,local", "--permission-mode", "dontAsk", "--permission-prompts", "none",
# No "user" or "project" source: ~/.claude/settings.json would add ~/code to the trees and run its hooks,
# and a case's committed .claude/settings.json could run its own; --strict-mcp-config ignores a committed .mcp.json.
return ["--setting-sources", "local", "--strict-mcp-config", "--permission-mode", "dontAsk", "--permission-prompts", "none",
"--allowedTools", *allowed, "--disallowedTools", *denied]