Skip to content

Security Design ​

Authentication / Authorization ​

SchemeTypeDescription
control-plane-api-keyapi-keyClient credential used by the sidecar and CLI to authenticate to the control plane in the MVP.
sidecar-mtlsoauth2Mutual TLS device identity between sidecar and control plane, introduced alongside hardware binding.
local-sidecar-socketnoneLocal authenticated channel (Unix domain socket) between an agent/CLI and the sidecar on the same host.

Security Auditing ​

  • Monitoring: Prometheus metrics from the sidecar and control plane — resolution latency and deny rates.
  • Alerts: Deny-rate spikes and key-store reachability.
  • On-call: Single team in MVP.

Vulnerabilities ​

IDTitleSeverityMitigation
rooted-osRooted OS or compromised local agent processhighProcess isolation in the MVP; secure element, TEE, or TPM binding in Phase 1. Plaintext remains transient and zeroised.
provider-kms-exposureMulti-tenant AI-cloud KMS used as the roothighDo not use multi-tenant AI-cloud KMS as root. Self-hosted key store, then HSM or secure element.
human-pastes-plaintextA human pastes plaintext into a chathighOut of scope even in later phases. The product exists to make this unnecessary, not to detect it.
output-relay-leakA prompt-injected agent reads the secret back out of relayed command outputhighThe sidecar redacts the resolved value — and substrings of 8+ characters — from any output it relays, in raw, base64, base64url, hex, percent-encoded, and JSON-escaped form, including split-across-chunk matches; output is size-capped by default; MCP-initiated resolves require a command allowlist and CLI/SDK resolves fall back to a documented backstop denylist. See safekeys/output-control.
dev-kek-agent-readableThe development KEK is readable by the same user the coding agent runs ashighThe default dev flow keeps the KEK in the macOS Keychain with an ACL restricted to the sidecar binary, or in the containerised OpenBao dev instance on Linux; a plaintext file survives only behind SAFEKEYS_ALLOW_INSECURE_KEYSTORE=1 with a permission check and a loud warning. A separate-user local mode mirrors the deployment isolation. See safekeys/dev-key-custody.

Security Stack ​

  • First line of defense: Capability token verification — signature, expiry, audience, and policy checks at the sidecar.
  • Last line of defense: Envelope encryption with a key store holding wrapped keys; plaintext never persisted.
  • Notes: The threat model is explicit about what is deferred: a fully compromised secure element plus all threshold shares, or a human pasting plaintext into a chat, remain out of scope even after Phase 3.