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
ScrubQueryText leaves sql comments unchanged which may leak sensitive information #54
the function "ScrubQueryText" removes quoted literals, emails, UUIDs, and numbers, but it does not remove sql comments. Sensitive values inside comments may therefore remain in query text sent to model context
Confirmed — pg_stat_statements keeps comments verbatim even when it normalizes the literals, so a comment like /* api_key=… */ reaches --json, MCP, the report and the AI prompt. I have a fix ready (a small comment lexer ahead of the existing scrub, plus a fuzz invariant) and will open a PR shortly.
Activity
lofoneh commentedon Sep 18, 2026
Confirmed — pg_stat_statements keeps comments verbatim even when it normalizes the literals, so a comment like
/* api_key=… */reaches--json, MCP, the report and the AI prompt. I have a fix ready (a small comment lexer ahead of the existing scrub, plus a fuzz invariant) and will open a PR shortly.abhiraj-ku commentedon Sep 19, 2026
hey @alexshapalov , should we add a local scrub command so we can verify how query is sanitized before entering the context . i can work on that
fix(conn): scrub SQL comment bodies in ScrubQueryText (pgrundev#56)