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
SQL literal redaction: comments, backslash escapes and dollar quotes shift quote pairing #109
redactSqlLiterals (packages/performance/src/span-sanitizer.ts) pairs quotes left to right, so a quote character that is not a string delimiter shifts the pairing and a literal after it is left in the clear. This is pre-existing on main (found by the review of #104, which did not change the pairing rule), so it is recorded here rather than fixed there.
Apostrophe in a block comment: /* don't */ SELECT * FROM t WHERE a = 'secretA'
Apostrophe in a line comment: -- it's\nSELECT * FROM t WHERE a = 'secretB'
Backslash-escaped quote (MySQL, Postgres with standard_conforming_strings = off): INSERT INTO t VALUES ('O\'Brien','secretC')
Dollar quoting (Postgres): SELECT $$it's$$, 'secretD'
Likely shape of a fix: tokenise instead of pairing quotes, i.e. skip -- and /* */ comments, treat \' as an escape where the dialect allows it, and recognise $tag$ ... $tag$ bodies; whichever tokens it cannot classify should fail closed (redact to the end of the statement).
Related, already handled in #104: a statement cut by a length cap inside a literal (the open trailing literal is now replaced).
Activity
fix(performance): single length read, copy arrays on flatten, token-d…
fix(opentelemetry): support OpenTelemetry JS 3.x (sdk-trace peer, Any…
fix(performance): scan SQL under every dialect and fail closed where …
fix(performance): E-string-only backslash escapes, CR comment ends, u…
fix(performance): MySQL executable comments, per-dialect line ends, m…
fix(performance): fail closed on quotes inside backtick runs, drop re…
fix(performance): dollar quotes after backticks and digits fail closed (
fix(performance): backtick runs with comment/dollar openers fail clos…
fix(performance): tokenise SQL literal redaction (comments, backslash…
fix(performance): fail closed on ambiguous backslash literals, nested…
fix(performance): scan SQL under every dialect and fail closed where …
fix(performance): E-string-only backslash escapes, CR comment ends, u…
fix(performance): MySQL executable comments, per-dialect line ends, m…
fix(performance): fail closed on quotes inside backtick runs, drop re…
fix(performance): dollar quotes after backticks and digits fail closed (
24 remaining items
fix(performance): compare SQL dialect readings by source position, no…
docs(performance): clarify source-offset bookkeeping in redactSqlLite…
fix(performance): tokenise SQL literal redaction (comments, backslash…
fix(performance): fail closed on ambiguous backslash literals, nested…
fix(performance): scan SQL under every dialect and fail closed where …
fix(performance): E-string-only backslash escapes, CR comment ends, u…
fix(performance): MySQL executable comments, per-dialect line ends, m…
fix(performance): fail closed on quotes inside backtick runs, drop re…
fix(performance): dollar quotes after backticks and digits fail closed (
fix(performance): backtick runs with comment/dollar openers fail clos…
test(performance): pin cross-dialect cut shape losses, CR line-commen…
fix(performance): compare SQL dialect readings by source position, no…
docs(performance): clarify source-offset bookkeeping in redactSqlLite…
fix(performance): redact an exponent after a decimal point with no fr…