You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[P0/security] Statements carrying credentials are stored in history verbatim #587
historyStore persists entry.sql exactly as executed.
Problem
CREATE USER ... IDENTIFIED BY 'hunter2', ALTER USER ... IDENTIFIED BY, SET PASSWORD = ... and GRANT ... IDENTIFIED BY all carry a plaintext password in the statement text. Today those run from the admin panel and are not recorded at all — but the moment history covers app-generated SQL (see the coverage issue), every password set through the UI lands in localStorage in the clear. Typing the same statement in the editor already does this now.
The app is otherwise careful here: passwords live in the OS keyring and are #[serde(skip_serializing)] so they never cross the IPC boundary. Writing them to history in plaintext undoes that.
Most competing clients do store these verbatim. This is a place to be better, not to match.
Expected
Before an entry is stored, credential-bearing clauses are replaced with a marker — IDENTIFIED BY <redacted>. Redaction happens on the way in, so nothing sensitive is ever written, and applies regardless of origin. The executed statement is untouched; only the recorded copy is redacted, and the entry says it was.
Notes
Narrower and non-optional compared to #330, which asks for general literal scrubbing as a user preference. This one should not be a preference.
Acceptance
Running CREATE USER 'x'@'%' IDENTIFIED BY 's3cret' from the editor leaves no occurrence of s3cret in the persisted history; the user is still created; the entry shows the redacted form and is marked redacted.
Activity
feat(history): never write a password to history
feat(history): never write a password to history (#593)
feat(favorites): never store a password in a saved query (#615)