Zero-Trust Security Model
FTL is built on a zero-trust control plane:Agents are untrustworthy by construction. FTL is the layer that makes them safe to use anyway.Key principles:
- Never trust agent output — all changes require explicit human approval
- Real credentials never enter the sandbox — agents work with shadow values
- Isolation first — Docker sandbox with no host filesystem access
- Multiple verification layers — linting, guardrails, human review
Credential Management
Use Shadow Credentials
FTL automatically generates shadow credentials for all environment variables in your.env file:
Enable the Network Proxy
For live API testing, install the credential-swap proxy:Use AWS Secrets Manager for Production
For production workflows, use AWS Secrets Manager instead of.env files:
- Centralized secret storage with audit logs
- Automatic rotation support
- No secrets in Git (even in
.env.example) - IAM-based access control
Lint and Guardrail Configuration
Always Review Lint Violations
The credential linter scans for:- Hardcoded shadow credentials
- Known API key patterns (Stripe, Anthropic, AWS, GitHub, etc.)
- Dangerous SQL operations (DROP, DELETE without WHERE)
- Dangerous shell commands (rm -rf, chmod 777)
Use Bedrock Guardrails for Hard Enforcement
For critical projects, configure Bedrock Guardrails to block merges on violations:- PII detection (email, phone, SSN, credit cards)
- Credential pattern blocking (API keys, tokens)
- Content policy filtering (optional)
Sandbox Isolation
Never Mount Host Directories
FTL uses rsync to copy your project into the sandbox. Never mount your host filesystem directly into the container:Restrict Agent Environment Variables
By default, FTL only forwards credentials and variables explicitly listed inagent_env:
shadow_env— credentials to replace with shadow valuesagent_env— non-sensitive variables to forward as-is
agent_env. Use shadow_env instead.
Review Container Persistence
FTL uses persistent containers to avoid cold-boot penalties. Understand what persists across tasks:
If you suspect the container is compromised:
Code Review
Always Review the Diff
FTL blocks automatic merges. You must:- Review the diff line-by-line
- Ask the agent questions about suspicious changes
- Explicitly approve (
a) or reject (r)
Verify Dangerous Operations
The linter flags destructive operations, but you must verify they’re intentional:- Is this part of a migration?
- Is there a backup?
- Should this have a
WHEREclause or condition?
Check for Logic Errors
The linter only detects patterns, not logic errors. Review for:- Missing null checks
- Incorrect error handling
- Race conditions
- Authentication bypasses
AWS Configuration Security
Use Least-Privilege IAM
If you use AWS features (S3 snapshots, Secrets Manager, Guardrails), create a dedicated IAM user with minimal permissions:Enable CloudWatch Tracing
For audit trails, enable CloudWatch logging:- Snapshot creation
- Container boot
- Agent execution
- Test results
- Guardrail decisions
Handling Secrets in Code
Never Commit .env Files
Add.env to .gitignore and .ftlignore:
Use Environment Variables Everywhere
Train the agent to always use environment variables:Rotate Credentials Periodically
Even with FTL’s protections, rotate credentials on a regular schedule:- Generate new keys in your service provider’s dashboard
- Update
.envor Secrets Manager - Revoke old keys
Incident Response
If a Credential Leaks
- Revoke the credential immediately in your service provider’s dashboard
- Check the diff for how it was exposed (hardcoded vs logged)
- Review CloudWatch logs or
~/.ftl/logs.jsonlfor the full session - Rotate all related credentials
- Update
.ftlconfigto add the credential toshadow_envif it wasn’t already
If the Container is Compromised
- Stop and remove the container:
- Check recent snapshots for malicious code:
- Review session logs:
- Next
ftl coderun will create a fresh container
Summary Checklist
- Real credentials are in
.env(or Secrets Manager), never in code -
.envis in.gitignoreand.ftlignore - Credential-swap proxy is installed (
pip install -e ".[proxy]") - Bedrock Guardrails are configured for critical projects
- CloudWatch logging is enabled for audit trails
- IAM permissions follow least-privilege principle
- All diffs are reviewed line-by-line before merge
- Lint violations are fixed, not ignored
- Credentials are rotated on a regular schedule
- Incident response plan is documented