Lateral movement through nested agents is a silent pathway for attackers to expand their foothold.
Many organizations stitch together automation pipelines by spawning short‑lived agents that call other agents, which in turn connect to databases, Kubernetes clusters, or remote hosts. The practice is convenient, but it also creates a chain of trust where each link inherits the credentials of the previous one. In practice, a single compromised service account can be used to spin up a new agent that reaches deeper systems without any additional verification. The result is a cascade of privileged connections that bypasses human review and leaves no trace of who executed which command.
Teams typically rely on static service accounts or long‑lived tokens to bootstrap these agents. The initial identity is verified once, then the agent is allowed to connect directly to the target resource. No audit log records the individual commands that traverse the chain, and no inline guardrails inspect the data flowing between hops. The setup satisfies the need for automated access, but it leaves the request path wide open: the request still reaches the database, the Kubernetes API, or the SSH daemon directly, without any opportunity for real‑time approval, masking, or blocking.
Why lateral movement matters in nested agents
When an attacker gains control of a single agent, they inherit every permission that the agent was granted. Because the agent can launch additional agents, the attacker can pivot laterally across environments that were never intended to be reachable from the original point of compromise. This amplifies the blast radius, makes forensic analysis difficult, and defeats traditional perimeter defenses that focus on single‑hop connections.
Mitigating this risk requires more than just rotating credentials. The core problem is that enforcement is happening outside the data path. Identity providers, IAM policies, and service‑account configurations decide who may start a session, but they do not inspect the traffic that actually crosses the network boundary. Without a control point that sits between the identity layer and the target resource, there is no place to enforce command‑level policies, capture session data, or apply real‑time masking of sensitive fields.
Introducing an identity‑aware gateway as the data path
Placing a Layer 7 gateway between the caller and the infrastructure creates a single, enforceable boundary. The gateway authenticates the caller via OIDC or SAML, extracts group membership, and then proxies the connection to the target. Because every packet passes through the gateway, it can enforce policies that were previously impossible.
hoop.dev acts as that gateway. It runs a network‑resident agent next to each resource and proxies connections to databases, Kubernetes clusters, SSH servers, and HTTP services. The gateway holds the credential for the target, so the original caller never sees it.
Setup: identity and provisioning
The first step is to configure an identity provider (Okta, Azure AD, Google Workspace, etc.) and issue OIDC tokens to users and automated agents. These tokens identify the caller and convey group membership. Separate service accounts or roles are created for each automation pipeline, granting only the minimal permissions required to register a connection with the gateway.
