Why is loopback binding a security boundary?
The released CLI declares a global --listen flag whose default is 127.0.0.1. Both report serve and the optional record web UI route through start_web_server_if_enabled. The web server calls TcpListener::bind on the selected socket address, so the explicit bind address, not merely the URL printed to the terminal, defines which network interfaces accept connections.
This review is pinned to AgentSight v1.0.35 at c1574366122a90c451bca6a84713e28813ab95e2. It is a source-level reachability and request-gating audit, not a remote exploitation test or an observed production incident. Whether another machine can connect also depends on host firewalls, container port publishing, proxies, and network topology.
Five configurations, three different protections
| Mode | Listener | API authorization | Interpretation |
|---|---|---|---|
| report serve; default --listen | 127.0.0.1:7395 | No Direct Node auth configured | Only local host can connect under ordinary host networking; local callers can read the snapshot |
| record with web UI enabled; default --listen | 127.0.0.1:7395 | No Direct Node auth configured | Live capture endpoint is loopback-bound by default |
| report serve --listen 0.0.0.0 | All IPv4 interfaces | No Direct Node auth configured | A reachable same-network client without Origin can request evidence; do not expose without an independent access-control boundary |
| bind; default --listen | 127.0.0.1:7395 | Bootstrap bearer token and scoped capabilities | Protected protocol routes require bearer authorization; trusted app Origin is separately checked |
| bind --listen 0.0.0.0 --endpoint ... | All IPv4 interfaces | Direct Node auth remains enabled | Explicit remote reachability does not remove capability checks; secure network transport and key handling still matter |
A default loopback listener reduces network reachability. An HTTP Origin check controls a subset of cross-origin browser requests. A bearer capability check authorizes API reads. These controls are not interchangeable.
What does the local API actually authorize?
In WebServer::new_with_db_path, direct_auth is initially None. For GET /api/v1/snapshot,protocol_access_allowed returns origin.is_none() in that mode. A request that supplies an unapproved Origin is refused earlier, but a non-browser client or ordinary same-origin request may omit that header. Consequently an Origin check is not authentication for an explicitly network-exposed local server.
The snapshot API can return reconstructed LLM and audit evidence: saved SQLite data when a DB path is selected, or the live materialized view with recent local native sessions otherwise. Captured artifacts can include prompts, responses, file paths, headers, and network targets. The non-authenticated local-mode branch does not mint capabilities;POST /api/v1/capabilities returns 404 without Direct access. Saved captures also refuse live overview and session messaging requests; read-only does not mean non-sensitive.
How is agentsight bind different?
agentsight bind constructs the web server withwith_direct_access. The root bootstrap key is required to mint delegated capabilities, and protected protocol reads check bearer tokens against action and optional session scope. The allowed hosted-app Origin is enforced separately. Capability validity is bounded by expiry; a persisted capability is not equivalent to a permanent anonymous API. The Direct Node credential analysis examines token pairing, relay, and browser handling in more detail.
Conversely, bind is not a generic TLS terminator. If exposing it beyond the local machine, evaluate network and endpoint transport separately; the existence of bearer tokens does not justify opening an unencrypted endpoint to an untrusted network.
Safe, reproducible checks on your own machine
To inspect the default behavior, use a non-sensitive local saved capture, keep the listener on loopback, and inspect the reported authorization flag. The following does not alter a firewall or open a public listener.
# Terminal 1: keep the saved-session UI local
agentsight report serve --db ./example.db --server-port 7395
# Terminal 2: inspect only this host's listener and protocol metadata
curl --silent http://127.0.0.1:7395/api/v1/info
# For local-mode report serve, authorization_required is false
# Do not replace the loopback listener with 0.0.0.0 just for inspection.Verify the exact listener with your operating system's socket tools and examine any reverse proxy, container port mapping, or forwarding. If evidence must be viewed remotely, use an explicitly authenticated architecture such as Direct Node with appropriately secured transport, or place a separate access-controlled tunnel in front of a loopback listener. Never assume that CORS is a network firewall.
Limitations and decision
This audit proves the released control flow and the threat boundary under an explicitly reachable listener; it does not establish unauthorized external access to any real deployment. Other users on the same host may have different local access depending on their OS privileges and process isolation. HTTP/1.1 routing, no-store JSON responses, and the Direct capability tests do not replace an end-to-end network deployment audit.
The practical rule is simple: keep ordinary report/record web servers on loopback. If you need browser pairing or remote access, select a properly secured mechanism with actual authentication and transport controls. For selection of the saved evidence itself, read the report input-source analysis. For the canonical command reference, see AgentSight documentation.
Versioned primary sources
- CLI-wide --listen default and report serve dispatch
- Loopback constant and local web-server construction
- HTTP request gating, snapshot contents, Origin handling, and regression tests
- Direct Node bootstrap key and allowed Origin
- Capability validation and action/session scopes
- Public product data-sensitivity guidance
- AgentSight v1.0.35 release