[security] Store auth tokens as SHA-256 hashes instead of plaintext #34

Closed
opened 2026-03-04 12:20:00 +01:00 by clawbot · 0 comments
Collaborator

From QA Audit (#25 comment)

Severity: SHOULD-FIX

The clients.token column stores the raw 64-character hex token. If the database file is compromised, all active session tokens are immediately usable.

Suggested fix: Store SHA-256(token) in the database; compare against the hash on lookup.

## From QA Audit ([#25 comment](https://git.eeqj.de/sneak/chat/issues/25#issuecomment-10914)) **Severity: SHOULD-FIX** The `clients.token` column stores the raw 64-character hex token. If the database file is compromised, all active session tokens are immediately usable. **Suggested fix:** Store `SHA-256(token)` in the database; compare against the hash on lookup.
sneak closed this issue 2026-03-10 12:44:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/chat#34