Skip to content

Feat/0.3.2 sanitized mode mirrors vericto cli - #14

Merged
vericto merged 2 commits into
mainfrom
feat/0.3.2-sanitized-mode-mirrors-vericto-cli
Oct 18, 2026
Merged

vericto merged 2 commits into
mainfrom
feat/0.3.2-sanitized-mode-mirrors-vericto-cli

Conversation

@vericto

@vericto vericto commented Oct 18, 2026

Copy link
Copy Markdown
Owner

No description provided.

vericto-dbt in a sanitized-mode workspace sent parts of literals in the same
cases vericto-cli 1.8.1 did. vericto.sanitize now ports vericto-cli 1.8.2's
src/sanitize.rs rule for rule: a lexer that ends every literal where the
dialect's own lexer ends it, and fails closed (what it cannot read with
certainty becomes one placeholder up to the end).

Leaks fixed: Snowflake backslash escapes; MySQL with NO_BACKSLASH_ESCAPES
(read in both modes); MySQL "..." strings; Oracle q'[...]' / q'{...}' /
q'(...)' / q'<...>' / q'!...!' / nq'...'; dollar-quoted strings and DO /
function bodies; comments the dialect reads differently (MySQL #, -- without
a space, /*! ... */, Snowflake //, nested PostgreSQL/MSSQL /* */); prefixed
literals and number forms sent in part; unterminated quoted identifiers,
comments and dollar quotes copied to the end.
Fixed: Oracle :1 and MSSQL [col 1] kept as written; new placeholders numbered
after the highest existing $N / :N; a digit after a non-ASCII letter is no
longer read as a number (café2 became café$1); dialect name case-insensitive.

tests/fixtures/sanitize/vericto-cli-1.8.2.json replaces the 1.8.0 file and is
vericto-cli 1.8.2's tests/fixtures/sanitize.json byte for byte (133 vectors).
tests/test_sanitize.py: the fixture, a seeded property test (secret markers
inside literals of every kind, seven dialects), non-ASCII and linear-time
checks. tests/test_dbt.py: the sanitized PostgreSQL model now expects $2 next
to its existing $1. Differential run against vericto-cli 1.8.2's sanitize.rs:
214,133 inputs, identical output.

_version.py 0.3.2; CHANGELOG [0.3.2] - 2026-10-18 with a Security section.
@vericto
vericto requested a review from donkan168 as a code owner October 18, 2026 17:05
@vericto
vericto merged commit a36487a into main Oct 18, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants