Skip to content

Threat model

Markdown · llms.txt

This is the threat model for laissez v0. It names what laissez is meant to stop, what it assumes, and what it does not stop. A change that moves a line between these sections needs an RFD.

  • Downstream credentials: GitHub installation tokens and AWS session credentials minted for agents.
  • Root signing material: the GitHub App private key and laissez's own AWS credentials. These are the only long-lived secrets laissez holds.
  • The interception CA key: generated at start, held in memory, never written.
  • The audit log: the record of who was given what.
  • Agent to laissez. The agent is untrusted. It may be prompted, jailbroken or compromised. laissez trusts only what it can verify: an X509-SVID chain, a JWT-SVID signature, or the kernel's peer credentials.
  • laissez to upstream. GitHub, STS and tunnelled hosts are reached over TLS with certificate verification on. laissez does not trust a response that grants more than it asked for.
  • Operator to laissez. The operator writes the configuration, provides the bundles, the App key and the AWS credentials, and controls the host. laissez trusts the operator.
  • Secret theft from the agent process. The agent never holds a long-lived credential. Reading its environment, files or memory yields at most a GitHub token that expires within an hour and an AWS session that expires within 15 minutes, each limited to the agent's policy.
  • Exfiltration to unlisted hosts through the proxy. CONNECT to a host:port the agent's policy does not name is refused before any connection is made. IP literals and non-DNS host forms are refused at parse time.
  • Credential reuse across hosts. A minted token is attached only to requests inside a tunnel opened to the host it is for, and only after the request's Host matches the CONNECT target (421 otherwise). The agent's own Authorization header is removed before forwarding. On github.com only git smart HTTP paths get a credential.
  • Privilege beyond policy. Each agent's GitHub token is requested with exactly its repositories and permissions; a response with an extra repository, an extra permission or a higher level is discarded. An empty repository list is a configuration error, so no agent can receive an installation-wide token. AWS sessions carry the agent's inline session policy, which can only narrow the role.
  • Identity confusion. An X509-SVID is verified against the bundle of the trust domain in its own SPIFFE ID, never another's. A JWT-SVID needs the configured audience, a known kid, an allowed algorithm (no none, no HMAC) and an unexpired exp. Two identities on one connection must agree. Identity is re-checked for expiry on every intercepted request.
  • Interception CA misuse. The CA key lives only in memory. The certificate is name-constrained (critical) to the intercepted host names and excludes all IP addresses, so even a leaked key cannot mint a certificate a verifying client would accept for an unrelated name.
  • Downgrade to plain text. laissez never forwards http:// requests, and upstream TLS failures are 502 errors, never a retry without TLS.
  • Silent use. Every decision is audited before the credential is released. If the audit write fails, the request is refused.
  • Resource exhaustion by input. Configuration size, header sizes, JWT length, chain length, bundle size, response sizes and caches are bounded; every upstream call has a timeout. A tunnel in which no byte has moved in either direction for five minutes, or whose one side has read nothing it was sent for that long, is closed, so idle tunnels do not hold connections open.
  • Misuse within scope. An agent with contents: write on a repository can push anything to it. An agent with s3:GetObject on a bucket can read every object the policy allows. laissez narrows what a credential can do; it does not judge whether a request within that is wise. Keep policies small and read the audit log.
  • Data exfiltration through allowed destinations. An agent can put data in a request body to any allowed host, including into a repository it may write to. laissez does not inspect bodies.
  • Bypassing the proxy. If the agent can open network connections without laissez, laissez sees none of them. Network isolation is the platform's job.
  • Theft of the agent's identity credential. A JWT-SVID or a token-file token is a bearer credential until it expires (or, for token files, until laissez restarts). Whoever holds it is the agent. X509-SVIDs require the private key, which is better; peer credentials require running as the mapped uid.
  • Executable-path races on the Unix socket. The executable path is read after the connection is accepted. A process that connects and then execs another binary is seen as the new binary. Mapping on uid alone avoids the race but is coarser.
  • Local users on the AWS credentials endpoint. The endpoint listens on loopback with no peer check; any local process holding a valid JWT-SVID or token gets that agent's AWS session. Protect the token files with file permissions.
  • A compromised laissez host or operator. Whoever controls the host can read the App key, the AWS credentials and process memory, and can change the policy.
  • Shared tokens between agents with identical scopes. Two agents with the same GitHub installation, repositories and permissions share one cached token. The audit log still records which agent used it.
  • Long-lived root credentials. v0 reads its AWS credentials from the environment and the GitHub App key from a file. Running laissez itself with short-lived credentials (an instance role, or its own SPIFFE identity via RFC 8693 in v0.2) is the operator's choice today.
  • Upstream compromise. If GitHub, STS or a tunnelled host is compromised or serves a valid certificate it should not, laissez cannot tell.