zeroclaw/src
Víctor R. Escobar 15a58eb7da fix: use CSPRNG for pairing code generation
Replace DefaultHasher + SystemTime + process::id() with UUID v4
(backed by getrandom/urandom CSPRNG) for pairing code generation.

The previous implementation used predictable entropy sources
(system time to ~1s precision and process ID) with a non-cryptographic
hash (SipHash), making the 6-digit code brute-forceable.

The new implementation extracts 4 random bytes from a UUID v4
(which uses the OS CSPRNG) and derives the 6-digit code from those.
No new dependencies added — reuses existing uuid crate.

Adds a test verifying non-deterministic output.

Ref: CWE-330 (Use of Insufficiently Random Values)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 13:29:58 +01:00
..
agent refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
channels refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
config refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
cron feat: initial release — ZeroClaw v0.1.0 2026-02-13 12:19:14 -05:00
gateway fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
heartbeat fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
integrations refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
memory fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
observability fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
onboard refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
providers refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
runtime fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
security fix: use CSPRNG for pairing code generation 2026-02-14 13:29:58 +01:00
skills fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
tools refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00
tunnel fix: resolve all clippy --all-targets warnings across 15 files 2026-02-14 03:52:57 -05:00
lib.rs feat: initial release — ZeroClaw v0.1.0 2026-02-13 12:19:14 -05:00
main.rs refactor: simplify CLI commands and update architecture docs 2026-02-14 05:17:16 -05:00