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
Truthiness/exception-handling bugs allow silent validation bypass and uncaught crashes in validate.py #408
Found while reviewing #373. None of these are regressions introduced by that PR — they're pre-existing bugs in code adjacent to what it touches, and outside its diff hunks — but they're the same bug classes #373 fixes for the "Warning:" text-matching case (silent bypass via a shortcut check, and uncaught exceptions crashing the validator).
The truthiness check (and the equivalent to_ds check) skips the unknown-dataset
check whenever from/to is "". Since the schema has no minLength constraint,
this is schema-valid and currently passes validation:
Same truthiness-filter pattern (repeated for fields/metrics/relationships below)
drops empty-string names before duplicate detection runs. Two datasets both named "" are schema-valid and currently pass with no duplicate-name error.
Fix: filter on is not None instead of truthiness.
3. validate_sql_expression only catches ParseError/TokenError (validate.py:295)
Other exceptions sqlglot can raise propagate uncaught and crash main() with a raw
traceback instead of a [SQL] diagnostic.
Repro: a SQL expression with ~5000 nested ( raises RecursionError from sqlglot.parse_one, uncaught.
Fix: broaden the catch (or catch Exception and re-tag as [SQL]) so malformed
input can't take down the whole validator run.
4. main() YAML load only catches yaml.YAMLError (validate.py:384)
A RecursionError from PyYAML's scanner/composer on deeply nested input propagates
uncaught.
Repro: a file with ~3000 nested [ crashes with a raw multi-frame traceback instead
of "Error: Invalid YAML: ...". Exit code stays non-zero either way, but tooling/humans
expecting clean diagnostic output on stdout get a stack trace instead.
Activity
christianeu-db commentedon Sep 17, 2026
@jbonofre i'm happy to take a pass on these if you'd like
refactor(validation): simplify SQL guard and trim comments
fix(validation): reject empty identifiers and survive nested input
fix(validation): reject empty identifiers and survive nested input (#414