sqlglot 30.24.0
- Source
- https://github.com/tobymao/sqlglot
- Tag scanned
v30.24.0- Compared with
v30.23.0(0 signals introduced since)- Files
- 263 scanned, 86 skipped (binary, oversized, or unrecognised)
- Signals
- 1 critical · 1 warn · 11 info
- Scan time
- 12.7 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 8 of 8 warn and critical signals; 6 demoted to info.
- Disclude version
- 4.1.0
- Scanned (UTC)
- 2026-10-22 07:57
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
, = = =suspicious Deserializer imports a module named in serialized data to reconstruct expression classes.Reasoning
__import__ is called with a module path taken from a serialized class name during deserialization. This is a plausible design for loading sqlglot expression classes, but it does let serialized data choose which module gets imported, so a deserialization path can be abused. Critical severity is overstated given the usual library context.
-
confirmed A Markdown comment hides an instruction telling AI agents to append their model name to PR titles.
Reasoning
The hidden comment directs AI agents to append model names to PR titles, an instruction to an AI hidden from human readers in a markdown comment. It is a prompt-injection-style steering attempt, though low-harm (only PR title edits), so it is clearly suspicious rather than a mere hidden note.
-
# Load all dialects up front because lazy loading breaks pdoc's dynamic importing =likely benign Documentation-generation code resolves dialect names via globals() to eagerly load them for pdoc.Reasoning
This is a documented workaround in a documentation tool: it rewrites the module's __all__ by looking up dialect names in globals so pdoc can import them. Reaching names by string in globals is a common benign pattern in Python packages.
-
= = returnlikely benign Lazy-import helper caches a dynamically fetched module attribute into globals().Reasoning
This is a standard lazy-loading module __getattr__ pattern that caches imported dialect attributes into globals. Benign framework idiom.
-
returnlikely benign Evaluates generated Python code strings against an environment in the SQL executor.Reasoning
sqlglot's executor intentionally compiles generated Python expressions from SQL and evaluates them in a restricted environment. The eval is by design for a SQL-to-Python executor, and the code is derived from SQL ASTs rather than untrusted network input, though eval of generated code is a real risk surface.
-
= returnlikely benign Compiles Python source generated from a SQL expression for the executor.Reasoning
compile is applied to SQL-generated Python source inside the executor, matching the library's design of turning SQL expressions into Python code objects. Non-literal but internally generated, not an obvious dropper.
-
= returnlikely benign Lazy-loading __getattr__ caches resolved optimizer attribute into globals().Reasoning
Same lazy module attribute pattern: a __getattr__ that imports a name and caches it in globals. Standard and benign.
-
dismissed Test file contains a long, repetitive SQL CREATE TABLE literal flagged for compressibility.
Reasoning
A long SQL string literal in a test file has high compression ratio because it is repetitive SQL text. Raw-pass false positive on ordinary test data.
-
-
-
=, ) -
-
,
Reproduce This Scan
Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.
&&