sqlglot 30.23.0
- Source
- https://github.com/tobymao/sqlglot
- Tag scanned
v30.23.0- Compared with
v30.22.0(0 signals introduced since)- Files
- 262 scanned, 86 skipped (binary, oversized, or unrecognised)
- Signals
- 1 critical · 0 warn · 11 info
- Scan time
- 12.1 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 7 of 7 warn and critical signals; 6 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-15 12:10
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
, = = =suspicious Dynamically imports the module named in a serialized class path during expression deserialization.Reasoning
__import__ is called with a module path derived from a class name string in a serialization loader, which is a dynamic import pattern worth noting since serialized input could name arbitrary modules. The snippet shows the path being split from a class-name string, consistent with deserializing known sqlglot expression classes; the critical severity reflects the dynamic-import surface rather than evidence of malice.
-
# Load all dialects up front because lazy loading breaks pdoc's dynamic importing =likely benign Eagerly loads sqlglot dialect classes by name via globals() so pdoc documentation generation works.Reasoning
Rebinding sqlglot.dialects.__all__ to a list comprehension over globals() is a documented workaround for pdoc's dynamic import behavior, with an explanatory comment. Name-based lookup of module attributes is ordinary Python here and no payload or hidden execution is involved.
-
= = returnlikely benign Lazy attribute loader that caches resolved module attributes into the package globals.Reasoning
This is a standard lazy-module __getattr__ pattern that imports a submodule attribute and caches it in globals(). It is a common, legitimate Python idiom with no network, decoding, or execution of untrusted data.
-
returnlikely benign Evaluates Python code generated from SQL expressions inside the sqlglot in-memory executor.Reasoning
eval is used on code strings produced by sqlglot's own Python executor compiler from parsed SQL expressions, with a restricted env. This is by design for a SQL-to-Python execution engine, but eval on generated code is a real risk surface if inputs were untrusted; it is not obfuscation or a dropper.
-
= returnlikely benign Compiles generated Python expression source from SQL in the sqlglot executor.Reasoning
compile is applied to SQL-generated Python source in the executor's code path, so the non-literal input comes from the library's own generator rather than attacker-controlled bytes. Expected for this kind of engine and not an encoded payload.
-
= returnlikely benign Lazy module attribute resolver that caches loaded values into globals().Reasoning
Same lazy-loading __getattr__ idiom caching a value into globals(), with a clear AttributeError on failure. Standard and benign.
-
dismissed Test SQL string literal for Athena CREATE TABLE statement flagged for compressibility.
Reasoning
This is a long SQL string literal in a test file, a normal CREATE TABLE statement with a compression ratio flagged only because of its repetitive text. Raw-pass heuristics have a high false-positive rate here and there is no obfuscation.
-
-
-
=, ) -
-
,
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.
&&