Summary
src/utils/security/auditLogger.ts keeps an audit log in localStorage with no obvious rotation or eviction policy.
Affected area
src/utils/security/auditLogger.ts (private cleanupOldLogs)
Steps to reproduce / impact
Quota exhaustion will silently drop log entries, defeating the audit guarantee. Without a strict, tested rotation policy, the most recent (most important) entries can be evicted first.
Expected behaviour
Implement LRU-by-time with size cap; surface a warning when eviction begins; export to remote sink before eviction.
Acceptance criteria
Summary
src/utils/security/auditLogger.tskeeps an audit log in localStorage with no obvious rotation or eviction policy.Affected area
src/utils/security/auditLogger.ts(privatecleanupOldLogs)Steps to reproduce / impact
Quota exhaustion will silently drop log entries, defeating the audit guarantee. Without a strict, tested rotation policy, the most recent (most important) entries can be evicted first.
Expected behaviour
Implement LRU-by-time with size cap; surface a warning when eviction begins; export to remote sink before eviction.
Acceptance criteria