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
Commit a0b1eea
Browse filesBrowse the repository at this point in the historyBrowse files
fix(permission): let resolved twins only tighten, and keep project files spelled through a link inside
A generated allow twin was appended right after its rule, so it could land
after a deny the user wrote for the real path and win under last-match-wins:
{"/private/tmp/*": "deny", "/tmp/*": "allow"} allowed /private/tmp/x. Allow
twins now go before the authored rules of the same config, so an authored
deny or ask for the real path keeps winning while an unmatched real path
still gets the allow. Deny and ask twins still follow their rule.
The in-project check compared the authored path lexically against the
realpath'd project directory, so a project file spelled through a link to the
project (/var vs /private/var, a symlinked ~/code) was treated as external:
builder prompted and analyst refused its own files. The authored side is now
decided on the real location of the parent, so an outside link entry still
asks while files under it stay inside.
The link-budget error carries code ELOOP, and a rule whose resolved twin
cannot be built is logged at debug level.
Docs: the agent permissions example uses builder, since analyst's shell is
always denied, and the analyst pages say a global "*": "allow" also turns on
MCP and custom tools for analyst, including ones that write.
Tests: twin vs an authored deny in both orders, a project file spelled
through a link in both check variants, patterned analyst grants, and two
skill folders with a sibling folder sharing a prefix.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: docs/docs/configure/agents.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ The agent for asking questions about your data. Truly read-only mode for safe da
29
29
-**Web**: Fetch and search allowed without prompts
30
30
-**Schema/warehouse/finops**: All inspection tools available
31
31
-**Workspace knowledge**: Loads workspace and project skills; reads workspace memory and views this checkout's memory audit log. Can read files bundled with skills, including global skills stored outside the project. Reloading memory syncs the local copy with the workspace, which can remove a local copy of a block the workspace archived. Saving memory is done with `builder`.
32
-
-**Config overrides**: A permission config such as `"*": "allow"` cannot turn file edits, SQL writes (including data diffs of arbitrary queries), shell, memory saves, warehouse connection or MCP config changes, training imports, sample project setup, feedback submission, batch tool calls or delegation beyond `data-explorer` back on
32
+
-**Config overrides**: A permission config such as `"*": "allow"` cannot turn file edits, SQL writes (including data diffs of arbitrary queries), shell, memory saves, warehouse connection or MCP config changes, training imports, sample project setup, feedback submission, batch tool calls or delegation beyond `data-explorer` back on A global `"*": "allow"` does turn on MCP and custom tools for analyst, including ones that write (for example a SQL MCP server); to keep them from analyst, put the `"*": "allow"` under `agent.builder` instead of the global config, or deny those tools under `agent.analyst.permission`.
33
33
34
34
!!! tip
35
35
Use `analyst` when exploring data to ensure no accidental writes. Switch to `builder` when you're ready to create or modify models.
@@ -122,7 +122,7 @@ Each agent can have its own permission overrides:
122
122
```json
123
123
{
124
124
"agent": {
125
-
"analyst": {
125
+
"builder": {
126
126
"permission": {
127
127
"write": "deny",
128
128
"edit": "deny",
@@ -138,6 +138,8 @@ Each agent can have its own permission overrides:
138
138
}
139
139
```
140
140
141
+
`analyst` already denies its shell and built-in write tools whatever its config says, so its config is only useful to restrict it further (for example `"webfetch": "deny"`) or to allow MCP and custom tools.
142
+
141
143
!!! warning
142
144
Agent-specific permissions override global permissions. A `"deny"` at the agent level cannot be overridden by a global `"allow"`.
Copy file name to clipboardExpand all lines: docs/docs/configure/permissions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,7 +80,7 @@ Override permissions for specific agents:
80
80
}
81
81
```
82
82
83
-
The `analyst` agent's shell and built-in write tools (file edits, SQL writes, memory saves and the other built-in tools that change state) stay denied even if its permission config allows them. Training entries remain available through `training_save` and `training_remove`, and analyst can create session scratch tables. MCP and custom tools follow your config, and config can still restrict analyst further.
83
+
The `analyst` agent's shell and built-in write tools (file edits, SQL writes, memory saves and the other built-in tools that change state) stay denied even if its permission config allows them. Training entries remain available through `training_save` and `training_remove`, and analyst can create session scratch tables. MCP and custom tools follow your config, so a global `"*": "allow"` turns them on for analyst too, including ones that write. Config can still restrict analyst further.
84
84
85
85
Rules are evaluated in order and the last matching rule wins, so put a `"*"` rule before the more specific patterns it should not override.
-**No shell.** Bash is denied. Files are read with the read, grep and glob tools
92
92
-**No memory saves.** Workspace memory blocks can be read, but not saved, extracted or deleted (use builder). Training entries can still be saved and removed
93
-
-**Config cannot lift these.** A permission config such as `"*": "allow"` does not turn file edits, SQL writes (including data diffs of arbitrary queries), shell, memory saves, warehouse connection or MCP config changes, training imports, sample project setup, feedback submission, batch tool calls or delegation beyond `data-explorer` back on for analyst
93
+
-**Config cannot lift these.** A permission config such as `"*": "allow"` does not turn file edits, SQL writes (including data diffs of arbitrary queries), shell, memory saves, warehouse connection or MCP config changes, training imports, sample project setup, feedback submission, batch tool calls or delegation beyond `data-explorer` back on for analyst MCP and custom tools are not covered: a global `"*": "allow"` turns them on for analyst too, including ones that write.
94
94
-**Skill files readable.** Files bundled with a skill, including global skills stored outside the project, can be read
95
95
-**Full web access.** Fetch and search allowed without prompts
96
96
-**All inspection tools.** Schema, warehouse, finops, lineage, and core analysis tools available
0 commit comments