Skip to content

Risks & Mitigation ​

System Risks ​

IDTitleSeverityStatusMitigation
rooted-osRooted OS or compromised local agent processhighidentifiedProcess isolation in the MVP; secure element, TEE, or TPM binding in Phase 1. Plaintext remains transient and zeroised.
stolen-tokenStolen or replayed capability tokenmediumidentifiedShort TTL, audience binding, scope least-privilege, jti denylist revocation, and optional mTLS device identity.
provider-kms-exposureMulti-tenant AI-cloud KMS used as the roothighmitigatedDo not use multi-tenant AI-cloud KMS as root. Self-hosted key store, then HSM or secure element.
quantum-harvest-nowHarvest-now-decrypt-later against long-lived ciphertextmediumacceptedExplicitly not an MVP concern. Hybrid KEM and ratchet in Phase 2.
human-pastes-plaintextA human pastes plaintext into a chathighacceptedOut 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 outputhighmitigatedThe 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.
network-exfil-allowed-commandAn allowed command exfiltrates the secret over the network or via a written filemediumacceptedCommand allowlists bind high-value tokens to exact executables and argument patterns. The residual risk is stated in the README's Security guarantees and limits section rather than claimed away.
dev-kek-agent-readableThe development KEK is readable by the same user the coding agent runs ashighmitigatedThe 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.

Severity Summary ​

  • high: 5
  • medium: 3

Service Risks ​

Safekeys CLI ​

  • A user may pipe plaintext in a way that lands in shell history or process listings; the CLI must prefer stdin and file inputs over argv.

Control Plane API ​

  • Control plane credential compromise could mint tokens — mitigated because the plane holds no plaintext and the master key lives in the key store or hardware element.
  • Postgres is a single point of failure for policy and audit; MVP accepts this with backups.

Safekeys MCP Server ​

  • An MCP host could log tool arguments; tool handlers must return only tokens and status, never resolved values.

Python SDK ​

  • A developer could bypass the SDK and handle plaintext directly; the SDK's value is that its API surface makes the safe path the easy path.

Safekeys.ai Site ​

  • Public messaging must not overstate the MVP's guarantees; the threat model page is the source of truth for what is and is not mitigated.

Sidecar / Resolver ​

  • A rooted host can observe the sidecar's process memory — the MVP relies on process isolation only; Phase 1 adds secure element / TEE / TPM binding.
  • Long-running sidecar process holds transient DEKs in memory; minimise lifetime and zeroise deterministically.

TypeScript SDK ​

  • Ships after the Python SDK, so API drift between the two SDKs is a risk; both must mirror the same contract.