# Secrets V1 security boundary

V1 reduces accidental disclosure through normal Agent prompts, argv, inherited environment and default tool output. It trusts the OS, mancode installation, Keychain, the reviewed Node runtime and the approved executor with its dependencies. It is not a sandbox against another process with the same user privileges. TTY checks, private POSIX modes, installation snapshots and hashes do not change that boundary.

Records use AES-256-GCM, random 32-byte keys, fresh 12-byte nonces and 16-byte tags. AAD binds schema, vault, key, workspace, record kind/name and entry identity. No plaintext is released before tag validation. Approval records and catalogue metadata are independently authenticated encrypted records in the same atomic vault authority. Approval binds secret identity/revision, workspace, input schema, output policy and exact package/runtime identity. The untrusted display registry is never consulted for authorization. Valid old vault/approval snapshots can be replayed by a same-user attacker; this version does not claim rollback resistance.

Input limits are 16 KiB per secret, 64 KiB per request, 256 KiB resolved JSON, depth 16 and at most 16 slots. Duplicate keys, malformed UTF-8, non-ordinary files, symlinks at the input file, unexpected fields and unapproved reference positions fail closed. Inputs are read once. Schema validation and executor checks precede opening the selected secret values. There is no shell or arbitrary argv interface.

Processes run with an explicit Node executable/entry, fixed cwd, a minimal environment and piped stdin/stdout/stderr. The runner bounds time/output and cancels its POSIX process group. Executors which detach/background themselves are unsupported. macOS is the only enabled production Secrets platform; ordinary CLI remains available elsewhere. Same-user file replacement, runtime modification or process inspection remains outside the isolation guarantee.

Output suppression does not stop the executor from writing files, using its own network calls or encoding secrets elsewhere. Target-system replies, webpages and other tools can expose deliberately submitted data later. Code review must cover those paths and avoid redirects or proxy changes which disclose credentials. No global browser/tool/model traffic is intercepted. The public scanner does not unlock the vault or learn arbitrary new values.

Buffers owned by this module are cleared where practical; JS strings, GC copies, native libraries, swap and crash dumps cannot be reliably erased by this promise. Audits do not contain raw requests, ciphertext, values, value hashes or raw exceptions and are not tamper-proof forensics. Failure or cancellation after start may follow an external side effect; no automatic retry is performed.

The backend uses the native binary secret API, never a plaintext password in system-command argv. Loading the optional backend is restricted to Secrets operations. Native binding or Keychain failures return fixed errors without a plaintext-file/environment fallback. Backend source: [keyring-node](https://github.com/Brooooooklyn/keyring-node); cryptography: [Node crypto](https://nodejs.org/download/release/v22.5.0/docs/api/crypto.html). These sources document mechanisms, not proof that every deployment is secure.
