Security audit: first-pass findings on v7 TC-HKEM vault#16
Draft
johnzfitch wants to merge 4 commits intomainfrom
Draft
Security audit: first-pass findings on v7 TC-HKEM vault#16johnzfitch wants to merge 4 commits intomainfrom
johnzfitch wants to merge 4 commits intomainfrom
Conversation
Records the output of a static sweep + module-by-module review of the v7 TC-HKEM vault path. No Critical findings. High items are README/code drift (clipboard + ratatui dependencies declared but never called), panic=abort defeating ZeroizeOnDrop, migration backups retaining old key material, and an RC-version of ml-kem in the cryptographic core. Medium items cover env-var passphrase inconsistency, defense-in-depth gaps in HKDF error paths, and platform-specific hardening shortfalls. https://claude.ai/code/session_01JsUq2PoX29i1235fPQE2AZ
Owner
Author
|
@copilot security review, hardening pass |
Agent-Logs-Url: https://github.com/johnzfitch/dota/sessions/fba3fcab-4b31-4f53-8567-564d2685170e Co-authored-by: johnzfitch <10013448+johnzfitch@users.noreply.github.com>
Reformats the multi-line builder calls touched in ca00718 to satisfy cargo fmt --check. Mechanical formatter-only change; no behavior difference. https://claude.ai/code/session_01JsUq2PoX29i1235fPQE2AZ
Agent-Logs-Url: https://github.com/johnzfitch/dota/sessions/fba3fcab-4b31-4f53-8567-564d2685170e Co-authored-by: johnzfitch <10013448+johnzfitch@users.noreply.github.com>
Contributor
Implemented in db57912 (with core hardening in ca00718): release profile now uses |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Records the first pass of an insecure-handling audit across the
dotacrate (~6.5k LoC). AddsSECURITY-AUDIT.mdwith severity-ranked findings; no source changes. Methodology and per-domain checklist live in the audit plan we discussed; this PR captures the concrete output.No Critical findings. The v7 TC-HKEM path holds the documented invariants: header HMAC verified before private-key decapsulation, KDF params bounded before Argon2 runs, every commitment compare uses
constant_time_eq,min_versionrollback floor enforced, all-zero ephemeral keys rejected, vault writes are atomic viatempfile::persist+ directorysync_all, andO_NOFOLLOWblocks symlink traversal at the syscall boundary.High-severity items
arboard,ratatui,crossterm, andtokioare declared but have zero call sites insrc/;tui/app.rsis a 3-line placeholder;dota getand the TUIgetwrite secrets to stdout viaprintln!. Users who follow the README leak secrets into terminal scrollback.panic = "abort"in the release profile defeatsZeroizeOnDropon every panic path; README claim is overstated. Four.expectcalls invault/ops.rsare the real reachable panic surfaces.MAX_BACKUPS = 5) keep old wrapped key material indefinitely and are never re-encrypted onchange-passphraseorrotate-keys.fs::copyfollowed by chmod is also non-atomic.ml-kem = "0.3.0-rc.0"is a release candidate in the cryptographic core; several dead crypto-adjacent deps (see H1); nodeny.tomlto pin sources/licenses.Medium / Low items
DOTA_PASSPHRASEenv-var support is partial across commands; defense-in-depth gaps in HKDF error paths (okmnot zeroized on early return); macOS/Windows have no equivalent ofharden_process; secret names are stored plaintext (intentional but undocumented in threat model); plus several documentation drifts. Full list inSECURITY-AUDIT.md.Suggested PR ordering
H1 → H4 → H3 → H2 → mediums → lows. H3 touches
migration.rs, whichAGENTS.mdflags as "ask first."Test plan
SECURITY-AUDIT.mdend-to-end and decides which findings to accept / dispute / defer.security-audit-1.https://claude.ai/code/session_01JsUq2PoX29i1235fPQE2AZ
Generated by Claude Code