Skip to content

fix(wave27): Harden crypto and wire overlay merge to T-439 - #381

Merged
harshsinghmp merged 1 commit into
devfrom
fix/wave27-hardening
Nov 9, 2026
Merged

harshsinghmp merged 1 commit into
devfrom
fix/wave27-hardening

Conversation

@harshsinghmp

Copy link
Copy Markdown
Owner

Fixes the code-review and muse-security blockers: authenticated enclaves, strict names, key hygiene, audited three-way overlay merge, fail-closed merge3, attestation hardening. Gate 1521/0; CAPPED with residual debt recorded.

Why: Both the code-review critic (REJECT, 4.5/10) and muse-security
(8 High) rejected Wave 27: lossy tenant/branch names, unauthenticated
envelope metadata, key TOCTOU, unaudited overlay merges, fail-open
merge3, and overstated crypto claims.

What:
- Enclaves: strict names, GCM AAD (version/key_id/client/division), wx key
  creation with EEXIST re-read, 0700/0600 files, typed errors.
- Branch overlays: base64url filenames, identity check, base_entries
  snapshot, three-way merge via mergeMemories3Way, lock + audit +
  archiveMemory, CLI set/rm and --strategy.
- Attestation: domain-separated Ed25519 payload, signed version/algorithm,
  empty-chain rejection, safer keygen default with overwrite guard,
  verify-chain CLI, canonical JSON guards.
- merge3: fail-closed exit, TTY-gated manual mode, stderr prompts, 0600
  output, secret scan.
- Enclave CLI: type enum, traversal rejection, --file/stdin content.
- Tests: collision matrix, AAD relabel, chain tamper, overlay conflict,
  CLI contracts; claims and docs corrected; gauntlet/security ledgers.

Verification: bun test 1521 pass / 0 fail; tsc clean; build 434 modules;
secret scan clean.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
@harshsinghmp
harshsinghmp merged commit 3c23755 into dev Nov 9, 2026
@harshsinghmp
harshsinghmp deleted the fix/wave27-hardening branch November 9, 2026 12:33
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.

1 participant