PyPI / sqlalchemy / 2.1.6

sqlalchemy 2.1.6

Source
https://github.com/sqlalchemy/sqlalchemy
Tag scanned
rel_2_1_6
Compared with
rel_2_1_5 (0 signals introduced since)
Files
887 scanned, 17 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 46 info
Scan time
41.7 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 42 of 42 warn and critical signals; 42 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-22 09:14

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info critical → info by review dynamic-import examples/performance/__init__.py:335:21

    `__import__` called on a non-literal expression (ast pass, confidence 0.90)

                    try:
                        __import__(__name__ + "." + potential_name)
                    except ImportError:
                        pass
    likely benign LLM, confidence 0.90 Dynamic import of a sibling profiler module by name inside the examples package.
    Reasoning

    The __import__ call builds a module path from the package's own __name__ and a name discovered within the package, inside a try/except ImportError. This is ordinary plugin discovery in a bundled example, with no network, shell or encoded payload involved.

  2. info critical → info by review dynamic-import examples/performance/__init__.py:394:13

    `__import__` called on a non-literal expression (ast pass, confidence 0.90)

            if cls.name is None:
                __import__(__name__ + "." + args.name)
    
            Profiler(args).run()
    likely benign LLM, confidence 0.90 Dynamic import of a profiler module selected by a command-line argument.
    Reasoning

    The module name is formed from __name__ and a command-line profiler name. It is a standard way to load a selected profiling target in an example script and carries no sign of malicious intent.

  3. info critical → info by review dynamic-import lib/sqlalchemy/dialects/__init__.py:48:22

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            else:
                module = __import__("sqlalchemy.dialects.%s" % (dialect,)).dialects
                module = getattr(module, dialect)
        except ImportError:
    likely benign LLM, confidence 0.93 Loads a SQLAlchemy database dialect module by name.
    Reasoning

    This is SQLAlchemy's dialect loader, which imports sqlalchemy.dialects.<name> for a dialect name the user configured. The prefix is fixed and the name is restricted to dialect identifiers, so this is the expected plugin mechanism.

  4. info critical → info by review dynamic-import lib/sqlalchemy/dialects/mysql/mariadb.py:49:19

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

    def loader(driver: str) -> type[MariaDBDialect]:
        dialect_mod = __import__(
            "sqlalchemy.dialects.mysql.%s" % driver
        ).dialects.mysql
    likely benign LLM, confidence 0.93 Loads a MySQL/MariaDB driver-specific dialect module.
    Reasoning

    The loader imports sqlalchemy.dialects.mysql.<driver> for a driver name, a standard MariaDB dialect selection routine in the library, not an attack pattern.

  5. info critical → info by review dynamic-import lib/sqlalchemy/dialects/mysql/mariadbconnector.py:210:32

    `__import__` called on a non-literal expression (ast pass, confidence 0.90)

                try:
                    CLIENT_FLAGS = __import__(
                        self.dbapi.__name__ + ".constants.CLIENT"
                    ).constants.CLIENT
    likely benign LLM, confidence 0.92 Imports the MariaDB connector's constants module to read client flags.
    Reasoning

    It imports the DBAPI's own constants submodule using the DBAPI's __name__ and reads CLIENT flags, a compatibility lookup inside a try block with no outbound or encoded behaviour.

  6. info critical → info by review dynamic-import lib/sqlalchemy/dialects/mysql/mysqldb.py:260:32

    `__import__` called on a non-literal expression (ast pass, confidence 0.90)

                try:
                    CLIENT_FLAGS = __import__(
                        self.dbapi.__name__ + ".constants.CLIENT"
                    ).constants.CLIENT
    likely benign LLM, confidence 0.92 Imports the mysqldb DBAPI's constants module to read client flags.
    Reasoning

    This is the same DBAPI-constants lookup as the MariaDB connector, derived from the configured dbapi's __name__. It is routine compatibility code.

  7. info critical → info by review dynamic-import lib/sqlalchemy/engine/default.py:742:13

    `__import__` called on a non-literal expression (ast pass, confidence 0.90)

            try:
                __import__(package + ".provision")
            except ImportError:
                pass
    likely benign LLM, confidence 0.92 Optionally imports a package's provision module for test setup.
    Reasoning

    It imports '<package>.provision' inside a try/except ImportError, the usual optional-test-provisioning hook in SQLAlchemy's testing machinery. The package name comes from the library's own test setup.

  8. info warn → info by review dynamic-attribute lib/sqlalchemy/event/base.py:335:9

    reach-by-name through `globals` (ast pass, confidence 0.60)

            # establish pickle capability by adding it to this module
            globals()[klass.__name__] = klass
    likely benign LLM, confidence 0.85 Registers a dynamically created event class in module globals for pickling.
    Reasoning

    Assigning a class into module globals() is a known SQLAlchemy technique that makes dynamically created event classes picklable under their names. It is a legitimate metaprogramming idiom, not hidden behaviour.

  9. info warn → info by review dynamic-execution lib/sqlalchemy/orm/clsregistry.py:592:21

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

                try:
                    x = eval(self.arg, globals(), self._dict)
    
                    if isinstance(x, _GetColumns):
    likely benign LLM, confidence 0.85 Evaluates a developer-supplied string expression against the ORM class registry.
    Reasoning

    eval runs on a string argument of the ORM class registry, which evaluates expressions written by the developer in relationship declarations, with the registry dict as the namespace. This is a documented SQLAlchemy feature, though string eval is a risk if the input is untrusted.

  10. info warn → info by review dynamic-attribute lib/sqlalchemy/sql/annotation.py:562:5

    reach-by-name through `globals` (ast pass, confidence 0.60)

        )
        globals()["Annotated%s" % cls.__name__] = anno_cls
    
        if "_traverse_internals" in cls.__dict__:
    likely benign LLM, confidence 0.85 Registers a generated Annotated class in module globals for pickling.
    Reasoning

    This writes a generated 'Annotated<ClassName>' class into globals() so that annotated SQL element classes can be pickled. It is a standard internal naming pattern in SQLAlchemy.

  11. info warn → info by review dynamic-attribute lib/sqlalchemy/sql/coercions.py:1366:20

    reach-by-name through `globals` (ast pass, confidence 0.60)

            if name in globals():
                impl = globals()[name](cls)
                _impl_lookup[cls] = impl
    likely benign LLM, confidence 0.88 Looks up and instantiates a coercion implementation class by name from globals.
    Reasoning

    This looks up a name in globals() to pick a coercion implementation class and instantiates it. It is an internal registry lookup with no external input.

  12. info warn → info by review dynamic-execution lib/sqlalchemy/sql/lambdas.py:1264:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            vars_ = {"o%d" % i: cell_values[i] for i in argrange}
            exec(code, vars_, vars_)
            closure = vars_["make_cells"]()
    likely benign LLM, confidence 0.85 Executes generated helper code to construct closure cells for lambda SQL caching.
    Reasoning

    exec runs generated source for a 'make_cells' helper that builds closure cells for SQL lambda caching. The code is produced internally from the library's templates, not from untrusted input, and the result is a closure factory.

  13. info critical → info by review dynamic-import lib/sqlalchemy/testing/engines.py:250:17

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

                mod = getattr(
                    __import__("sqlalchemy.dialects.%s" % name).dialects, name
                )
            yield mod.dialect()
    likely benign LLM, confidence 0.92 Dynamically imports a dialect module for test engine construction.
    Reasoning

    This imports sqlalchemy.dialects.<name> in the test-engine helper to obtain a dialect for a named test configuration. It is test scaffolding with a fixed prefix.

  14. info warn → info by review frame-introspection lib/sqlalchemy/testing/fixtures/mypy.py:118:27

    `inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)

            else:
                caller_path = inspect.stack()[1].filename
                path = os.path.join(os.path.dirname(caller_path), dirname)
            files = list(Path(path).glob("**/*.py"))
    likely benign LLM, confidence 0.90 Reads the caller's file path via the call stack to locate test fixture files.
    Reasoning

    inspect.stack()[1] is used to find the caller's file path so a test fixture can locate sibling files. This is a common test-utility pattern with no network or execution behaviour.

  15. info critical → info by review dynamic-import lib/sqlalchemy/testing/plugin/plugin_base.py:487:11

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

        # late
        mod = __import__(modname)
        for component in modname.split(".")[1:]:
            mod = getattr(mod, component)
    likely benign LLM, confidence 0.92 Imports a test module by name and walks its attribute path.
    Reasoning

    This imports a module name from the test plugin configuration and walks its attributes to reach the target. It is standard pytest/test-plugin loading code.

  16. info warn → info by review dynamic-execution lib/sqlalchemy/testing/plugin/pytestplugin.py:671:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            # in format_argpsec_plus()
            exec(code, env)
            return env[fn_name]
    likely benign LLM, confidence 0.88 Executes generated source to build a test function with a matching signature.
    Reasoning

    exec compiles a generated function definition whose argument signature was formatted from an existing function, and returns the named function. This is a known approach for preserving signatures in test wrappers, with no external input.

  17. info warn → info by review frame-introspection lib/sqlalchemy/testing/schema.py:192:18

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        try:
            module = sys._getframe(1).f_globals.get("__name__", "__main__")
        except (AttributeError, ValueError):
            pass
    likely benign LLM, confidence 0.90 Reads the calling frame's __name__ to determine the module context.
    Reasoning

    sys._getframe(1) is used to read the caller's module name for table/schema setup inside a testing helper, with the exception handled. This is a common, legitimate introspection pattern in Python libraries.

  18. identifier `é試蛇ẟΩ` mixes scripts: Latin + Han + Greek (in string/comment) (raw pass, confidence 0.40)

                metadata,
                Column("unicode", Integer, comment="é試蛇ẟΩ"),
                Column("emoji", Integer, comment="☁⟨U+FE0F⟩✨"),
                comment="試蛇ẟΩ✨",
  19. identifier `試蛇ẟΩ` mixes scripts: Han + Latin + Greek (in string/comment) (raw pass, confidence 0.40)

                Column("emoji", Integer, comment="☁⟨U+FE0F⟩✨"),
                comment="試蛇ẟΩ✨",
            )
  20. identifier `試蛇ẟΩ` mixes scripts: Han + Latin + Greek (in string/comment) (raw pass, confidence 0.40)

            tc = insp.get_table_comment("unicode_comments")
            eq_(tc, {"text": "試蛇ẟΩ✨"})
    
            cols = insp.get_columns("unicode_comments")
  21. identifier `é試蛇ẟΩ` mixes scripts: Latin + Han + Greek (in string/comment) (raw pass, confidence 0.40)

            value = {c["name"]: c["comment"] for c in cols}
            exp = {"unicode": "é試蛇ẟΩ", "emoji": "☁⟨U+FE0F⟩✨"}
            eq_(value, exp)
  22. info warn → info by review dynamic-execution lib/sqlalchemy/util/langhelpers.py:453:16

    `compile` called on a non-literal expression (ast pass, confidence 0.70)

                linecache_cache[filename] = entry
            code = compile(code, filename, "exec")
    
        exec(code, env)
    likely benign LLM, confidence 0.85 Compiles dynamically generated function source during decorator creation.
    Reasoning

    compile() is applied to generated source text inside SQLAlchemy's decorator/function-generation helper (it caches entries in linecache), a known legitimate metaprogramming technique. The code is generated internally, not attacker-supplied.

  23. info warn → info by review dynamic-execution lib/sqlalchemy/util/langhelpers.py:455:5

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

    
        exec(code, env)
        fn = env[fn_name]
    likely benign LLM, confidence 0.85 Executes generated wrapper source to build a function with a given signature.
    Reasoning

    exec of the compiled generated code into a namespace env, followed by extracting the named function, is the standard generated-function pattern used by SQLAlchemy's langhelpers. Source is internally produced.

  24. info critical → info by review dynamic-import lib/sqlalchemy/util/langhelpers.py:507:19

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            def load():
                mod = __import__(modulepath)
                for token in modulepath.split(".")[1:]:
                    mod = getattr(mod, token)
    likely benign LLM, confidence 0.85 Lazily imports a module from a dotted path and walks its attributes.
    Reasoning

    __import__ on a modulepath followed by attribute traversal is a lazy-loading helper for resolving dotted names, used for deferred imports. The module path is a library-internal argument, not untrusted input in this snippet.

  25. info critical → info by review frame-introspection lib/sqlalchemy/util/langhelpers.py:2066:17

    `sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

        try:
            frame = sys._getframe(stacklevel)
        except ValueError:
            # being called from less than 3 (or given) stacklevels, weird,
    likely benign LLM, confidence 0.85 Retrieves a caller frame at a given stack level for diagnostics.
    Reasoning

    sys._getframe with a stacklevel is used to find the caller for warning/deprecation reporting, with ValueError handling for shallow stacks. The anti-analysis label is driven only by the file also containing exit/exec calls, which is normal for this library.

  26. info warn → info by review dynamic-execution lib/sqlalchemy/util/langhelpers.py:2169:5

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

        env = locals().copy()
        exec(code, env)
        return env["set"]
    likely benign LLM, confidence 0.85 Executes internally generated source to define a helper function.
    Reasoning

    exec of code into a copied locals namespace returning env['set'] is a generated-source helper for producing a function, consistent with SQLAlchemy's internal code generation. No external input is evident.

  27. info critical → info by review dynamic-import lib/sqlalchemy/util/preloaded.py:142:17

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

                ) and key not in self.__dict__:
                    __import__(module, globals(), locals())
                    self.__dict__[key] = globals()[key] = sys.modules[module]
    likely benign LLM, confidence 0.90 Lazily imports a module on first attribute access and caches it.
    Reasoning

    This is a lazy module loader that imports a named module on first attribute access and caches it in __dict__ and globals. It is a standard deferred-import pattern and the module names are fixed in the library.

  28. info warn → info by review dynamic-attribute lib/sqlalchemy/util/preloaded.py:143:38

    reach-by-name through `globals` (ast pass, confidence 0.60)

                    __import__(module, globals(), locals())
                    self.__dict__[key] = globals()[key] = sys.modules[module]
    likely benign LLM, confidence 0.85 Caches the lazily imported module in the globals namespace.
    Reasoning

    Reading globals()[key] after a lazy import is the caching step of the same preloading helper. It is a benign, well-understood Python idiom here.

  29. info warn → info by review dynamic-execution lib/sqlalchemy/util/typing.py:265:26

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

    
                annotation = eval(expression, cls_namespace, locals_)
            else:
                annotation = eval(expression, base_globals, locals_)
    likely benign LLM, confidence 0.85 Evaluates a string annotation in a class namespace to resolve its type.
    Reasoning

    eval of a type annotation string with class and base namespaces is how SQLAlchemy resolves forward-reference annotations, as typing.get_type_hints does. The input is source annotations, not external data.

  30. info warn → info by review dynamic-execution lib/sqlalchemy/util/typing.py:267:26

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

            else:
                annotation = eval(expression, base_globals, locals_)
        except Exception as err:
            raise NameError(
    likely benign LLM, confidence 0.85 Evaluates a string annotation against module globals as a fallback.
    Reasoning

    Same annotation-resolution eval using base globals as a fallback, with exception wrapping into NameError. This is standard forward-ref resolution.

  31. info warn → info by review dynamic-execution test/base/test_typing_utils.py:243:5

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

        scope = {}
        exec(code, None, scope)
        if len(vars) == 1:
            return scope[vars[0]]
    likely benign LLM, confidence 0.80 Test helper that executes a code snippet to extract named variables.
    Reasoning

    exec in a test helper builds a scope from generated test code and returns a named variable. Test-only code with no sign of malicious use.

  32. info critical → info by review dynamic-execution test/conftest.py:56:12

    `compile` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)

    with open(bootstrap_file) as f:
        code = compile(f.read(), "bootstrap.py", "exec")
        to_bootstrap = "pytest"
        exec(code, globals(), locals())
    likely benign LLM, confidence 0.75 Loads and executes a repository bootstrap file to configure the test environment.
    Reasoning

    The test conftest reads a bootstrap.py from the repository and compiles and execs it at import. This is unusual and runs on import, but the file is a local project file used to bootstrap the test plugin, so it is most likely a legitimate test setup pattern.

  33. info critical → info by review dynamic-execution test/conftest.py:58:5

    `exec` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)

        to_bootstrap = "pytest"
        exec(code, globals(), locals())
        from sqla_pytestplugin import *  # noqa
    likely benign LLM, confidence 0.75 Execs the bootstrap code at module scope to load the pytest plugin.
    Reasoning

    Executes the bootstrap code into the conftest globals and then imports the pytest plugin, consistent with the compile at line 56. It is a project-local setup step, though running it at import time warrants a glance at the bootstrap file's contents.

  34. info warn → info by review dynamic-execution test/dialect/mysql/test_types.py:202:29

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

            # test that repr() copies out all arguments
            self.assert_compile(eval("mysql.%r" % type_inst), res)
    
        @testing.combinations(
    likely benign LLM, confidence 0.90 Evaluates the repr of a MySQL type instance to verify round-tripping in a test.
    Reasoning

    eval of a repr-generated string for a MySQL type in a test checks that repr copies all arguments. The input is the test's own type instance, so it is a benign test assertion.

  35. info critical → info by review dynamic-import test/dialect/postgresql/test_dialect.py:1271:40

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            if psycopg.__version__.startswith("3"):
                TransactionRollbackError = __import__(
                    "%s.errors" % psycopg.__name__
                ).errors.TransactionRollback
    likely benign LLM, confidence 0.90 Dynamically imports the psycopg errors module to pick the rollback exception class.
    Reasoning

    __import__ builds the psycopg errors submodule name from the installed driver's own __name__ to select the right exception class by version. This is a standard driver-compatibility shim in tests.

  36. info critical → info by review dynamic-import test/dialect/postgresql/test_dialect.py:1275:40

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            else:
                TransactionRollbackError = __import__(
                    "%s.extensions" % psycopg.__name__
                ).extensions.TransactionRollbackError
    likely benign LLM, confidence 0.90 Dynamically imports the psycopg extensions module for a version-specific exception class.
    Reasoning

    Same psycopg compatibility import, here selecting the extensions module for the older driver version. The module name derives from the installed driver, so this is a benign test shim.

  37. info critical → info by review dynamic-import test/dialect/test_all.py:9:21

    `__import__` called on a non-literal expression (ast pass, confidence 0.70)

            return [
                getattr(__import__("sqlalchemy.dialects.%s" % d).dialects, d)
                for d in dialects.__all__
                if not d.startswith("_")
    likely benign LLM, confidence 0.93 Test helper that dynamically imports SQLAlchemy dialect submodules by name.
    Reasoning

    Dynamic __import__ over a list of dialect names from the package's own __all__ inside a test helper. Benign test-suite dynamic loading of a trusted, local package; no network or encoded payload.

  38. info warn → info by review dynamic-execution test/engine/test_parseconnect.py:611:13

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            ):
                exec(
                    "from sqlalchemy.dialects import %s\ndialect = "
                    "%s.dialect()" % (name, name),
    likely benign LLM, confidence 0.92 Test code that execs a generated import statement to exercise dialect loading.
    Reasoning

    exec builds a dialect import string from test-controlled names to verify a dialect loads. This is ordinary test scaffolding within SQLAlchemy's test suite, not an obfuscated or malicious payload.

  39. info warn → info by review decoder-import-with-exec test/ext/test_associationproxy.py:918:21

    file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)

    
                        exec("p.children %s other" % op)
                        exec("control %s other" % op)
    likely benign LLM, confidence 0.90 Test code generating comparison expressions via exec for association proxy operator tests.
    Reasoning

    The pickle-plus-exec co-occurrence is a heuristic hit; the exec strings are formatted with a test-local comparison operator to generate expressions for testing association proxy operators. Legitimate test code, not a multi-stage payload.

  40. info warn → info by review dynamic-execution test/ext/test_associationproxy.py:918:21

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

    
                        exec("p.children %s other" % op)
                        exec("control %s other" % op)
    likely benign LLM, confidence 0.92 Test exec of a formatted comparison expression for association proxy checks.
    Reasoning

    exec of a string formatted with a loop-controlled operator inside a test to check operator behavior. Dynamic code in tests of this kind is a normal pattern; no external input or obfuscation.

  41. info warn → info by review dynamic-execution test/ext/test_associationproxy.py:919:21

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

                        exec("p.children %s other" % op)
                        exec("control %s other" % op)
    
                        try:
    likely benign LLM, confidence 0.92 Second test exec of a formatted comparison expression for association proxy checks.
    Reasoning

    Same exec of a test-generated comparison string at the adjacent line. Benign test scaffolding within the SQLAlchemy test suite.

  42. info warn → info by review dynamic-execution test/orm/test_inspect.py:513:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

    
            exec(code, glbls)
            return names, glbls[clsname]
    likely benign LLM, confidence 0.92 Test helper that execs generated class source and returns the resulting class.
    Reasoning

    exec of locally generated class source code into a namespace dict, then reads back the class. This is a common test technique for building classes dynamically; the code is not from untrusted input.

  43. info critical → info by review dynamic-execution test/perf/orm2010.py:167:9

    `os.system` called on a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)

        if runsnake:
            os.system("runsnake %s" % filename)
    likely benign LLM, confidence 0.85 Perf script that shells out to runsnake to view a profile file.
    Reasoning

    os.system with a formatted filename for an optional profiling tool (runsnake) in a perf script. The command is built from a local filename argument, not remote data; shell injection risk is minor in a developer perf script and this is not a dropper.

  44. info warn → info by review dynamic-execution test/sql/test_lambdas.py:2220:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            d = {"A": A, "__name__": "lambda_fake"}
            exec(code, d)
            generate_lambda_stmt = d["generate_lambda_stmt"]
    likely benign LLM, confidence 0.92 Test code that execs generated source to build a lambda-statement helper.
    Reasoning

    exec of a generated code string into a dict to produce a fake lambda module for testing lambda statement generation. Test-only dynamic code generation, no obfuscation.

  45. info warn → info by review decoder-import-with-exec test/sql/test_metadata.py:7745:13

    file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)

            # the repr round trips
            eq_(eval(repr(fk)).target_tokens, fk.target_tokens)
    
        def test_no_such_column_error_message(self):
    likely benign LLM, confidence 0.92 Test that evals the repr of a ForeignKey to verify round-tripping.
    Reasoning

    Heuristic co-occurrence of pickle import and eval; the eval is repr round-tripping of a ForeignKey in a test. Legitimate test of repr behavior, not a payload.

  46. info warn → info by review dynamic-execution test/sql/test_metadata.py:7745:13

    `eval` called on a non-literal expression (ast pass, confidence 0.70)

            # the repr round trips
            eq_(eval(repr(fk)).target_tokens, fk.target_tokens)
    
        def test_no_such_column_error_message(self):
    likely benign LLM, confidence 0.92 eval of a ForeignKey repr inside a round-trip test.
    Reasoning

    eval of repr(fk) in a unit test checking that the repr round-trips. Trusted local object, standard test idiom.

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.

cargo install disclude --version 4.1.0
git clone https://github.com/sqlalchemy/sqlalchemy sqlalchemy && cd sqlalchemy
git checkout rel_2_1_6
disclude scan --severity info --diff rel_2_1_5 .