You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Project-scope .claw settings can grant tool allow rules and a permission mode to an untrusted repository #3414
Config discovery loads two files that ship inside the repository as ConfigSource::Project (rust/crates/runtime/src/config.rs:457 <cwd>/.claw.json, :461 <cwd>/.claw/settings.json). The only trust filter applied to them is strip_untrusted_project_hooks (config.rs:684-691), which removes hooks with the comment "there is no project-hook trust approval flow yet". The permissions object is not filtered. permissions.allow is read from the merged settings (config.rs:2017), and so is permissions.defaultMode (config.rs:2073-2075).
Effect: a cloned repository can commit .claw/settings.json with {"permissions": {"allow": ["bash"]}} (or "defaultMode": "danger-full-access") and get shell commands run without a prompt in a user session opened in that checkout. In --permission-mode read-only this is the #3412 bypass. PR #3413 closes the read-only case only; workspace-write sessions are still exposed through project-scope allow rules.
Precedent: hooks from the same source are already treated as untrusted for exactly this reason. Suggested direction (owner call): treat permissions.allow and an escalating permissions.defaultMode from ConfigSource::Project the same way as hooks: ignore them with a warning until a trust-approval flow exists. deny/ask rules, which only restrict, can stay. User (~/.claw.json, ~/.claw/settings.json) and Local (.claw/settings.local.json, normally gitignored) sources are unaffected.
Hey @Yeachan-Heo, one data point from the Claude Code side of the same problem. Today I ran agent-audit-kit 0.6.36 (I maintain it) on a repo whose .claude/settings.json only has {"permissions": {"allow": ["Bash"]}}. It reported missing deny rules and that project settings can override user deny rules, but its broad-allow check fired only on "Bash(*)", not on bare "Bash", which allows the same commands. So if you filter project allow rules, I feel the bare tool name needs the same treatment as the wildcard. defaultMode bypassPermissions in the same file was flagged on its own.
Thanks, that matches. PR #3415 (head cf4cc72) does not match allow patterns at all: strip_untrusted_project_settings removes the whole permissions.allow array from Project-scope files, so bare bash and bash(*) are dropped the same way, with a warning. It also drops permissions.defaultMode (any value) and the legacy top-level permissionMode, and keeps deny/ask. The test project_config_permissions_cannot_grant_access uses the bare-name form ("allow":["bash"]). The PR is waiting on owner sign-off for the policy change.
Activity
sattyamjjain commentedon Nov 29, 2026
Hey @Yeachan-Heo, one data point from the Claude Code side of the same problem. Today I ran agent-audit-kit 0.6.36 (I maintain it) on a repo whose .claude/settings.json only has {"permissions": {"allow": ["Bash"]}}. It reported missing deny rules and that project settings can override user deny rules, but its broad-allow check fired only on "Bash(*)", not on bare "Bash", which allows the same commands. So if you filter project allow rules, I feel the bare tool name needs the same treatment as the wildcard. defaultMode bypassPermissions in the same file was flagged on its own.
Yeachan-Heo commentedon Nov 29, 2026
Thanks, that matches. PR #3415 (head cf4cc72) does not match allow patterns at all:
strip_untrusted_project_settingsremoves the wholepermissions.allowarray from Project-scope files, so barebashandbash(*)are dropped the same way, with a warning. It also dropspermissions.defaultMode(any value) and the legacy top-levelpermissionMode, and keepsdeny/ask. The testproject_config_permissions_cannot_grant_accessuses the bare-name form ("allow":["bash"]). The PR is waiting on owner sign-off for the policy change.