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
[P1/security] Favorites persist raw SQL with user-supplied values — no scrubbing/redaction #339
addFavorite (src/stores/favoritesStore.ts:80-95) writes the raw SQL string to localStorage; SaveFavoriteDialog.tsx:39-49 passes raw sql in.
Problem
Same as history F8 — favorites are a more curated subset of queries, but they still contain user values. A favorite like SELECT * FROM users WHERE email = '[email protected]' (saved while debugging) persists forever. The favorites file is the user's "library of useful queries", which is more likely than history to contain production queries with literal data.
With redact-on enabled, a favorite saved with WHERE email = '[email protected]' shows WHERE email = '***' in the sidebar; the SQL still runs as expected when loaded into the editor.
Proposed fix
Scope M — gate on the same redactHistory setting as history F8 (rename to redactPersistedSql to cover both). This is a single setting that affects both stores. Alternative: just give favorites a "This favorite contains sensitive values" checkbox that the user toggles to enable redacting on save.
Acceptance
A favorite saved with WHERE email = '[email protected]' shows WHERE email = '***' in the sidebar; the SQL still runs as expected when loaded into the editor.
Activity
feat(favorites): never store a password in a saved query (#615)
feat(favorites): export and import a library as JSON (#616)