Skip to content

docs: close DESIGN.md gaps — layout, levels, process hardening, bridge, cache#66

Merged
jgowdy-godaddy merged 2 commits intomainfrom
docs/design-cleanup
Apr 17, 2026
Merged

docs: close DESIGN.md gaps — layout, levels, process hardening, bridge, cache#66
jgowdy-godaddy merged 2 commits intomainfrom
docs/design-cleanup

Conversation

@jgowdy-godaddy
Copy link
Copy Markdown
Contributor

Summary

Audit of DESIGN.md against the code on main identified several gaps and two stale claims:

Stale claims corrected

  • Workspace layout was missing `enclaveapp-app-adapter`, `enclaveapp-cache`, `enclaveapp-tpm-bridge`, `enclaveapp-build-support`.
  • "Three integration types" while four are defined. Type 4 (CredentialSource) was the fourth.
  • Level 5 "Linux musl plaintext" shown as a production backend. Actually the only plaintext backend is `enclaveapp-test-software` ("NOT for production") and musl is not a supported target. Tables now end at Level 4 (glibc keyring) and show test-software as an unnumbered out-of-band entry.
  • "macOS signed vs. unsigned" described an auto-detecting two-path runtime that doesn't exist. There is one code path; SE is always in it; Path 1 (entitled) is deferred per `fix-macos.md`. Rewrote around actual keychain-prompt UX.

New sections documenting features that were in code but absent from DESIGN

  • Process hardening — `harden_process` (RLIMIT_CORE=0 everywhere, PR_SET_DUMPABLE + PR_SET_NO_NEW_PRIVS on Linux), `mlock_buffer`.
  • Shared infrastructure — app-adapter, cache, tpm-bridge, build-support crates now introduced under Layering.
  • WSL bridge discovery — fixed-path-only candidates, why PATH fallback was removed, 64 KB response cap, `ENCLAVEAPP_BRIDGE_TIMEOUT_SECS`, `BridgeSession::Drop` behavior, and the Authenticode gap tracked for future work.
  • Credential cache file tamper — documents the consumer-layer `max(header, config)` + server-side-expiration + payload-embedded-timestamps mitigations that already neutralize the practical risk-level-downgrade threat, and why AAD binding is deferred.

Consumer mapping expanded

Now shows shipped binaries per consumer, so `gitenc` and `npxenc` are no longer invisible.

Test plan

  • Docs-only change; CI should pass cleanly.

jgowdy added 2 commits April 17, 2026 03:53
…e, cache

Sweep of DESIGN.md against the code on main:

- Workspace layout diagram was missing enclaveapp-app-adapter,
  enclaveapp-cache, enclaveapp-tpm-bridge, enclaveapp-build-support.
  Added.

- 'Three integration types' while the following paragraphs define
  four. Fixed; Type 4 (CredentialSource) was already described.

- Level 5 'Linux musl plaintext' shown as a production backend on
  two security-level tables. Actually the only plaintext backend is
  enclaveapp-test-software (explicitly marked 'NOT for production'),
  and CLAUDE.md states musl is not supported. Tables now show
  Level 4 as the terminal glibc-keyring row and reference the
  test-only crate as an unnumbered out-of-band entry.

- 'macOS signed vs. unsigned' section described an auto-detecting
  two-path runtime that doesn't exist. There is one code path;
  SE is always in it; Path 1 (entitled) is deferred per fix-macos.md.
  Rewrote as 'macOS path in practice (signed and unsigned)' framed
  around Keychain prompt UX.

New sections documenting features that were in code but not in DESIGN:

- Process hardening (harden_process, PR_SET_DUMPABLE,
  PR_SET_NO_NEW_PRIVS, RLIMIT_CORE=0, mlock_buffer).
- Shared infrastructure crates (app-adapter, cache, tpm-bridge,
  build-support).
- WSL bridge discovery (fixed paths only; PATH fallback was removed;
  64 KB cap; ENCLAVEAPP_BRIDGE_TIMEOUT_SECS; BridgeSession::Drop).
- Credential cache file tamper (consumer-layer max(header, config)
  mitigation; AAD binding deferred).

Consumer mapping table expanded with shipped binary names, including
gitenc and npxenc which were previously invisible.
@jgowdy-godaddy jgowdy-godaddy merged commit 067b016 into main Apr 17, 2026
3 checks passed
jgowdy-godaddy pushed a commit that referenced this pull request Apr 17, 2026
Resolves conflicts where origin/main's #66/#67 docs PRs touched the same
DESIGN.md/THREAT_MODEL.md regions I rewrote for the hardening pass. Our
side supersedes — the new sections already include all of main's
refinements plus the envelope, HMAC sidecar, Windows mitigations,
SecretRead, env-scrub, bridge mutex, and Authenticode notes.

fix-macos.md: accept main's deletion (#67 folded the findings into
THREAT_MODEL.md).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants