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] History persists raw SQL with user-supplied values — no scrubbing/redaction #330
SQLPilot is a desktop DB tool; users may paste session-bound values for debugging (e.g., SELECT * FROM users WHERE email = '[email protected]'). Every such query sits in localStorage (file-backed at Library/Application Support/com.sqlpilot.app/...) for the lifetime of the install.
Problem
If the user shares their machine or installs a backup tool, the history file leaks. Compare to the localStorage design in FR-9.1: data risk is "low" because the data is user's own queries, but a regulator in a healthcare/finance setting would flag it. The password storage is correctly keyring-backed but the same hygiene isn't applied to query content.
Files
src/stores/historyStore.ts:30-31
src/stores/resultStore.ts:181-219
Expected
A setting (default ON) to redact user-supplied values from history before persist. The SQL still runs as expected (redaction is post-execute, on the stored copy only).
Proposed fix
Scope M — add a setting (default ON) to "Redact known-sensitive values in history" that scrubs `WHERE col = '...' literal values before persist; add an "Export history" / "Wipe history older than N days" affordance to the clear-history flow.
Acceptance
A query SELECT * FROM users WHERE email = '[email protected]' saved with redact-on renders as SELECT * FROM users WHERE email = '***' in the history panel; the SQL still runs as expected.
Activity