Skip to content

security(agent-server): isolate builder tools from process secrets and sibling projects #19

Description

@alexanderkreidich

Problem

agent-server 0.2.1 hosts every project in one process and gives each Pi session the default read, bash, edit, and write tools. These tools execute in the outer container:

  • bash inherits the whole agent-server process environment, including AGENT_SERVER_TOKEN and LITELLM_API_KEY;
  • file tools accept absolute paths, so a project session can read sibling workspaces and .pi-global;
  • every project shares one rootless Podman socket/store, so podman can inspect or mutate sibling app resources;
  • unrestricted network access lets generated commands reach arbitrary Internet/private/metadata endpoints.

OpenOrange's HTTP proxy authorizes projects correctly, but that does not form a tenant boundary once one authorized session can escape through the shared builder shell.

Concrete trigger

An owner sends a prompt asking the builder to run commands equivalent to:

env | grep -E '^(AGENT_SERVER_TOKEN|LITELLM_API_KEY)='
find /workspace -maxdepth 2 -type f
podman ps -a

The tool subprocess inherits the process env and operates against the shared workspace/store.

Required properties

  • provider credentials and the server bearer token must not exist in tool subprocess environments;
  • all file tools must be confined to the current project root, including symlink/canonical-path checks;
  • project shell/container operations must not be able to address sibling projects/resources;
  • egress must have an enforceable policy that blocks private/link-local/cloud-metadata targets while retaining package/image/model access required to build apps;
  • regression tests should prove a malicious prompt/tool call cannot read process secrets, sibling workspace/session files, sibling Podman resources, or private-network targets.

Prompt instructions such as “never print secrets” are not a security boundary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions