Attack surface inventory

Attack surface inventory

Date: 2026-06-19

Scope: launch review inventory for agentic-sandbox management, agent, VM, container, credential, filesystem, network, and release/build surfaces. This document closes the documentation deliverable for Gitea issue #505.

Status legend

StatusMeaning
DefaultPresent in the default local-first deployment path.
OptionalPresent only when a runtime, profile, or feature is enabled.
DeprecatedHistorical or compatibility path that should not be used for launch.
PlannedArchitecture direction exists, but implementation is not complete.
OpenKnown gap or verification item.

Management service surfaces

SurfaceDefault bindingPurposeAuthentication / identityStatusNotes
gRPC `8120``127.0.0.1:8120` by code defaultAgent control stream and bootstrap-related control planeUDS peer credentials, vsock identity, or mTLS client identity for secure agent pathsDefaultPlain TCP has no transport identity and is rejected for agent identity. Non-loopback listener profiles require explicit verification.
WebSocket `8121`Derived from gRPC bindRealtime metrics and telemetryLocal-host operator access; no general remote admin auth claimDefaultTreat as local operator-only unless placed behind an authenticated reverse proxy.
HTTP REST and dashboard `8122`Derived from gRPC bindDashboard, REST API, health, admin, containers, credentials, startup profilesLocal-host operator access; selected session dispatch requires bearer tokenDefaultDo not expose directly on untrusted networks.
Metrics over HTTP `8122`Same HTTP listenerPrometheus-style scrape and health visibilitySame listener boundary as HTTP APIDefaultMetrics can disclose inventory and state; keep local or gated.
Deployment compose host ports`127.0.0.1:8120-8122` in production composeContainerized management accessHost loopback publish; container may listen on `0.0.0.0` internallyOptionalHost publish boundary is the security boundary for production compose.

Agent transport surfaces

TransportPurposeIdentity modelStatusLaunch boundary
Unix domain socketLocal/container agent connectionPeer credentialsDefault / OptionalPreferred for same-host local agents.
vsockHost-to-VM control channelCID/port identity contextOptionalPreferred VM local channel where available.
mTLSRemote or bridged agent controlClient certificate and server CAOptionalRequired when crossing a network boundary.
TCP without transport identityLegacy/plain connectivityNoneDeprecatedNot acceptable for launch claims of authenticated agent control.
Legacy `x-agent-secret` / `AGENT_SECRET`Historical bearer agent authShared secretDeprecatedRetired; docs and diagrams should not present it as current architecture.

HTTP API surfaces

API familyPurposeSensitive operationsStatusNotes
`/api/v1/sessions`Session lifecycle and dispatchCommand dispatch, session controlDefaultDispatch requires bearer token from `aiwg serve`; other local operator operations rely on local binding.
`/api/v2/admin`Admin and runtime controlRuntime state, bootstrapping, legacy retirement noticesDefaultLegacy shared-secret rotation returns retired/gone.
`/api/v2/credentials`Credential metadata and lease managementWrite-only credential metadata, lease issue/revokeDefault / EmergingAPI must never return secret values. Treat lease materialization as sensitive workload handoff.
`/api/v2/startup-profiles`Startup policyCredential refs, command/profile wiringDefault / EmergingStores metadata refs, not provider token blobs.
`/api/v1/containers` and related image APIsContainer runtime launchEnvironment and transport bootstrap materialOptionalRequires profile-specific validation of env redaction and bootstrap token lifetime.
Static dashboard UIOperator browser UISession state and controlsDefaultEmbedded dashboard assets now ship a CSP without inline script allowance, and sentinel DOM-sink regression covers representative user-controlled render paths. Remote multi-user admin hardening remains outside the current claim.

Runtime and isolation surfaces

RuntimeBoundaryHost touchpointsStatusNotes
QEMU/KVM VMHardware virtualization plus configured shared storage/networklibvirt/qemu, cloud-init ISO, virtiofs/9p-style shares, vsock/mTLSDefault / OptionalStrongest isolation path. Base image, seed ISO, and loadout hashes are recorded in VM metadata. Mount flags and seclabel/sVirt remain verification items.
Container runtimeNamespace/cgroup boundaryDocker/rootless Docker, image entrypoint, env/mountsOptionalDev test compose drops caps and uses read-only FS. Other images and Dockerfiles need release verification.
Host-direct agentProcess boundary on hostHost filesystem, UDS, envOptionalTreat as trusted local automation rather than tenant isolation.
Future remote/cloud runtimesNetwork boundarymTLS, provisioning APIs, workload credentialsPlannedRequires remote auth, policy, and evidence beyond local-first launch posture.

Network surfaces

SurfaceDirectionStatusRisk / control
Host loopback management planeOperator to managementDefaultPrimary launch assumption. Keep local or behind authenticated reverse proxy.
VM bridge or vsockVM agent to managementOptionalUse vsock or mTLS; avoid plaintext bridged TCP.
Guest workload egressAgent workload to internet or internal servicesOptionalNeeds explicit network profile: isolated, allowlist, or full egress.
Docker networkContainers to management and external servicesOptionalHost port publishing and network policy define exposure.
Docker API socketManagement to Docker daemonOptionalRaw `docker.sock` is not mounted by default dev compose; use a restricted socket proxy if needed.
Credential proxyWorkload to upstream web/API/Git/S3/registry/database service through host brokerEmergingHTTP/API backend is implemented at `/api/v2/credential-proxy/http` with lease-bound host/path/method/header policy, per-active-lease/session rate limits, broker-side credential injection, and response redaction. Broader protocol adapters, audit expansion, and egress/bypass controls remain follow-up work before broad non-exposure claims. Not suitable for every provider or CLI.

Filesystem and mount surfaces

SurfaceContentsStatusRequired controls
Shared workspace / agentshareProject files, agent output, inbox/drop areasDefaultPrinciple of least write access; clear read-only vs writable paths; avoid sharing credential directories.
Cloud-init seed ISOBootstrap config, mTLS paths or one-time enrollment tokenOptionalTreat as sensitive until bootstrapped; restrict host permissions; detach or clean where practical.
`/etc/agentic-sandbox/grpc-mtls` in guestAgent mTLS CA/cert/keyOptionalCert/key files must use restricted ownership and private key mode.
`/run/agentic-sandbox/credentials` in guestSession-scoped credential lease filesEmergingRuntime dir mode `0700`; values must not be durable or logged.
Credential refs policyCredential ids, provider, allowed use, target hintsEmergingMetadata only; reject inline `value` or secret-like fields.
Base qcow2 / overlaysVM base image and per-session overlayDefault / OptionalPin ISO/base hashes, record manifest, verify backing chain.
Docker volumes and tmpfsContainer state and temp storageOptionalPrefer tmpfs for transient secrets and read-only root filesystems where feasible.

Credential surfaces

SurfaceSecret exposure modelStatusDecision
Credential metadata APIStores ids, provider, allowed use, and backend refsEmergingSecret values are write-only and must not be returned in API responses.
Startup profilesPersist credential referencesEmergingProfiles must not store env blobs or token values.
Agent credential ref contractAgent receives metadata refs and target hintsEmergingInline secret values are rejected by parser tests.
Lease file materializationWorkload receives local file secretEmergingRequired for provider CLIs and tools that need local files. Use tmpfs/runtime-scoped paths.
Final-child environment materializationWorkload receives env var only at final process launchEmergingLast resort for tools with no file or proxy option. Never place values in durable env files, command args, logs, or inventory.
Credential proxy backendWorkload calls upstream through brokerEmergingHTTP/API proxy backend is implemented for clients that can target the broker. Database support and other protocols are feasibility-gated. Provider CLIs, env-only tools, SSH private keys, and browser/device-code login state may still require file or final-child-env delivery.
Manual interactive authHuman signs in through provider UI/CLIOptionalAllowed only as explicit policy exception with no false non-exposure claim.

Logging and audit surfaces

SurfacePotentially sensitive dataStatusControls
Management logsSession ids, transport errors, bootstrap eventsDefaultRedact bootstrap tokens, credentials, and command args.
Agent logsProvider readiness, command status, transport diagnosticsDefaultProvider readiness may report presence, never values.
PTY transcript and replay metadataUser and agent terminal outputOptionalTreat as sensitive by default; do not include credential values or lease material in metadata.
Inventory/status APIsRuntime state, image refs, profiles, credential metadataDefaultNever include provider token values, private keys, or bootstrap tokens.
Crash and cleanup pathsResidual lease files, overlays, seed ISOsOpenNeed explicit crash-path revocation and cleanup verification.
Credential proxy auditLease use, upstream target, action, decision, status classOpenHTTP/API proxy avoids returning injected credentials, redacts proxy responses, and enforces configured per-lease/session request limits. Dedicated audit events for credential id, lease id, session id, adapter, host, route/action, decision, status class, and redaction profile remain follow-up work. Must not log upstream bearer values, API keys, cookies, signed URLs, private keys, or full bodies without a redacted capture policy.

Release and build surfaces

SurfaceStatusRequired launch evidence
CI workflowsPartialSHA-pinned actions and no deprecated actions in release-critical workflows.
Container base imagesPartialDigest-pinned `FROM` lines or explicit exclusion from release.
npm/global installersPartialVersion-pinned active release paths; backup and legacy paths excluded or linted.
ISO and qcow2 imagesPartialPopulated ISO pins, verified downloads, qcow2 manifest, backing-chain verification, and VM metadata hashes.
Loadout manifestsPartialSource and resolved manifest hashes recorded in VM metadata.
Rust/Python dependenciesOpenDependency vulnerability and lockfile verification evidence.

Launch-safe external wording

Use:

  • "Local-first management plane with loopback defaults and secure agent

transport options."

  • "Agent control can use UDS, vsock, or mTLS transport identity."
  • "Credential APIs and startup profiles use metadata references instead of

returning or persisting provider token values."

  • "Credential delivery is policy-driven: proxy where protocols allow it,

materialize short-lived files or final-process env only when tools require local secrets."

  • "Proxy-backed credential delivery is emerging for HTTP/API protocols that

can be mediated; it requires audit evidence and bypass controls before supporting broad non-exposure claims."

Avoid until follow-ups close:

  • "All management APIs are remotely authenticated."
  • "No secrets ever enter a VM or container."
  • "All images and build inputs are fully pinned and reproducible."
  • "The browser UI is fully hardened for remote multi-user administration."
  • "Crash cleanup guarantees credential revocation in every runtime."