Lateral movement through an AI‑driven SDK can let an attacker pivot from a single compromised workload to the entire internal network.
When teams embed the Claude Agent SDK into their services, the SDK often runs with a service account that has broad read/write privileges across databases, SSH hosts, and internal HTTP APIs. The credential is typically stored in the container image or a static secret file, and the SDK reaches its targets directly, bypassing any central policy enforcement. In that raw state, a malicious actor who gains control of the SDK can issue arbitrary commands, exfiltrate data, or chain together access to other systems without any audit trail.
Why the current setup leaves lateral movement unchecked
The initial deployment model relies on three layers:
- Setup: an OIDC‑authenticated service identity is provisioned, and the SDK is given a static token or key that grants it access to the target resources.
- The data path: the SDK talks straight to the database, SSH daemon, or HTTP endpoint over the network. No gateway inspects the traffic.
- Enforcement outcomes: none exist because there is no point where the request can be examined, approved, or recorded.
Even if the identity is tightly scoped, the request still reaches the backend directly. The system cannot enforce command‑level policies, mask sensitive fields, or require a human approval step before a dangerous operation runs. Consequently, lateral movement remains possible and invisible.
Placing hoop.dev in the data path
hoop.dev is a Layer 7 gateway that sits between the Claude Agent SDK and the infrastructure it talks to. By routing every SDK request through hoop.dev, the following enforcement outcomes become available:
- Session recording: hoop.dev captures the full request and response stream, creating a replay log that can be used for forensic analysis.
- Inline data masking: any response that contains PII or credentials is redacted before it reaches the SDK, preventing accidental leakage.
- Just‑in‑time (JIT) approval: high‑risk commands trigger a workflow that requires a human to approve the action before it is forwarded.
- Command blocking: known dangerous patterns (e.g., “DROP DATABASE” or “sudo su”) are rejected at the gateway, stopping the lateral move before it starts.
Because hoop.dev is the only point where traffic is inspected, the enforcement outcomes exist solely because hoop.dev occupies the data path. The original service identity and token provisioning remain unchanged; hoop.dev simply adds a control plane that the SDK cannot bypass.
How hoop.dev stops lateral movement in practice
When the Claude Agent SDK initiates a connection, hoop.dev first validates the OIDC token presented by the SDK. The token proves the SDK’s identity but does not grant any direct access to the backend. hoop.dev then evaluates the request against policies that define which commands are allowed for that identity, whether a JIT approval is required, and which response fields must be masked.
