M6.5 [P2]: Audit minor cleanups (dead code, no-op command, weak UUIDs, non-atomic provision) #260

Open
opened 2026-07-31 14:42:57 +00:00 by KofTwentyTwo · 1 comment
KofTwentyTwo commented 2026-07-31 14:42:57 +00:00 (Migrated from github.com)

Minor audit findings, batched: dead nuncio-core::model::Contact type (zero refs); EventBus::process_command ReloadFilters is a silent no-op (lib.rs:266); compute_log_hash returns empty string on HMAC-init failure instead of erroring; outbox.rs::uuid_simple and parser.rs::uuid_or_simple_hash are sha256-of-timestamp, not real UUIDs (collision window); vault.rs::get_or_create_key_bytes has a non-atomic check-then-set race on first provisioning; stale JSON-RPC IPC coexists comments (grpc.rs:1514 + main.rs) contradict CLAUDE.md (IPC removed); sync.rs docs understate that incremental checkpointing exists. Address each or explicitly justify leaving it.

Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.

Minor audit findings, batched: dead nuncio-core::model::Contact type (zero refs); EventBus::process_command ReloadFilters is a silent no-op (lib.rs:266); compute_log_hash returns empty string on HMAC-init failure instead of erroring; outbox.rs::uuid_simple and parser.rs::uuid_or_simple_hash are sha256-of-timestamp, not real UUIDs (collision window); vault.rs::get_or_create_key_bytes has a non-atomic check-then-set race on first provisioning; stale JSON-RPC IPC coexists comments (grpc.rs:1514 + main.rs) contradict CLAUDE.md (IPC removed); sync.rs docs understate that incremental checkpointing exists. Address each or explicitly justify leaving it. Source: full-tree audit 2026-07-30 (scratchpad/audit/AUDIT-SUMMARY.md). Follow docs/STORY-WORKFLOW.md: engine+proto(if surface)+CLI+offline E2E, mock-only tests, no fabricated data, comment convention, PR to dev, PO reviews before close.
KofTwentyTwo commented 2026-08-15 01:39:57 +00:00 (Migrated from github.com)

Triaged against current dev during #427. Two items resolve without work; the rest stand.

Stale — do not do: the EventBus::process_command ReloadFilters no-op. No such variant exists anywhere in the tree and every arm does real work; the cited lib.rs:266 points at nothing. This was presumably fixed or never accurate.

Already fixed: parser.rs::uuid_or_simple_hash is now generate_rule_id using OsRng. Note its sibling outbox.rs::uuid_simple still reproduces the weak-UUID concern.

Still valid: everything else in this issue.

Leaving open for the remainder.

Triaged against current `dev` during #427. Two items resolve without work; the rest stand. **Stale — do not do:** the `EventBus::process_command` ReloadFilters no-op. No such variant exists anywhere in the tree and every arm does real work; the cited `lib.rs:266` points at nothing. This was presumably fixed or never accurate. **Already fixed:** `parser.rs::uuid_or_simple_hash` is now `generate_rule_id` using `OsRng`. Note its sibling `outbox.rs::uuid_simple` **still reproduces** the weak-UUID concern. **Still valid:** everything else in this issue. Leaving open for the remainder.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: KofTwentyTwo/nuncio#260