Skip to main content
FTL treats AI coding agents as untrustworthy by construction. The agent never sees your real API keys, never touches your host filesystem, and cannot merge changes without explicit human approval.

Isolation layers

FTL enforces zero-trust through multiple isolation mechanisms working together:

1. Docker sandbox

The agent runs entirely inside a Docker container. Your real project files never enter the container — instead, FTL creates a snapshot and mounts it read-only:
The :ro flag ensures snapshots are read-only. The agent can only modify /workspace, which is wiped on every task reset.
Containers are resource-constrained:
  • Memory: 2GB
  • CPU: 2 cores
  • Network: Bridge mode with host gateway for proxy access

2. Shadow credentials

Your real API keys never enter the container. FTL generates fake shadow values and injects them as environment variables:
Example transformation:
The agent writes code using these shadow values. Before merge, FTL’s lint scanner detects any hardcoded shadow patterns:
Shadow credentials are not a substitute for read-only API keys. They prevent accidental leaks, but the agent can still use them to make API calls if the proxy is enabled.

3. Network proxy (optional)

When the proxy is enabled, shadow credentials are swapped back to real values at the network layer:
Flow:
The proxy handles both HTTP and HTTPS via MITM with an ephemeral CA:
The CA is installed in the container’s trust store before the agent runs:
The proxy is optional. Install with pip install -e ".[proxy]". Without it, the agent can only use shadow values — live API calls will fail unless you use test/sandbox API keys.

4. Human-in-the-loop approval

No changes touch your real filesystem without explicit approval. After the agent finishes, FTL shows you a diff and waits for your decision:
Merge process:
Only the changed files are copied back. FTL uses the diff as the merge source, not a full directory sync.

Guardrails

Local lint scanner

By default, FTL runs a static analysis pass over the diff before showing the review prompt:
Violations are displayed with file path and line number, but they’re advisory only — you can still approve the merge.

Bedrock Guardrails (AWS mode)

When guardrail_id is set in .ftlconfig, FTL applies a Bedrock Guardrail to the full diff text before the human review step:
Bedrock Guardrails hard-blocks the merge. If credentials or PII are detected, changes are discarded automatically with no review option.

Agent authentication

The agent needs its own API key to make LLM calls (e.g., Claude Code needs ANTHROPIC_API_KEY). FTL forwards these from the host environment:
These are written to a file inside the container and sourced before agent commands:
Agent auth keys are separate from project secrets. The agent’s ANTHROPIC_API_KEY is for making LLM calls. Shadow credentials are for the agent’s generated code to call external APIs.

Rollback and snapshots

Every task creates a snapshot before the agent runs. If you reject changes, the snapshot remains available:
Snapshots are stored in ~/.ftl/snapshots/<id>/ by default, or S3 when "snapshot_backend": "s3" is configured.

Threat model

FTL defends against:
  • Credential leaks: Agent writes STRIPE_SECRET_KEY=sk_live_... to a config file
  • Filesystem access: Agent tries to read ~/.ssh/id_rsa or modify files outside /workspace
  • Resource exhaustion: Agent spawns infinite loops or forkbombs (constrained by Docker memory/CPU limits)
  • Accidental destructive operations: Agent runs rm -rf / or DROP DATABASE production
FTL does not defend against:
  • Intentional misuse of live API calls: If the proxy is enabled and you approve code that calls stripe.charges.create() with real keys, the charge will go through
  • Social engineering: The agent can write code that looks safe but contains logic bombs triggered later
  • Supply chain attacks: If the agent’s dependencies (Claude Code, Aider, etc.) are compromised, FTL cannot detect it
FTL is not a substitute for code review. Always inspect the diff before approving, especially when the agent has access to production API keys via the proxy.