Proposal: Make permission checks required for file writes and terminal execution #928
Replies: 3 comments
-
|
Additional context — cross-protocol composition risk: When ACP-Client agents also use MCP tools (as Claude Code, Codex CLI, and JetBrains agents do), the lack of mandatory permission becomes a cross-protocol injection risk. MCP tool responses contain attacker-controlled content (web pages, database rows, git commits) with no sanitization or source marking. This content flows through the agent's context into Making permission mandatory for these operations would provide a defense-in-depth layer against cross-protocol injection, even when the upstream protocol (MCP) fails to sanitize its output. We have reported the MCP-side issue separately to the MCP maintainers. |
Beta Was this translation helpful? Give feedback.
-
|
Additional findings from formal security analysis Beyond the filesystem/terminal permission issue above, our analysis of the ACP-Client specification and Python SDK (v0.9.0) identified several additional areas where security infrastructure could be strengthened. These are design recommendations for future protocol development.
The existing |
Beta Was this translation helpful? Give feedback.
-
|
Hi, this is the responsibility of each agent, as they often have their own permission setups with different settings and mechanisms for users who want to allow many actions to occur without a need for them to explicitly allow it. If we enforced this at the SDK level, people who use more automated flows would be frustrated that it was asking them for permission every time. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
The ACP specification defines
session/request_permissionas a MAY-level mechanism; agents can request permission before sensitive operations, but are not required to. Forfs/write_text_fileandterminal/create, this means:Given that ACP agents (coding agents like Claude Code, Codex CLI, Augment Code) have direct filesystem and terminal access, the security impact of skipping the permission check is high: an agent acting on untrusted input could write to security-sensitive locations or execute arbitrary commands.
Evidence
We analyzed the Python SDK (
agent-client-protocolv0.9.0):1.
write_text_filedoes not check permission:There is no call to
request_permissionbeforewrite_text_file. An agent can write to any path without asking.2.
create_terminaldoes not check permission:Same pattern — terminal creation proceeds without any permission gate.
3. No path restriction exists:
4. The permission mechanism exists but is optional:
Proposed Change
Make
request_permissionmandatory (MUST) for operations that modify the filesystem or execute commands(at least for the credential files or system files like .ssh/authorized_keys):fs/write_text_file— MUST request permission before writingterminal/create— MUST request permission before creating a terminalterminal/kill— SHOULD request permissionThe existing
request_permissionmechanism withallow_once/allow_always/reject_once/reject_alwaysoptions is well-designed for this — it just needs to be required rather than optional for these high-impact operations.Additionally, consider adding workspace-scoped path restrictions:
Why This Matters
ACP-Client is used by coding agents that operate on users' source code. When these agents are connected to external tools (e.g., via MCP), content from untrusted sources can influence agent behavior. If the agent writes untrusted content to the filesystem without permission, the result is effectively arbitrary code execution in the user's development environment.
The permission mechanism already exists and is well-designed. This proposal just makes it mandatory where the security impact is highest.
Beta Was this translation helpful? Give feedback.
All reactions