Skip to content

Constrain service session capabilities - #1111

Merged
edwin-zvs merged 2 commits into
mainfrom
service-least-privilege
Aug 1, 2026
Merged

Constrain service session capabilities#1111
edwin-zvs merged 2 commits into
mainfrom
service-least-privilege

Conversation

@edwin-zvs

Copy link
Copy Markdown
Contributor

Summary: service-created sessions default to denying fleet-control tools and Construct MCP, while retaining opt-in controls and skills behavior; preserve configured sandbox limits across unrelated edits. Verification: cargo test -p construct-daemon service, cargo test -p construct-adapter-smith tools, cargo build. Relevant binary: construct at target/debug/construct.

A service turns a request body into a prompt, so prompt injection is the
normal case for a service session and the attacker writes the text. Those
sessions nonetheless held smith's full daemon-control surface: a request
could ask the agent to enumerate every session on the machine, read their
transcripts, drive them with synthesized input, or delete them.

Verified against a live daemon: a service session prompted only over HTTP
called agentd_list_sessions and returned every session id including the
orchestrator's, then called agentd_send_input against another session with
attacker-chosen text. Only the interactive approval gate stopped the write
— a prompt shown to a human who is not necessarily watching, on a session
a stranger created. Enumeration needed no approval at all.

Confine service sessions at creation instead. Tools that reach outside the
session, and injected fleet access for harnesses that take it that way, are
withheld unless the service definition re-grants them; the capability is
absent from the tool surface rather than gated at call time. Skills and the
session's own working tools are unaffected. Filesystem and network stay with
the harness sandbox, which a service definition must not be able to relax.

Limits are preserved across edits to unrelated fields.
@edwin-zvs
edwin-zvs merged commit 034f5e4 into main Aug 1, 2026
1 check passed
@edwin-zvs
edwin-zvs deleted the service-least-privilege branch August 1, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant