Current trust boundaries¶
Boundary |
Inputs / sinks |
Evidence |
Current controls and gaps |
|---|---|---|---|
Python caller → crypto API |
plaintext, ciphertext, keys, passwords, nonces, KDF names/parameters |
broad root and submodule APIs |
Type/length checks vary; many low-level choices remain caller-controlled |
CLI argv/stdin/env/files/fds |
paths, OTP secret, provider names, password source selectors |
|
Password values avoid argv by default; OTP secret is required in argv; environment/file sources inherit OS exposure |
Environment → process policy |
strict-key mode, runtime/log levels, Argon2 costs, experimental/local-plugin gates, audit config, PKCS#11 config |
|
Values are ambient, some read at import, and no single configuration owner exists |
Filesystem → parsers |
encrypted files, PEM/DER/JSON/YAML/protobuf, pipeline definitions |
AES, utils, local keystore, CLI/codegen |
Some framed parsers validate lengths; generic JSON/Base64 and YAML consumers have no explicit byte quota |
Process → destination filesystem |
encrypted/decrypted files, keys, metadata, audit logs, generated source |
|
Decrypt and key writes use temp/replace; encryption writes directly; directory durability and link/race policy are incomplete |
Key identifier → path |
local keystore key id and imported metadata id |
|
No identifier grammar or resolved-path confinement |
Plugin code → process |
built-in modules, explicit/local directory Python, entry points |
|
Local CWD discovery is opt-in, but enabled paths execute arbitrary Python; registry conflicts are silent |
Provider → SDK |
AWS KMS API, PKCS#11 library/token/session, local/mock stores |
|
Provider capabilities exist but no conformance suite; retry/audit behavior differs |
SDK → network |
AWS APIs; migration audit webhook |
|
Boto3 uses provider defaults; webhook accepts a caller URL and suppresses most delivery failures |
SDK → subprocess |
fuzz CLI and generic operations wrapper |
|
|
Runtime → logging/audit |
command names, operation names, provider errors, audit action/status |
core logging, operations, audit, migration demo |
Redaction is key-name/message heuristic; audit is optional; duplicate CLI logs observed |
Build → wheel/sdist |
package discovery, manifest, package data |
|
Root tree ships; three |
GitHub event → CI/release |
PR/push/tag content, third-party actions, remote install script, PyPI publication |
|
Permissions are partly scoped; actions use mutable major tags and build workflow pipes a fetched script to shell |
Documentation → user expectations |
security, audit, format, testing, release claims |
README/docs |
Several claims exceed or differ from installed/code behavior; see claim audit |
Assets crossing boundaries¶
Assets include plaintext, ciphertext, data-encryption keys, long-term private/provider keys, passwords/PINs, OTP secrets, key identifiers and versions, envelope context/metadata, policy decisions, audit events, generated source, release credentials, and signed artifacts.
v4 boundary rule¶
Every v4 high-level operation should accept an explicit provider, policy, and application context; generate its own data key and nonce; authenticate metadata and context; enforce parser quotas before allocation or provider calls; write failure-atomically; and emit a typed, redacted audit event. Ambient plugin, algorithm, KDF, and raw-key authority should not enter the stable path.