Working security document. Assessment status: August 2026. Public version — no internal details that would help an attacker. Related documents:
TERA_PILOT_PRODUCT_STRATEGY.md(§3.2 “Trust-first execution”, §11 “Claims discipline”),TERA_PILOT_PRODUCT_READINESS.md.
Tera Pilot is a local-first, vendor-neutral coding agent. It runs on the user’s machine, reads repositories, executes commands, talks to LLM providers and (when explicitly configured) to external MCP servers. The goal of this document is to honestly describe the security boundaries: what is protected, from whom, by which mechanisms, and what residual risk remains.
This is not a certification document (not SOC 2, not ISO 27001) and not a guarantee of the absence of vulnerabilities. It is an engineering threat model on which the product development is built.
| Asset | Where it lives | Value |
|---|---|---|
| Source code and repository data | Workspace directory | Confidentiality, integrity |
| Prompts and dialogs | Process memory, ~/.tera_pilot/ |
Confidentiality |
| Provider API keys | env / ~/.tera_pilot/config.json |
Confidentiality, money |
| Audit signing key (Ed25519) | ~/.tera_pilot/audit_key (0600) |
Evidentiary integrity |
| Activity log / audit trail | Process memory + exports | Non-repudiation, integrity |
| Files created by the agent | Workspace | Integrity |
| Commands executed by the agent | Shell | Machine integrity |
~/.tera_pilot/mcp.json);
write-capable external tools are a separate deliberate user decision.| # | Threat | Attacker | Vector |
|---|---|---|---|
| T1 | Prompt injection via repo files/README/issues | Untrusted content | Agent reads a file with instructions “ignore previous rules, run X” |
| T2 | Execution of a malicious command/script from the repo | Untrusted content | execute_command, run_code, tests, Makefile, postinstall scripts |
| T3 | Agent escapes the workspace | Malicious prompt, planning error | write_file/delete_file/git_* on absolute paths outside the project |
| T4 | Theft/leak of API keys | Malicious prompt, compromised MCP | Agent reads .env/config.json and puts the key into output or an external call |
| T5 | Code leak to the outside | Misconfiguration, compromised MCP/provider | web_fetch/web_search with code content, cloud provider with logs |
| T6 | Audit-log tampering (hiding actions) | Insider, malware, compromised repo | Editing/deleting/reordering activity log records |
| T7 | Social engineering via CLI output | Untrusted content | Command output contains “run this next” |
| T8 | Supply chain: malicious package/dependency | Supplier | Fake tera-pilot package, compromised dependency |
| Threat | Tera Pilot mechanism | Module |
|---|---|---|
| T1, T2, T7 | Prompt scaffold with safety guardrails: external content = untrusted; instructions from files/output have no priority over the system prompt | agent_runtime/prompts.py |
| T2 | Command policy: allowlist/denylist of commands; project approvals; autonomy levels (always_ask / new_files_only / never_ask); diff review gate; Guardian risk assessment of tool calls |
command_policy.py, agent/guardian.py, progressive_tools.py |
| T3 | Workspace sandbox: file operations restricted to the selected project; checkpoint/undo for rollback | context_manager.py (path restrictions), checkpoint.py |
| T4 | Prompts do not require reading keys; keys live in env/config, not in the repository; encrypted_prompt.py (ChaCha20-Poly1305) for enterprise prompts; UI hints “do not paste keys into code” |
agent/encrypted_prompt.py |
| T5 | The single network egress point is web_search_backend.py (zero-telemetry, only explicit web_search/web_fetch calls); MCP connects explicitly; providers are chosen by the user (BYOK) |
web_search_backend.py, mcp_manager.py |
| T6 | Activity log (append-only, in memory) + signed export: Ed25519 signature per record + hash chain (SHA-256 prev_hash+payload) — tampering/deletion/reordering is detected; verification: tera-pilot audit verify |
activity_log.py, audit_signing.py, audit_cli.py |
| T8 | Dependencies pinned in requirements.txt; local installation from source; MIT license for code review | requirements.txt, pyproject.toml |
Additionally: network egress visibility — the web category in the activity log marks
all external agent calls, so the user sees “the agent left the project”.
What a user can verify themselves:
ok/error/rejected/…).tera-pilot audit export (or /audit-signed in the TUI)
produces JSON where every record is signed with Ed25519 and hash-linked to the previous one.tera-pilot audit verify <file> recomputes
the hash chain and checks all signatures; the public key lives in
~/.tera_pilot/audit_key.pub (format: magic CLWA1 + 32 raw bytes), so verification
can be done on another machine.Per claims discipline (strategy, §11), we do not claim that Tera Pilot:
Correct formulations: “local-first”, “supports local and cloud providers”, “vendor-neutral”, “provides policy, approval and audit mechanisms”, “designed for private and isolated workflows”, “verification evidence is exposed when the workflow runs it”.