Summary
src/utils/structuredLogger.ts generates session IDs with Math.random(). If a session ID is later used as a correlation handle (e.g. for de-dup or signed audit events), this is unsafe.
Affected area
src/utils/structuredLogger.ts (sessionId = sess_${Date.now()}_${Math.random()…``)
Steps to reproduce / impact
An attacker who can guess the random component could collide sessions, potentially inserting correlated log events.
Expected behaviour
Use crypto.randomUUID() for session IDs.
Acceptance criteria
Summary
src/utils/structuredLogger.tsgenerates session IDs withMath.random(). If a session ID is later used as a correlation handle (e.g. for de-dup or signed audit events), this is unsafe.Affected area
src/utils/structuredLogger.ts(sessionId =sess_${Date.now()}_${Math.random()…``)Steps to reproduce / impact
An attacker who can guess the random component could collide sessions, potentially inserting correlated log events.
Expected behaviour
Use
crypto.randomUUID()for session IDs.Acceptance criteria