Skip to content

Decision Register ​

Consolidated decisions from 84 feature(s), 15 service(s), and 5 principle(s).

Summary ​

IDDecisionStatusSource
metadata-only-loggingLog identifiers and outcomes, never values or key material.acceptedsafekeys/audit-logging
record-denialsRecord denied attempts as first-class events.acceptedsafekeys/audit-logging
append-only-by-constructionProvide no mutation path for audit records rather than relying on access controlacceptedsafekeys/audit-logging
go-and-postgresImplement the control plane as a Go service on Postgres.acceptedsafekeys/control-plane-api
no-create-with-value-endpointDeliberately omit any endpoint that accepts a secret value.acceptedsafekeys/control-plane-api
api-key-then-mtlsStart with API keys and add mTLS for sidecars alongside hardware binding.acceptedsafekeys/control-plane-api
policy-at-both-pointsEvaluate policy at issuance and again locally at resolve.acceptedsafekeys/policy-engine
default-denyDefault to deny when no rule matches.acceptedsafekeys/policy-engine
enterprise-features-laterKeep SSO, compliance reporting, and rich policy authoring out of the MVP.acceptedsafekeys/policy-engine
policy-via-database-rulesEvaluate policy from operator-authored rules in Postgres, rebuilt per evaluationacceptedsafekeys/policy-engine
resolve-time-rules-now-loadedThe sidecar now loads real resolve-time rules from the control plane (cached, deacceptedsafekeys/policy-engine
policy-fail-closed-warm-cachePolicy evaluation denies when rules cannot be loaded and no cache exists; a warmacceptedsafekeys/policy-engine
systemd-single-vm-firstShip systemd units plus a production Compose file targeting a single hardened VMacceptedsafekeys/deployment-packaging
os-isolation-via-systemdFold the sidecar's OS isolation into the systemd unit's hardening directives, wiacceptedsafekeys/deployment-packaging
socket-shared-groupChange the sidecar socket from 0600 to group-access (sidecar user plus a dedicatacceptedsafekeys/deployment-packaging
publish-by-digestPublish CI-built images to a registry and have production pin them by digest.acceptedsafekeys/deployment-packaging
signing-key-holding-patternDeployment provisions the Ed25519 signing seed as a root-owned credential deliveacceptedsafekeys/deployment-packaging
credentials-as-filesEvery credential is resolved from a file when a *_FILE variable is set, fallingacceptedsafekeys/deployment-packaging
esbuild-pattern-for-cliDistribute the CLI as @smithgray/safekeys-cli with optionalDependencies on per-pacceptedsafekeys/distribution
ghcr-canonical-dockerhub-mirrorPublish images to ghcr.io/smith-gray-pty-ltd as canonical and Docker Hub org safacceptedsafekeys/distribution
no-agent-publishesEvery first publish and every account/org creation is performed by James; agentsacceptedsafekeys/distribution
cloudflare-pagesHost the docs and site on Cloudflare Pages, matching how USM is hosted.—safekeys/docs-hosting
two-projects-per-audiencePublish the contributor and help docs as two separate Pages projects on separate—safekeys/docs-hosting
direct-upload-not-git-integrationDeploy by uploading the built directory from GitHub Actions, rather than connect—safekeys/docs-hosting
correct-canonical-urls-post-buildRewrite the generated sitemap's domain after each build as a known workaround.—safekeys/docs-hosting
marketing-site-deploys-separatelyWire the docs deploy now and add the marketing site when it is built.—safekeys/docs-hosting
cheapest-option-firstOrder hardware options cheapest first: TPM 2.0, cloud confidential computing, USacceptedsafekeys/hardware-root
drop-shipped-provisioningSupport factory-provisioned devices that are drop-shipped to customers.acceptedsafekeys/hardware-root
no-custom-silicon-day-oneDo not require custom silicon for the MVP or Phase 1.acceptedsafekeys/hardware-root
defer-to-phase-2Keep threshold crypto and post-quantum ratchets out of the MVP and Phase 1.acceptedsafekeys/threshold-crypto
hybrid-not-pq-onlyUse a hybrid classical plus ML-KEM-class construction rather than post-quantum oacceptedsafekeys/threshold-crypto
threshold-over-single-deviceSplit knowledge across element and authority rather than trusting a single devicacceptedsafekeys/threshold-crypto
mcp-is-firstMake the MCP server the first harness integration shipped.acceptedsafekeys/integration-mcp-server
three-harnesses-onlyLimit MVP integrations to the MCP server, the CLI exec wrapper, and the Python Sacceptedsafekeys/integration-mcp-server
examples-not-runtimesSupport further harnesses later as examples calling the same SDK or MCP tools.acceptedsafekeys/integration-mcp-server
mcp-holds-no-credentialThe MCP server holds no control-plane API key and no key material; list and revoacceptedsafekeys/integration-mcp-server
create-takes-a-source-filecreate_secret accepts a source_file path, never a value parameter.acceptedsafekeys/integration-mcp-server
stdio-transport-single-serverUse standard MCP over stdio with no vendor-specific code.acceptedsafekeys/integration-mcp-server
no-interactive-secret-promptcreate_secret takes a file path the sidecar reads; it never prompts the operatoracceptedsafekeys/integration-mcp-server
python-firstShip the Python SDK as the first language binding, with LangChain and LangGraphacceptedsafekeys/integration-python-sdk
unrepresentable-plaintextDesign the API so plaintext cannot be passed or received.acceptedsafekeys/integration-python-sdk
delegate-all-cryptoKeep the SDK free of decryption and key handling.acceptedsafekeys/integration-python-sdk
zero-dependency-coreKeep the core SDK dependency-free; make LangChain/LangGraph an optional extra.acceptedsafekeys/integration-python-sdk
value-becomes-a-temp-fileEven the in-process value parameter is written to a 0600 temp file that the sideacceptedsafekeys/integration-python-sdk
return-type-is-the-guaranteeRely on return types (CreatedSecret, ResolveResult, ObjectMetadata) having no vaacceptedsafekeys/integration-python-sdk
local-channel-for-createSend plaintext from caller to sidecar over the local authenticated Unix socket,acceptedsafekeys/secret-creation
stdin-not-argvAccept values via stdin or file only; never as a command-line argument.acceptedsafekeys/secret-creation
create-not-a-web-console-flowDo not build a web console for creation in the MVP.acceptedsafekeys/secret-creation
transport-is-the-differentiatorDifferentiate on transport — folders and tokens that agents create and move throacceptedsafekeys/secret-transport
bus-agnostic-payloadCarry only folder URIs and tokens over MCP, A2A, and other agent buses.acceptedsafekeys/secret-transport
denylist-plus-ttlUse a jti denylist alongside short TTLs rather than one or the other.acceptedsafekeys/token-revocation
authoritative-check-at-resolveCheck revocation at resolve time in the sidecar rather than trusting token validacceptedsafekeys/token-revocation
uri-formExpress tokens as a URI: safekey://v1/<id>?scope=<action>&aud=<env>&exp=<unix>&kacceptedsafekeys/capability-token
short-ttl-over-long-livedUse short TTL plus a jti denylist rather than long-lived tokens with periodic roacceptedsafekeys/capability-token
generic-denialsDenials return a generic failure rather than the specific violated check.acceptedsafekeys/capability-token
jws-over-query-stringCarry the token as a standard RFC 7515 compact JWS in the URI fragment (safekey:acceptedsafekeys/capability-token
alg-allowlistPermit only EdDSA and ES256; reject alg 'none' and all symmetric algorithms (HS2acceptedsafekeys/capability-token
key-custody-hsmRequire the token signing key to be HSM- or secure-element-backed from Phase 1;acceptedsafekeys/capability-token
ordinary-directoryUse an ordinary directory or object prefix rather than a custom container formatacceptedsafekeys/encrypted-folder
aes-gcm-or-chachaEncrypt objects with AES-256-GCM or ChaCha20-Poly1305.acceptedsafekeys/encrypted-folder
readme-is-a-featureShip a README.safekeys in every folder, designed to be model-readable.acceptedsafekeys/encrypted-folder
manifest-is-metadata-onlyThe manifest may hold a wrapped DEK but never plaintext, an unwrapped DEK, or aacceptedsafekeys/encrypted-folder
objects-path-constraintRequire every object path to match ^objects/[A-Za-z0-9][A-Za-z0-9._-]*.enc$.acceptedsafekeys/encrypted-folder
openbao-or-vaultUse OpenBao or Vault Transit/KV as the MVP key store.acceptedsafekeys/envelope-encryption
envelope-not-directWrap keys rather than encrypting secrets directly under a master key.acceptedsafekeys/envelope-encryption
keep-insecure-keystore-nameKeep SAFEKEYS_ALLOW_INSECURE_KEYSTORE as the file-mode opt-in rather than renamiacceptedsafekeys/dev-key-custody
keychain-is-a-speed-bump-not-a-boundaryDocument the macOS Keychain as a storage improvement, not an access boundary, anacceptedsafekeys/dev-key-custody
openbao-dev-is-the-linux-defaultMake the containerised dev OpenBao the default Linux dev keystore instead of theacceptedsafekeys/dev-key-custody
exec-is-framework-agnosticShip the exec wrapper as a first-class MVP harness integration.acceptedsafekeys/exec-wrapper
minimal-envGive the child a minimal, explicit environment rather than inheriting and augmenacceptedsafekeys/exec-wrapper
redaction-in-sidecar-not-mcpImplement redaction in the sidecar's relay path rather than in the MCP server.acceptedsafekeys/output-control
mcp-deny-by-defaultMCP-initiated resolves require an explicit command allowlist; without one they aacceptedsafekeys/output-control
denylist-is-a-backstopKeep a denylist of known dumpers for CLI and SDK resolves and document it as a bacceptedsafekeys/output-control
commands-in-policy-not-claimsCommand restrictions live in policy rules, not token claims.acceptedsafekeys/output-control
substrings-not-whole-valueRedact substrings of the secret of 8+ characters (or the full value when shorteracceptedsafekeys/output-control
four-methods-not-oneSupport env, 0600 temp file, socket/pipe, and exec rather than a single injectioacceptedsafekeys/secret-injection
exec-wrapper-preferredMake the exec wrapper the preferred and best-documented path.acceptedsafekeys/secret-injection
placeholder-over-valueReturn a placeholder name or path instead of a value whenever a return is neededacceptedsafekeys/secret-injection
mvp-scope-socket-pipe-deferredShip env, file, and exec injection in the MVP; defer the long-running socket/pipacceptedsafekeys/secret-injection
sidecar-is-the-only-resolverConcentrate all token resolution and decryption in the privileged sidecar.acceptedsafekeys/sidecar-resolution
socket-request-responseExpose resolution to local callers over a Unix domain socket.acceptedsafekeys/sidecar-resolution
no-shared-memoryThe sidecar shares no memory with agent processes.acceptedsafekeys/sidecar-resolution
sidecar-holds-public-keys-onlySplit protocol.Signer (mint) from protocol.Verifier (public keys only). The sideacceptedsafekeys/sidecar-resolution
verifier-fails-closed-coldA verifier with a cold key cache and an unreachable control plane denies every tacceptedsafekeys/sidecar-resolution
exec-is-primary-injectionThe exec wrapper is the preferred injection mechanism over returning values on sacceptedsafekeys/cli
postgres-not-embeddedUse Postgres rather than an embedded store (SQLite) for the control plane.acceptedsafekeys/control-plane-db
denylist-not-allowlistStore the revocation denylist rather than an allowlist of valid tokens.acceptedsafekeys/control-plane-db
audit-never-contains-secretsThe audit table stores identifiers and outcomes only, never values.acceptedsafekeys/control-plane-db
wrapped-dek-not-in-dbWrapped DEKs live in the folder manifest, not in Postgres.acceptedsafekeys/control-plane-db
go-and-postgresImplement the control plane in Go backed by Postgres.acceptedsafekeys/control-plane
no-plaintext-at-control-planeThe control plane must never accept or store plaintext secret material.acceptedsafekeys/control-plane
mcp-firstShip an MCP server as the first harness integration, ahead of any framework-specacceptedsafekeys/mcp-server
mcp-not-in-v0-scopeKeep CrewAI, AutoGen, Pydantic AI, smolagents, and custom enterprise harnesses oacceptedsafekeys/mcp-server
token-only-apiThe SDK API accepts and returns only tokens and folder paths — never plaintext vacceptedsafekeys/python-sdk
open-protocol-wedgePosition the site around the open protocol as the adoption wedge, with hardwareacceptedsafekeys/site
go-sidecarImplement the sidecar in Go rather than Rust.acceptedsafekeys/sidecar
separate-os-userThe sidecar runs as a different OS user from any agent process, with no shared macceptedsafekeys/sidecar
deny-by-defaultIf the key store or control plane is unreachable, resolution fails closed.acceptedsafekeys/sidecar
ts-after-pythonShip the TypeScript SDK immediately after the MVP, not inside it.acceptedsafekeys/typescript-sdk
never-on-decrypt-pathNo language model ever holds, receives, or can derive plaintext secret materialacceptedsystem.principles
opaque-capabilityThe only secret-bearing artefact an agent reasons about is a short-lived, scopedacceptedsystem.principles
stable-agent-interfaceThe public interface (tokens plus folders) stays constant as backends harden froacceptedsystem.principles
materialise-then-zeroisePlaintext exists only transiently inside the sidecar's injection path for the coacceptedsystem.principles
open-core-protocolToken and folder specifications, the sidecar reference implementation, CLI, andacceptedsystem.principles

Details ​

Feature Decisions ​

metadata-only-logging [accepted] ​

Source: safekeys/audit-logging

Decision: Log identifiers and outcomes, never values or key material.

Rationale: The audit log is a high-value target precisely because it is central and long-lived. Keeping it metadata-only means a breach of the log is an accountability problem, not a secret-disclosure one.

record-denials [accepted] ​

Source: safekeys/audit-logging

Decision: Record denied attempts as first-class events.

Rationale: Denials are frequently the earliest evidence of misuse or a probing attack, and an audit log that only shows successes hides the signal an incident responder most needs.

append-only-by-construction [accepted] ​

Source: safekeys/audit-logging

Decision: Provide no mutation path for audit records rather than relying on access control alone.

Rationale: A capability that does not exist cannot be misconfigured. Immutability by construction is stronger than immutability by policy.

go-and-postgres [accepted] ​

Source: safekeys/control-plane-api

Decision: Implement the control plane as a Go service on Postgres.

Rationale: A single static binary and a battle-tested transactional store, sharing a toolchain with the sidecar and CLI. Policy and audit both need transactions, which rules out a simpler embedded store for the MVP.

no-create-with-value-endpoint [accepted] ​

Source: safekeys/control-plane-api

Decision: Deliberately omit any endpoint that accepts a secret value.

Rationale: The API's shape is part of the security design — if values cannot be posted, integrators cannot accidentally route plaintext through the control plane. Value creation belongs on the local sidecar channel.

api-key-then-mtls [accepted] ​

Source: safekeys/control-plane-api

Decision: Start with API keys and add mTLS for sidecars alongside hardware binding.

Rationale: API keys are enough for an MVP where the sidecar is operator-installed, and mTLS earns its complexity only once device identity needs to be attested.

policy-at-both-points [accepted] ​

Source: safekeys/policy-engine

Decision: Evaluate policy at issuance and again locally at resolve.

Rationale: Issuance-time checks alone cannot express host-local constraints like which process may inject a file. Resolve-time checks alone cannot prevent unnecessary tokens existing at all. Both layers together give least privilege at each moment.

default-deny [accepted] ​

Source: safekeys/policy-engine

Decision: Default to deny when no rule matches.

Rationale: Allow-by-default silently fails open as configuration drifts. Deny-by-default makes an incomplete configuration safe rather than dangerous.

enterprise-features-later [accepted] ​

Source: safekeys/policy-engine

Decision: Keep SSO, compliance reporting, and rich policy authoring out of the MVP.

Rationale: The MVP needs a working allow/deny engine with audit, not a policy authoring UX. The richer control surface is the commercial layer.

policy-via-database-rules [accepted] ​

Source: safekeys/policy-engine

Decision: Evaluate policy from operator-authored rules in Postgres, rebuilt per evaluation so a change takes effect without a restart.

Rationale: Issuance-time checks alone cannot express host-local constraints like which process may inject a file; resolve-time checks alone cannot prevent unnecessary tokens existing. The engine itself is complete and default-denies, but the sidecar's local-policy checker in this MVP build allows what the issuer authorised rather than loading its own rule set — that refinement is tracked here rather than overstated as done.

Consequences: The control-plane engine is built and tested (default-deny, first-match-wins, scope narrowing, environment binding, injection-method restriction). The sidecar's resolve-time rule loading is a follow-up; until it lands, resolve-time policy is an allow for any token the issuer minted.

resolve-time-rules-now-loaded [accepted] ​

Source: safekeys/policy-engine

Decision: The sidecar now loads real resolve-time rules from the control plane (cached, default-deny) instead of the previous hardcoded allow.

Rationale: This closes the gap this feature was marked in-progress for. The control-plane engine was always built and tested, but the sidecar's checker returned true unconditionally, so a token that existed was sufficient regardless of what local policy said — the 'a valid token is still not sufficient' half of the contract was unenforced. Rules are now fetched from the same source evaluated at issuance, so both points agree and an operator's change takes effect without a restart.

Consequences: SAFEKEYS_POLICY_FILE provides a static ruleset for air-gapped or bootstrap use; a malformed file is fatal rather than being treated as an empty (deny-all) set by accident. A control plane that cannot be reached at startup is fatal, so a misconfiguration surfaces as a boot failure rather than a silent deny-everything.

policy-fail-closed-warm-cache [accepted] ​

Source: safekeys/policy-engine

Decision: Policy evaluation denies when rules cannot be loaded and no cache exists; a warm cache serves last-known-good.

Rationale: A checker that cannot see policy must not assume it is satisfied. But the same reasoning as the key cache applies: a brief control-plane blip should not take resolution dark, and a stale rule set is safer than a resolver that stops working.

Consequences: Tested directly: removal of a rule takes effect, and an outage with a warm cache does not deny live requests.

systemd-single-vm-first [accepted] ​

Source: safekeys/deployment-packaging

Decision: Ship systemd units plus a production Compose file targeting a single hardened VM as the reference deployment; defer Kubernetes manifests.

Rationale: The system map's own footprint is "2–3 small VMs or one small Kubernetes namespace", and the sidecar's trust boundary is the host, which systemd expresses directly. Adding a cluster orchestrator early would multiply configuration surface without adding a security property, and the agent-facing interface is unaffected either way, so Kubernetes can land later behind the same images and units.

Alternatives:

  • Kubernetes manifests now — rejected: No cluster exists to justify them, and network policies and pod security contexts would duplicate the host-level confinement that is the actual isolation mechanism.

os-isolation-via-systemd [accepted] ​

Source: safekeys/deployment-packaging

Decision: Fold the sidecar's OS isolation into the systemd unit's hardening directives, with an AppArmor profile where the host supports it, rather than deferring it as separate work.

Rationale: The system map already specifies seccomp/AppArmor confinement and a separate user; the unit is exactly where those are expressed and where they can be asserted by a test. Leaving it out would ship a deployment whose stated guarantee the artifact does not enforce.

socket-shared-group [accepted] ​

Source: safekeys/deployment-packaging

Decision: Change the sidecar socket from 0600 to group-access (sidecar user plus a dedicated shared group, group-only mode) so agent processes running as a distinct user can connect.

Rationale: The separate-os-user decision requires agents to be a different user from the sidecar, but a 0600 socket is reachable only by the sidecar's own user — the two are contradictory, and today it works only because development runs everything as one account. A narrow shared group restores the intended least privilege: agents may connect, nothing else local may. This refines the separate-user decision rather than reversing it.

publish-by-digest [accepted] ​

Source: safekeys/deployment-packaging

Decision: Publish CI-built images to a registry and have production pin them by digest.

Rationale: A host that builds from source runs whatever that host compiled that day; a digest pin makes the running artefact identical to the tested one and gives rollback without a rebuild. Local Dockerfiles still build without any registry, so contributors are unaffected.

signing-key-holding-pattern [accepted] ​

Source: safekeys/deployment-packaging

Decision: Deployment provisions the Ed25519 signing seed as a root-owned credential delivered to the control plane only; HSM or secure-element custody remains the Phase 1 target.

Rationale: The key-custody-hsm ADR requires HSM backing from Phase 1 and forbids a bare key file in production as the end state. Hardware is not yet built, so this flow makes the interim explicit, auditable, and never agent-adjacent instead of pretending the problem is solved.

credentials-as-files [accepted] ​

Source: safekeys/deployment-packaging

Decision: Every credential is resolved from a file when a *_FILE variable is set, falling back to the environment only otherwise; the production profile refuses the environment path outright for the signing key and the key-store token.

Rationale: Environment variables are readable from /proc/<pid>/environ, appear in container inspect output, and are inherited by every child process the sidecar spawns for injection. Since the deployment already has a file-based mechanism (systemd LoadCredential, Compose secrets), making files the preferred source costs nothing and removes a class of exposure that would otherwise be inherited by consumer processes. The production profile makes the preference enforceable rather than advisory, so the convention cannot be forgotten on a real host.

esbuild-pattern-for-cli [accepted] ​

Source: safekeys/distribution

Decision: Distribute the CLI as @smithgray/safekeys-cli with optionalDependencies on per-platform packages containing the prebuilt binary.

Rationale: No download at install time, no lifecycle scripts, checksummed by the npm registry itself, and npm installs exactly the one platform package the host needs. This is the pattern esbuild and Rollup use; it survives air-gapped installs, mirrors, and --ignore-scripts better than any installer script would.

Consequences: Five platform packages join the name table and the gated publish job. A test asserts the meta package resolves the right binary per platform and fails loudly on an unsupported platform. The curl | sh path remains, documented as secondary, and verifies a sha256 checksum.

ghcr-canonical-dockerhub-mirror [accepted] ​

Source: safekeys/distribution

Decision: Publish images to ghcr.io/smith-gray-pty-ltd as canonical and Docker Hub org safekeys as a mirror.

Rationale: GHCR requires no additional credential (GITHUB_TOKEN suffices) and keeps the image next to the code and its provenance; Docker Hub is where operators search. Deployments pin GHCR digests.

no-agent-publishes [accepted] ​

Source: safekeys/distribution

Decision: Every first publish and every account/org creation is performed by James; agents prepare packages, workflows, and the runbook only.

Rationale: First publishes create registry identities that cannot be renamed, and account creation is a human act of authority. The pipeline is gated on a release environment with a required human reviewer for the same reason — nothing ships without a click.

cloudflare-pages [—] ​

Source: safekeys/docs-hosting

Decision: Host the docs and site on Cloudflare Pages, matching how USM is hosted.

Rationale: The domain is already on the account and DNS is already managed there, so adding a project needs no new provider. Pages is free at this scale, serves globally, and the deploy is a directory upload rather than a platform the project must learn. Using the same shape as USM means one deploy pattern to maintain across both projects.

Alternatives:

  • GitHub Pages — rejected: The apex domain is already on Cloudflare, so DNS and TLS would be split across two providers for no benefit.
  • A container or VM serving the static site — rejected: Adds an operating system to patch and a cache to configure, for content that is entirely static.

two-projects-per-audience [—] ​

Source: safekeys/docs-hosting

Decision: Publish the contributor and help docs as two separate Pages projects on separate subdomains.

Rationale: The two audiences differ by exactly one filter, and that filter is the only thing keeping internal architecture notes off the public site. Separate projects make the boundary structural rather than a flag on a build: a mistake in one cannot expose the other, and each can be republished or rolled back independently.

Alternatives:

  • One project serving both audiences under a path — rejected: The internal pages would sit one directory away from the public ones, so the boundary would rest entirely on the build flag being right.

direct-upload-not-git-integration [—] ​

Source: safekeys/docs-hosting

Decision: Deploy by uploading the built directory from GitHub Actions, rather than connecting Pages to the repository.

Rationale: The site is generated from specs by a pinned toolchain, so the build must happen where that toolchain is pinned. Letting Pages build from the repository would put the generator version outside the repository's control and outside the CI that validates it, which is the specific drift this project already had to fix once.

Alternatives:

  • Cloudflare Pages Git integration — rejected: Version selection and build steps would move to the provider's dashboard, unversioned and untested.

correct-canonical-urls-post-build [—] ​

Source: safekeys/docs-hosting

Decision: Rewrite the generated sitemap's domain after each build as a known workaround.

Rationale: The pinned generator writes a hardcoded sitemap hostname for the help and developer audiences with no configuration or environment override, so a published site would claim to belong to another project. Since the build is regenerated every run, the correction has to be applied every run; it is recorded as a workaround with an upstream report rather than treated as intended behaviour.

Alternatives:

  • Omit the sitemap until the generator allows configuring it — rejected: Loses discoverability for the whole public site to correct one field.
  • Commit a corrected config file — rejected: The generator rewrites it on every build, so the fix would not survive.

marketing-site-deploys-separately [—] ​

Source: safekeys/docs-hosting

Decision: Wire the docs deploy now and add the marketing site when it is built.

Rationale: The docs exist and build today; apps/safekeys is an empty directory. Splitting the workflows keeps the docs publishing unblocked and means the marketing build, which has a different toolchain and output, cannot break documentation deploys.

Alternatives:

  • Wait and deploy both together — rejected: Withholds value that is already built, for no technical benefit.

cheapest-option-first [accepted] ​

Source: safekeys/hardware-root

Decision: Order hardware options cheapest first: TPM 2.0, cloud confidential computing, USB token or dongle, soldered secure element.

Rationale: TPM 2.0 exists in most enterprise hardware at no extra cost and confidential computing needs no physical device, so the first hardening step can be free. Physical devices are reserved for environments that need them.

drop-shipped-provisioning [accepted] ​

Source: safekeys/hardware-root

Decision: Support factory-provisioned devices that are drop-shipped to customers.

Rationale: Provisioning identity, an attestation key, and a locked applet before shipping makes deployment plug-and-play and enables the hardware business line in the open-core split.

no-custom-silicon-day-one [accepted] ​

Source: safekeys/hardware-root

Decision: Do not require custom silicon for the MVP or Phase 1.

Rationale: The blueprint's non-goal is explicit — requiring bespoke silicon on day one would block adoption of a product whose software phase already delivers the core promise.

defer-to-phase-2 [accepted] ​

Source: safekeys/threshold-crypto

Decision: Keep threshold crypto and post-quantum ratchets out of the MVP and Phase 1.

Rationale: The MVP already meets the product promise with software isolation, and the blueprint is explicit that the agent-facing surface must not change when these land. Deferring keeps time to beta short without weakening the shipped guarantee.

hybrid-not-pq-only [accepted] ​

Source: safekeys/threshold-crypto

Decision: Use a hybrid classical plus ML-KEM-class construction rather than post-quantum only.

Rationale: Hybrid avoids depending entirely on relatively young PQ primitives while still closing the harvest-now-decrypt-later exposure.

threshold-over-single-device [accepted] ​

Source: safekeys/threshold-crypto

Decision: Split knowledge across element and authority rather than trusting a single device.

Rationale: A secure element is a strong boundary but still one holder; splitting means compromise of the device and compromise of the authority are both required, which is the difference between a breach and a non-event.

mcp-is-first [accepted] ​

Source: safekeys/integration-mcp-server

Decision: Make the MCP server the first harness integration shipped.

Rationale: The blueprint identifies MCP as the highest-leverage integration because it is the common tool bus across Claude, Cursor, Codex, Gemini, and most 2026 agent runtimes — one server covers many products without per-vendor SDKs.

three-harnesses-only [accepted] ​

Source: safekeys/integration-mcp-server

Decision: Limit MVP integrations to the MCP server, the CLI exec wrapper, and the Python SDK.

Rationale: The integration surface that matters is agent asks to use a secret, sidecar injects it outside the model — every additional framework is another thin adapter on that same contract. Three covers the two-agent demo and the major runtimes.

examples-not-runtimes [accepted] ​

Source: safekeys/integration-mcp-server

Decision: Support further harnesses later as examples calling the same SDK or MCP tools.

Rationale: Maintaining dedicated runtimes per framework creates ongoing cost with no new capability; examples demonstrate integration without becoming maintenance burdens.

mcp-holds-no-credential [accepted] ​

Source: safekeys/integration-mcp-server

Decision: The MCP server holds no control-plane API key and no key material; list and revoke are proxied through the sidecar rather than called directly.

Rationale: The MCP server runs inside the agent's process space. Giving it a control-plane credential would mean a compromised agent inherits admin authority — able to mint tokens, read the audit log, and rewrite policy — simply by hosting the server. Routing through the sidecar keeps the credential in the privileged process and the agent-adjacent process empty-handed.

Alternatives:

  • Let the MCP server hold the API key and call the control plane directly — rejected: Directly contradicts the boundary the rest of the architecture is built on: the component nearest the model would hold the most authority.
  • Give the MCP server a narrow, read-only credential — rejected: Still a credential in the model's process space, and scope creep over time is near-certain. Zero credentials is a property that cannot erode.

Consequences: The sidecar gains op=list and op=revoke. The MCP server cannot function without a local sidecar, which is the intended fail-closed behaviour.

create-takes-a-source-file [accepted] ​

Source: safekeys/integration-mcp-server

Decision: create_secret accepts a source_file path, never a value parameter.

Rationale: A model authoring a tool call can name a host path it knows exists, but it never holds the bytes — the sidecar reads the file itself. Omitting a value parameter entirely means a model cannot pass one even when instructed to by a prompt injection, which is a structural guarantee rather than a behavioural rule.

Consequences: The caller must write the secret to a file out-of-band first. This is a deliberate ergonomic cost in exchange for the value never entering model context.

stdio-transport-single-server [accepted] ​

Source: safekeys/integration-mcp-server

Decision: Use standard MCP over stdio with no vendor-specific code.

Rationale: MCP is the common tool bus across the major runtimes, so one server covers Claude, Cursor, Codex, and Gemini with no per-vendor adapter. A test asserts no source file branches on a vendor, making the property enforced rather than aspirational.

no-interactive-secret-prompt [accepted] ​

Source: safekeys/integration-mcp-server

Decision: create_secret takes a file path the sidecar reads; it never prompts the operator interactively and never accepts a literal value parameter.

Rationale: An interactive prompt would depend on the MCP client supporting elicitation, and a value parameter would put the secret in model context. Both were checked empirically rather than assumed: opencode 1.18.9 declares only roots in its client capabilities — no elicitation form or url mode — so a prompt-based flow could not work in the harness we target first. MCP itself forbids requesting secrets via form-mode elicitation, and the sanctioned URL mode requires client support too. A file path needs neither: it works in any client, and the model authoring the call never holds the bytes.

Alternatives:

  • Prompt the operator via MCP elicitation (form mode) — rejected: MCP explicitly forbids requesting credentials through form-mode elicitation, and opencode does not declare the capability, so the flow would silently fail in our primary harness.
  • URL mode elicitation to an out-of-band page — rejected: The correct pattern for asking an operator for a credential, and worth revisiting for a hosted setup — but it requires client support, cannot move a secret to a different agent, and adds a web surface. A local file is simpler and works everywhere.
  • Accept a value parameter on create_secret — rejected: Puts the plaintext in model context, which is the one thing Safekeys exists to prevent, and a prompt injection could then capture it.

Consequences: The caller must write the secret to a file out-of-band first. This is a deliberate ergonomic cost. Verified against opencode's actual declared capabilities, so the decision rests on evidence rather than an assumption about the ecosystem.

python-first [accepted] ​

Source: safekeys/integration-python-sdk

Decision: Ship the Python SDK as the first language binding, with LangChain and LangGraph tools.

Rationale: Python is still the default for people building agents, and those teams expect framework-native tools rather than a raw client. It is also one of the three MVP harness integrations named in the blueprint.

unrepresentable-plaintext [accepted] ​

Source: safekeys/integration-python-sdk

Decision: Design the API so plaintext cannot be passed or received.

Rationale: A type surface that cannot express a value is a stronger guarantee than documentation asking developers not to pass one.

delegate-all-crypto [accepted] ​

Source: safekeys/integration-python-sdk

Decision: Keep the SDK free of decryption and key handling.

Rationale: Duplicating crypto in every SDK multiplies the audit surface on the most sensitive path; the sidecar exists precisely so clients do not need it.

zero-dependency-core [accepted] ​

Source: safekeys/integration-python-sdk

Decision: Keep the core SDK dependency-free; make LangChain/LangGraph an optional extra.

Rationale: A caller who only needs create_secret and resolve_for_tool should pull in nothing. Every dependency in a security-sensitive client is another supply-chain surface and another reason not to adopt it, and the core surface is a Unix socket and json — the standard library is sufficient.

Alternatives:

  • Require langchain-core — rejected: Forces a large, fast-moving dependency on callers who only want the token-only primitives, and pins the SDK to one framework's release cadence.

Consequences: The tools ship framework-neutral TOOL_SPECS (JSON Schema) so any runtime can register them; build_langchain_tools raises a clear error when the extra is absent rather than degrading silently.

value-becomes-a-temp-file [accepted] ​

Source: safekeys/integration-python-sdk

Decision: Even the in-process value parameter is written to a 0600 temp file that the sidecar reads, rather than being sent over the socket.

Rationale: It keeps the wire protocol uniform — the sidecar only ever reads a named source — so there is exactly one code path on the create boundary and it is the one already tested. It also means no value ever sits in a socket buffer.

Consequences: create_secret(value=...) writes and shreds a temp file. Agent-facing code should still use source_file; value exists for trusted in-process callers such as a CLI reading stdin.

return-type-is-the-guarantee [accepted] ​

Source: safekeys/integration-python-sdk

Decision: Rely on return types (CreatedSecret, ResolveResult, ObjectMetadata) having no value-bearing field, rather than on documentation.

Rationale: A type with nowhere to put a plaintext is a stronger guarantee than a rule saying not to include one. A test asserts every public method's return annotation is one of the value-free types, so adding a value-bearing return is a deliberate, visible act.

local-channel-for-create [accepted] ​

Source: safekeys/secret-creation

Decision: Send plaintext from caller to sidecar over the local authenticated Unix socket, never over the network.

Rationale: Keeps the value off the wire entirely during creation and makes the trust boundary a filesystem permission the OS already enforces.

stdin-not-argv [accepted] ​

Source: safekeys/secret-creation

Decision: Accept values via stdin or file only; never as a command-line argument.

Rationale: argv is visible in process listings, shell history, and audit logs — a trivially avoidable leak.

create-not-a-web-console-flow [accepted] ​

Source: safekeys/secret-creation

Decision: Do not build a web console for creation in the MVP.

Rationale: A browser form would reintroduce a network path for plaintext without changing the security story; the CLI and SDK cover the two real callers.

transport-is-the-differentiator [accepted] ​

Source: safekeys/secret-transport

Decision: Differentiate on transport — folders and tokens that agents create and move through arbitrary flows — rather than on use-time brokering alone.

Rationale: The competitive analysis in the blueprint notes that broker and proxy patterns already keep credentials out of model context at use time. Transport is the gap — the ability to move secrets freely through agentic flows with a stable interface that can later grow a hardware root of trust.

bus-agnostic-payload [accepted] ​

Source: safekeys/secret-transport

Decision: Carry only folder URIs and tokens over MCP, A2A, and other agent buses.

Rationale: Bus payloads are logged, cached, and inspected by third parties; keeping them inert makes every one of those observers harmless.

denylist-plus-ttl [accepted] ​

Source: safekeys/token-revocation

Decision: Use a jti denylist alongside short TTLs rather than one or the other.

Rationale: TTL handles the unattended case cheaply and bounds worst-case exposure; the denylist handles the attended, urgent case. Neither alone is sufficient — long TTLs make leaks linger, and denylists alone still require knowing about the leak.

authoritative-check-at-resolve [accepted] ​

Source: safekeys/token-revocation

Decision: Check revocation at resolve time in the sidecar rather than trusting token validity alone.

Rationale: The sidecar is the enforcement point; if revocation is not checked there, a revoked token still works wherever it is presented.

uri-form [accepted] ​

Source: safekeys/capability-token

Decision: Express tokens as a URI: safekey://v1/<id>?scope=<action>&aud=<env>&exp=<unix>&kid=<key-id>

Rationale: A URI is copyable through any transport, self-describing, and easy to redact in logs by matching a prefix. It makes the token obviously a handle rather than a value.

short-ttl-over-long-lived [accepted] ​

Source: safekeys/capability-token

Decision: Use short TTL plus a jti denylist rather than long-lived tokens with periodic rotation.

Rationale: Short TTL bounds the damage window of a leaked token; the denylist provides immediate revocation for the cases where waiting is unacceptable. Together they cover both the common and the urgent case.

generic-denials [accepted] ​

Source: safekeys/capability-token

Decision: Denials return a generic failure rather than the specific violated check.

Rationale: Detailed denial reasons are a probing oracle for an attacker refining a forged token.

jws-over-query-string [accepted] ​

Source: safekeys/capability-token

Decision: Carry the token as a standard RFC 7515 compact JWS in the URI fragment (safekey://v1/<sid>#<JWS>) rather than the blueprint's bespoke query-string claims with a separate sig claim.

Rationale: The blueprint's form is a bespoke signed-URL scheme: neither the canonicalisation of the signed bytes nor the parameter ordering/escaping is defined by any standard, so every implementation would have to reproduce our rules byte-for-byte and a mismatch in one language would be a silent authorisation bypass. JWS moves that risk into reviewed, widely implemented libraries. Decisively for this product, standardisation is what makes government-grade assurance reachable: FIPS 140-3 validated modules support EdDSA/ES256 but no private format, an auditor can verify RFC 7515 conformance quickly, third-party resolvers and HSMs interoperate on day one, and the format outlives the team. The blueprint's semantics (sid, scope, aud, exp, nbf, jti) are preserved exactly; only the signing envelope changes.

Alternatives:

  • Literal query-string form from the blueprint (safekey://v1/<id>?scope=…&aud=…&exp=…&kid=…&sig=…) — rejected: Bespoke signed-URL construction with no standard covering canonicalisation or signing rules — we would own a crypto-critical parsing and signing surface. No FIPS story, expensive to audit, and a canonicalisation mismatch between implementations is a silent auth bypass.
  • JWS carried as a query parameter rather than a fragment — rejected: Standard, but base64url-heavy JWS bloats the URL and risks truncation by intermediaries; the fragment also keeps the credential out of server logs and proxy records by construction.
  • Custom binary token format — rejected: Maximum control at maximum cost: no library support, no interoperability, and an entirely novel format to audit.

Consequences: One deliberate deviation from the blueprint's documented wire format, recorded as an ADR. Implementations must enforce the alg allowlist and kid resolution, which are header-level concerns not expressible in the claims schema. Format is frozen at v1 and additive-only.

alg-allowlist [accepted] ​

Source: safekeys/capability-token

Decision: Permit only EdDSA and ES256; reject alg 'none' and all symmetric algorithms (HS256/384/512).

Rationale: alg: none is the classic JWT attack, and accepting a symmetric algorithm lets a verifier be tricked into treating a published verification key as a shared secret (algorithm-confusion). A closed allowlist makes both classes of bug unreachable rather than merely discouraged. EdDSA is the modern default; ES256 is permitted for FIPS-oriented deployments.

Alternatives:

  • Trust the token's own alg header and verify accordingly — rejected: This is precisely the algorithm-confusion vulnerability — the attacker chooses the verification algorithm.
  • Accept any asymmetric algorithm — rejected: Unbounded risk surface, including weak or deprecated curves, with no way to reason about the whole set.

Consequences: Adding an algorithm is a new major format version. Header constraints are enforced by the verifier, not the claims schema, and are covered by header conformance vectors.

key-custody-hsm [accepted] ​

Source: safekeys/capability-token

Decision: Require the token signing key to be HSM- or secure-element-backed from Phase 1; never a bare file in production.

Rationale: The token format protects the authority of the signature, so the signature's key is the root of that authority. A key on disk is exfiltratable by the same host compromise the rest of the architecture is designed to survive. Custody is where government-grade assurance actually originates — algorithm choice, key custody, and sidecar enforcement — not the envelope encoding.

Consequences: kid resolution must support an HSM-backed key source. No format change; only where the key lives. Recorded so an integrator does not ship a file-based signing key in production.

ordinary-directory [accepted] ​

Source: safekeys/encrypted-folder

Decision: Use an ordinary directory or object prefix rather than a custom container format.

Rationale: Any filesystem, object store, or artefact system can carry it with no adapter, and tooling (diff, sync, tar) works unchanged. The security comes from the contents being ciphertext, not from the container.

aes-gcm-or-chacha [accepted] ​

Source: safekeys/encrypted-folder

Decision: Encrypt objects with AES-256-GCM or ChaCha20-Poly1305.

Rationale: Both are AEAD constructions with wide hardware acceleration and mature library support, giving confidentiality and integrity without bespoke crypto.

readme-is-a-feature [accepted] ​

Source: safekeys/encrypted-folder

Decision: Ship a README.safekeys in every folder, designed to be model-readable.

Rationale: Agents will encounter folders; a clear, secret-free explanation prevents an agent from attempting to extract values or misusing the folder, and keeps the folder self-describing in handoffs.

manifest-is-metadata-only [accepted] ​

Source: safekeys/encrypted-folder

Decision: The manifest may hold a wrapped DEK but never plaintext, an unwrapped DEK, or a KEK, enforced structurally via additionalProperties: false.

Rationale: Envelope-wrapped keys are useless without the KEK, which never leaves the key store, so permitting them lets the folder be a self-contained transport unit while granting nothing on its own. Forbidding everything else means a manifest can be leaked in full without exposing a secret. Schema-level rejection is stronger than a documented rule because it cannot be misconfigured.

Consequences: An implementation that encounters an unwrapped DEK in a manifest must refuse and log a security event, since it indicates a compromised writer. Conformance vectors assert the negative cases.

objects-path-constraint [accepted] ​

Source: safekeys/encrypted-folder

Decision: Require every object path to match ^objects/[A-Za-z0-9][A-Za-z0-9._-]*.enc$.

Rationale: A path constraint prevents two failure modes at once: an unencrypted file masquerading as ciphertext, and path traversal escaping the folder. Both are structural, so the schema can reject them before any code runs.

Consequences: Folders must keep ciphertext strictly under objects/ with an .enc suffix. Enforced by the path-traversal and unencrypted-object-path conformance vectors.

openbao-or-vault [accepted] ​

Source: safekeys/envelope-encryption

Decision: Use OpenBao or Vault Transit/KV as the MVP key store.

Rationale: Mature, self-hostable, and auditable, with wrapping primitives already available. Auto-unseal comes later. It avoids building a key store before proving the protocol.

Alternatives:

  • AWS KMS / cloud provider KMS — rejected: It puts the root of trust in a provider the customer may not control, and a multi-tenant AI-cloud KMS in particular could be reachable by the model provider — defeating the product's core property.
  • Build a bespoke key store — rejected: It slows the MVP and adds an unreviewed crypto component on the most sensitive path.

envelope-not-direct [accepted] ​

Source: safekeys/envelope-encryption

Decision: Wrap keys rather than encrypting secrets directly under a master key.

Rationale: Envelope encryption keeps per-object isolation and makes master key rotation cheap, which is also the structure required to move the KEK into hardware or threshold custody without changing the data layer.

keep-insecure-keystore-name [accepted] ​

Source: safekeys/dev-key-custody

Decision: Keep SAFEKEYS_ALLOW_INSECURE_KEYSTORE as the file-mode opt-in rather than renaming to SAFEKEYS_DEV_INSECURE_KEYFILE.

Rationale: The variable already exists, is documented, and is asserted by the production refuse test. Renaming it would churn every reference for no security gain; the semantics being added (permission check, loud warning) do not require a new name.

keychain-is-a-speed-bump-not-a-boundary [accepted] ​

Source: safekeys/dev-key-custody

Decision: Document the macOS Keychain as a storage improvement, not an access boundary, and name the separate-user mode as the strong local boundary.

Rationale: Measured on this machine (2026-09-28, macOS login keychain): a generic-password item created with security add-generic-password -T <binary> is readable WITHOUT any prompt by an arbitrary same-user process — both via the security CLI and via the Security framework (SecKeychainFindGenericPassword returns success silently). The -T ACL governs GUI-level partition lists and does not bind the trusted security tool or framework reads the way the design assumed. The red-team script caught this: the original test expected a denied silent read and measured success.

Consequences: The honest guarantee is: no plaintext key FILE exists in the repo or home directory by default, and key material lives outside the working tree. The red-team key-access section asserts the disk property and records the keychain finding as a measured note. Operators who need a same-host access boundary use scripts/separate-user-mode.sh, which mirrors the deployment's OS-user separation and is the control this feature names for that threat.

openbao-dev-is-the-linux-default [accepted] ​

Source: safekeys/dev-key-custody

Decision: Make the containerised dev OpenBao the default Linux dev keystore instead of the local file.

Rationale: The dev Compose stack already runs OpenBao under its own container user; pointing the sidecar at Vault transit costs no new infrastructure and removes the plaintext file from the default path entirely.

exec-is-framework-agnostic [accepted] ​

Source: safekeys/exec-wrapper

Decision: Ship the exec wrapper as a first-class MVP harness integration.

Rationale: The blueprint lists CLI/exec as one of three MVP integrations precisely because it is framework-agnostic — any harness that can spawn a subprocess works, including ones with no SDK. It is also the cleanest model-never-sees-plaintext path.

minimal-env [accepted] ​

Source: safekeys/exec-wrapper

Decision: Give the child a minimal, explicit environment rather than inheriting and augmenting the parent's.

Rationale: Inheritance is the classic leak vector — ambient credentials, tokens, and paths follow the process in silently. Allowlisting inverts the default to deny.

redaction-in-sidecar-not-mcp [accepted] ​

Source: safekeys/output-control

Decision: Implement redaction in the sidecar's relay path rather than in the MCP server.

Rationale: The sidecar is the trust boundary every client shares. Redacting in the agent-adjacent MCP server would trust the least privileged component to protect the most sensitive data, and any other socket client (CLI, SDKs) would silently miss the protection.

mcp-deny-by-default [accepted] ​

Source: safekeys/output-control

Decision: MCP-initiated resolves require an explicit command allowlist; without one they are refused regardless of the denylist.

Rationale: The MCP caller is model-chosen by construction — the model authors the command — so the default posture must be refuse-with-guidance rather than best-effort filtering. The clear error converts a denial into a one-step operator fix. CLI and SDK resolves are operator-initiated, where the backstop denylist plus redaction is a defensible default.

Consequences: The resolve request gains an origin field (mcp, cli, sdk). Operators must author allowlists for MCP use; the error message makes that actionable.

denylist-is-a-backstop [accepted] ​

Source: safekeys/output-control

Decision: Keep a denylist of known dumpers for CLI and SDK resolves and document it as a backstop, not the control.

Rationale: The allowlist and redaction are the controls. A denylist cannot enumerate every exfiltration vector, and pretending otherwise would overstate the guarantee. The list is still worth having because it catches the lazy injection for free.

commands-in-policy-not-claims [accepted] ​

Source: safekeys/output-control

Decision: Command restrictions live in policy rules, not token claims.

Rationale: The token claims schema is frozen by conformance vectors and adding command syntax to every token would bloat the artefact agents reason about. Policy rules are operator-authored and changeable without touching the wire format.

substrings-not-whole-value [accepted] ​

Source: safekeys/output-control

Decision: Redact substrings of the secret of 8+ characters (or the full value when shorter), in every listed encoding.

Rationale: A prompt-injected command rarely prints the whole value — cut, head -c, or a partial log line leaks a prefix or a slice. Short fragments below 8 characters would produce false positives on ordinary output, so the floor is a deliberate trade of completeness for practicality.

four-methods-not-one [accepted] ​

Source: safekeys/secret-injection

Decision: Support env, 0600 temp file, socket/pipe, and exec rather than a single injection mode.

Rationale: Consumers differ — some read env, some need a file path, some are long-running services. Forcing one mode would push integrators to work around the tool and handle plaintext themselves, which is the failure mode being designed out.

exec-wrapper-preferred [accepted] ​

Source: safekeys/secret-injection

Decision: Make the exec wrapper the preferred and best-documented path.

Rationale: It gives the strongest guarantee — the value exists only in the child's environment for the life of the command — and keeps the caller's return surface to an exit code.

placeholder-over-value [accepted] ​

Source: safekeys/secret-injection

Decision: Return a placeholder name or path instead of a value whenever a return is needed.

Rationale: It preserves the ergonomics of "here is something to use" without giving the agent anything sensitive.

mvp-scope-socket-pipe-deferred [accepted] ​

Source: safekeys/secret-injection

Decision: Ship env, file, and exec injection in the MVP; defer the long-running socket/pipe method.

Rationale: The three shipped methods cover every CLI and service consumer the two-agent demo exercises. The socket/pipe method exists for long-running local services, which is not an MVP shape, and the injector explicitly refuses the method rather than silently falling back to another — so a caller cannot be misled about which channel was used.

Consequences: inject: socket injection is not implemented in the MVP. The method enum is closed and the injector errors on it.

sidecar-is-the-only-resolver [accepted] ​

Source: safekeys/sidecar-resolution

Decision: Concentrate all token resolution and decryption in the privileged sidecar.

Rationale: A single auditable enforcement point is easier to isolate, review, and harden than resolution logic spread across SDKs and runtimes — and it is what lets the agent-facing API stay stable while the backend changes.

socket-request-response [accepted] ​

Source: safekeys/sidecar-resolution

Decision: Expose resolution to local callers over a Unix domain socket.

Rationale: It provides a natural authenticated local channel, avoids exposing a network port, and lets the OS enforce filesystem permissions on who may even connect. Long-running local services also need the pipe/socket injection mode anyway.

no-shared-memory [accepted] ​

Source: safekeys/sidecar-resolution

Decision: The sidecar shares no memory with agent processes.

Rationale: The architectural promise is that a compromised agent sandbox does not yield the key; shared memory would reintroduce exactly the surface being eliminated.

sidecar-holds-public-keys-only [accepted] ​

Source: safekeys/sidecar-resolution

Decision: Split protocol.Signer (mint) from protocol.Verifier (public keys only). The sidecar and CLI hold a Verifier and never a Signer.

Rationale: The sidecar runs on the same host as the secrets, which makes it the component most likely to be attacked. If it held a signing key, compromising it would let an attacker mint tokens and defeat the whole model — the sidecar would become the weakest link in the chain it exists to protect. Splitting the interfaces makes that structurally impossible rather than a rule: a Verifier has no Sign method in scope, so the failure cannot be written by accident. The control plane publishes its public keys at /v1/keys and the sidecar fetches and caches them, refreshing on an unknown kid so a key rotation propagates without a restart.

Alternatives:

  • Share one signing key between the control plane and the sidecar — rejected: This was the original arrangement — a SAFEKEYS_DEV_SIGNING_KEY read by both. It gave the sidecar minting authority, so a host compromise escalated from reading one secret to minting tokens for any object.
  • Give the sidecar a separate signing key — rejected: Two authorities to revoke and two keys to rotate, for no benefit: the sidecar has no reason to mint anything.

Consequences: Verification keys must be distributable, so /v1/keys is now a real endpoint publishing PUBLIC keys only and unauthenticated by design — publishing a public key is not a disclosure, and requiring a credential to check a signature would reintroduce the problem. A test asserts keysource.Verifier does not satisfy protocol.Signer.

verifier-fails-closed-cold [accepted] ​

Source: safekeys/sidecar-resolution

Decision: A verifier with a cold key cache and an unreachable control plane denies every token; a warm cache serves last-known-good.

Rationale: A verifier that cannot check a signature must not accept one — that is the definition of failing open. But taking resolution dark on a brief control-plane blip would be its own outage. The distinction is between never having verified (cold: deny) and having verified recently (warm: serve, since key staleness is handled by revocation, not by refusing to work). The same shape applies to the policy cache.

Consequences: Startup fails if the control plane is unreachable and no static keys are configured, so a misconfiguration is obvious at boot rather than as a silent deny-everything.

Service Decisions ​

exec-is-primary-injection [accepted] ​

Source: safekeys/cli

Decision: The exec wrapper is the preferred injection mechanism over returning values on stdout.

Rationale: The blueprint is explicit that agents should receive only a success code or a path, and that env/exec injection is preferable to printing values where a model or log could capture them.

postgres-not-embedded [accepted] ​

Source: safekeys/control-plane-db

Decision: Use Postgres rather than an embedded store (SQLite) for the control plane.

Rationale: Policy evaluation and audit append both need transactions and concurrent writers across sidecars. Revocation must be immediately visible to every sidecar, which a single-writer embedded store cannot serve reliably once more than one resolver exists.

denylist-not-allowlist [accepted] ​

Source: safekeys/control-plane-db

Decision: Store the revocation denylist rather than an allowlist of valid tokens.

Rationale: An allowlist would require every issued token to be replicated to every sidecar and pruned on expiry — unbounded growth on the hot path. The denylist is small, only holds actively revoked ids, and is checked alongside TTL, which already bounds the population of live tokens.

audit-never-contains-secrets [accepted] ​

Source: safekeys/control-plane-db

Decision: The audit table stores identifiers and outcomes only, never values.

Rationale: The audit log is central and long-lived, which makes it a high-value target. Metadata-only means a breach of the log is an accountability problem rather than a secret disclosure — and it is asserted by a schema-level test on every insert.

wrapped-dek-not-in-db [accepted] ​

Source: safekeys/control-plane-db

Decision: Wrapped DEKs live in the folder manifest, not in Postgres.

Rationale: Keeping key material out of the database means a database compromise cannot yield even wrapped keys, and the folder remains the single portable unit that carries its own wrapped key. The database holds only the KEK identifier (wrapping_kid) needed to route an unwrap.

go-and-postgres [accepted] ​

Source: safekeys/control-plane

Decision: Implement the control plane in Go backed by Postgres.

Rationale: Go gives a single static binary for operators, a strong standard library for HTTP and crypto, and shares a toolchain with the CLI and sidecar. Postgres provides transactional policy and audit storage.

no-plaintext-at-control-plane [accepted] ​

Source: safekeys/control-plane

Decision: The control plane must never accept or store plaintext secret material.

Rationale: Keeps the most network-exposed component outside the decryption path, so its compromise alone cannot reveal secrets.

mcp-first [accepted] ​

Source: safekeys/mcp-server

Decision: Ship an MCP server as the first harness integration, ahead of any framework-specific SDK.

Rationale: MCP is the common tool bus across Claude, Cursor, Codex, Gemini, and most 2026 agent runtimes, so one server covers many products without per-vendor adapters. It is the highest-leverage integration surface for the MVP.

mcp-not-in-v0-scope [accepted] ​

Source: safekeys/mcp-server

Decision: Keep CrewAI, AutoGen, Pydantic AI, smolagents, and custom enterprise harnesses out of MVP scope.

Rationale: Each is another thin adapter on the same contract; supporting them later as examples that call the same SDK or MCP tools avoids maintaining dedicated runtimes.

token-only-api [accepted] ​

Source: safekeys/python-sdk

Decision: The SDK API accepts and returns only tokens and folder paths — never plaintext values.

Rationale: Making plaintext unrepresentable in the type surface means an agent using the SDK cannot accidentally route a value through model context.

open-protocol-wedge [accepted] ​

Source: safekeys/site

Decision: Position the site around the open protocol as the adoption wedge, with hardware and hosted authority as the commercial layer.

Rationale: The Let's Encrypt analogy from the blueprint — security tooling that requires deep trust wins adoption when the foundational pieces are auditable, while revenue sits on hosted authority, hardware, and enterprise controls.

go-sidecar [accepted] ​

Source: safekeys/sidecar

Decision: Implement the sidecar in Go rather than Rust.

Rationale: Shares one toolchain with the control plane and CLI, offers strong process-isolation primitives (seccomp, cgroups, distinct UID), and lowers the contribution barrier for an open-source reference implementation. The blueprint listed "Rust or Go"; Go keeps the MVP path shorter.

separate-os-user [accepted] ​

Source: safekeys/sidecar

Decision: The sidecar runs as a different OS user from any agent process, with no shared memory.

Rationale: The architectural promise is that compromise of the agent sandbox does not yield the key; user separation plus memory isolation is the mechanism in the software-only phase.

deny-by-default [accepted] ​

Source: safekeys/sidecar

Decision: If the key store or control plane is unreachable, resolution fails closed.

Rationale: A fallback to cached or plaintext values would violate the core security property.

ts-after-python [accepted] ​

Source: safekeys/typescript-sdk

Decision: Ship the TypeScript SDK immediately after the MVP, not inside it.

Rationale: The blueprint's MVP list names Python first; the TS SDK serves Node runtimes but is a second adapter on an already-proven contract, so it does not gate the two-agent demo.

Architecture Principles (as decisions) ​

never-on-decrypt-path ​

Decision: No language model ever holds, receives, or can derive plaintext secret material or long-term keys.

opaque-capability ​

Decision: The only secret-bearing artefact an agent reasons about is a short-lived, scoped, audience-bound capability token containing zero secret material.

stable-agent-interface ​

Decision: The public interface (tokens plus folders) stays constant as backends harden from software isolation to hardware to threshold crypto.

materialise-then-zeroise ​

Decision: Plaintext exists only transiently inside the sidecar's injection path for the consuming non-LLM process, and is zeroised immediately after use.

open-core-protocol ​

Decision: Token and folder specifications, the sidecar reference implementation, CLI, and core SDKs are open source; the hosted authority, hardware, and enterprise controls are commercial.