PyPI / numba / 0.68.1rc2

numba 0.68.1rc2

Artifact scanned
numba-0.68.1rc2.tar.gz (sdist · 2.7 MB · SHA-256 6f6b3c8d7dc0…)
Compared with
numba-0.68.0.tar.gz (0 signals introduced since)
Files
960 scanned, 17 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 118 info
Scan time
81.1 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 110 of 110 warn and critical signals; 110 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 11:43

Signals

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

  1. info warn → info by review encoding-base64 docs/source/cuda/cuda_compilation.rst:99:59

    4 rows of base64-like lines, lines 99-102 (first: base64-like blob (102 bytes, compression ratio 1.03)) (raw pass, confidence 0.60)

    
       .visible .func  (.param .b32 func_retval0) _ZN8__main__3addB2v1B94cw51cXTLSUwv1sCUt9Uw1VEw0NRRQPKzLTg4gaGKFsG2oMQGEYakJSQB1PQBk0Bynm21OiwU1a0UoLGhDpQE8oxrNQE_3dEii(
           .param .b64 _ZN8__main__3addB2v1B94cw51cXTLSUwv1sCUt9Uw1VEw0NRRQPKzLTg4gaGKFsG2oMQGEYakJSQB1PQBk0Bynm21OiwU1a0UoLGhDpQE8oxrNQE_3dEii_param_0,
    likely benign LLM, confidence 0.90 Long mangled CUDA/PTX function name in documentation flagged as base64-like.
    Reasoning

    The base64-like lines are a mangled PTX kernel symbol name (Numba mangled name with long random-looking identifiers) in RST documentation. Raw pass has high false-positive rate; no decode or execution.

  2. info identifier-low-length docs/source/user/troubleshoot.rst:675:1

    [embedded python] 15 of 32 non-conventional identifiers are single-character (47%) (token pass, confidence 0.50)

  3. info warn → info by review encoding-base64 docs/source/user/troubleshoot.rst:855:104

    base64-like blob (66 bytes, compression ratio 0.86) (raw pass, confidence 0.60)

        #2  0x00007f59d17ce326 in __gufunc__._ZN13$3cdynamic$3e45__numba_parfor_gufunc__0x7ffff80a61ae3e31$244E5ArrayIyLi1E1C7mutable7alignedE5ArrayIxLi1E1C7mutable7alignedE ()
        #3  0x00007f59d37d7320 in thread_worker ()
        from <path>/numba/numba/npyufunc/workqueue.cpython-37m-x86_64-linux-gnu.so
    likely benign LLM, confidence 0.93 Crash backtrace text in docs flagged as a base64-like blob.
    Reasoning

    Stack trace output containing a mangled Numba symbol name and a file path, documentation only.

  4. info warn → info by review embedded-nul-in-string numba/cext/listobject.c:707:33

    string literal contains an embedded NUL followed by 21 more bytes of source (token pass, confidence 0.85)

        CHECK(memcmp(got_item, "pqr", 4) == 0);
        CHECK(memcmp(lp->items, "def\x00ghi\x00jkl\x00mno\x00", 16) == 0);
    
        // get and del last (4th) item, no shift since only last item affected
    likely benign LLM, confidence 0.95 Test assertion using a string literal with embedded NUL bytes to compare list contents.
    Reasoning

    Embedded NULs in C string literals used as test fixture data for memcmp checks of list items; standard C test idiom.

  5. info warn → info by review embedded-nul-in-string numba/cext/listobject.c:716:33

    string literal contains an embedded NUL followed by 14 more bytes of source (token pass, confidence 0.85)

        CHECK(memcmp(got_item, "mno", 4) == 0);
        CHECK(memcmp(lp->items, "def\x00ghi\x00jkl\x00", 12) == 0);
    
        // flip and check the is_mutable member
    likely benign LLM, confidence 0.95 Unit test comparing list memory against a NUL-delimited literal.
    Reasoning

    Same test-fixture pattern of embedded NULs compared via memcmp in unit tests.

  6. info warn → info by review embedded-nul-in-string numba/cext/listobject.c:748:24

    string literal contains an embedded NUL followed by 14 more bytes of source (token pass, confidence 0.85)

        // current contents of list
        test_items_1 = "def\x00ghi\x00jkl\x00";
        while ( (status = numba_list_iter_next(&iter, &it_item)) == LIST_OK) {
            it_count += 1;
    likely benign LLM, confidence 0.95 Test fixture string with embedded NULs for list iteration check.
    Reasoning

    Expected-contents fixture for list iteration test; embedded NULs are deliberate byte layout.

  7. info warn → info by review encoding-hex numba/cext/listobject.c:794:22

    17 consecutive `\xNN` escapes (entropy 4.1 bits/byte) (raw pass, confidence 0.65)

        // Check current contents of list
        test_items_2  = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10";
        CHECK(memcmp(lp->items, test_items_2, 17) == 0);
    likely benign LLM, confidence 0.95 Test array of sequential bytes written as hex escapes.
    Reasoning

    Sequential byte values 0x00 to 0x10 used as expected memory contents in a memcmp test; a plain byte pattern, not obfuscation.

  8. info warn → info by review encoding-hex numba/cext/listobject.c:840:21

    17 consecutive `\xNN` escapes (entropy 4.1 bits/byte) (raw pass, confidence 0.65)

        CHECK(lp->size == 17);
        test_items_3 = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10";
        CHECK(memcmp(lp->items, test_items_3, 17) == 0);
    likely benign LLM, confidence 0.95 Test expected-bytes array written as hex escapes.
    Reasoning

    Identical sequential byte test fixture as neighboring test in the same file.

  9. info critical → info by review dynamic-import numba/cloudpickle/cloudpickle.py:483:5

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

        # module.
        __import__(name)
        return sys.modules[name]
    likely benign LLM, confidence 0.80 Helper that imports a module by a runtime name during unpickling of dependent modules.
    Reasoning

    cloudpickle's subimport helper imports a module by name taken from a pickled reference; this is the standard documented mechanism for importing modules during unpickling. Still a dynamic import of a non-literal, so a name-based concern remains worth noting, but the code is the known legitimate pattern.

  10. info warn → info by review dynamic-attribute numba/core/caching.py:438:27

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

                        # fallback to local globals
                        cls = globals().get(locator_class_path)
                        if cls is None:
                            raise RuntimeError(f"Unknown cache locator class: '{locator_class_path}' specified via "
    likely benign LLM, confidence 0.90 Fallback lookup of a cache locator class by name from module globals.
    Reasoning

    Looks up a locator class by name in globals as a fallback when a user-specified class path is used for cache locators; a configuration lookup with a clear error path, not hidden execution.

  11. info warn → info by review dynamic-attribute numba/core/config.py:590:17

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

                if name.isupper():
                    globals()[name] = value
    likely benign LLM, confidence 0.90 Writes uppercase config names into module globals from parsed settings.
    Reasoning

    Standard config loader that exports uppercase environment-derived settings into module globals; a common and expected pattern.

  12. info warn → info by review frame-introspection numba/core/decorators.py:298:13

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

        # Get the module jit_module is being called from
        frame = inspect.stack()[1]
        module = inspect.getmodule(frame[0])
        # Replace functions in module with jit-wrapped versions
    likely benign LLM, confidence 0.90 Inspects the call stack to locate the module calling jit_module.
    Reasoning

    Uses the caller's frame to find the calling module so jit_module can replace functions there; a documented API feature requiring stack introspection.

  13. info warn → info by review dynamic-execution numba/core/ir_utils.py:1665:5

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

        loc = {}
        exec(func_text, glbls, loc)
    
        f = loc['closure']()
    likely benign LLM, confidence 0.80 Executes dynamically generated Python source to build a closure for IR utilities.
    Reasoning

    Generates a function from source text it builds internally for Numba IR code generation and then calls it; generated code is compiler-internal, not attacker-controlled input from outside. Exec of generated code is a known pattern in Numba, though it is worth a check of the source origin.

  14. info warn → info by review dynamic-execution numba/core/sigutils.py:19:12

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

        # Just eval signature_str using the types submodules as globals
        return eval(signature_str, {}, types.__dict__)
    likely benign LLM, confidence 0.85 Evaluates a type signature string against the numba types namespace.
    Reasoning

    eval on a signature string with empty builtins and only the types module as namespace; a restricted eval for parsing type signatures, a low-risk pattern here.

  15. info warn → info by review decoder-decompress-payload numba/core/targetconfig.py:316:14

    file imports decoder module(s) zlib, base64 and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

            zdict = cls._make_compression_dictionary()
            dc = zlib.decompressobj(zdict=zdict, **cls._ZLIB_CONFIG)
            buf = []
            while raw:
    likely benign LLM, confidence 0.85 Decompresses serialized target configuration data using a zlib dictionary.
    Reasoning

    Decompresses a zlib-compressed dictionary-based config blob, a serialization format for Numba target configuration in a compiler cache, not a hidden payload executed afterward. Decompression alone without exec is not malicious.

  16. info warn → info by review dynamic-attribute numba/core/types/__init__.py:151:26

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

    
    _make_signed = lambda x: globals()["int%d" % (ctypes.sizeof(x) * 8)]
    _make_unsigned = lambda x: globals()["uint%d" % (ctypes.sizeof(x) * 8)]
    likely benign LLM, confidence 0.93 Lambda selects a numba integer type by name from globals() based on ctypes size.
    Reasoning

    globals() lookup of intN/uintN type names built from ctypes sizeof is a standard, benign way to map C type sizes to numba types; the key is derived from the machine's integer width, not external input.

  17. info warn → info by review dynamic-attribute numba/core/types/__init__.py:152:28

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

    _make_signed = lambda x: globals()["int%d" % (ctypes.sizeof(x) * 8)]
    _make_unsigned = lambda x: globals()["uint%d" % (ctypes.sizeof(x) * 8)]
    
    char = np_char = _make_signed(ctypes.c_char)
    likely benign LLM, confidence 0.93 Lambda selects a numba unsigned integer type by name from globals() based on ctypes size.
    Reasoning

    Same pattern as the sibling finding: unsigned type lookup by computed name from ctypes sizes, a legitimate type-mapping idiom in numba's type module.

  18. info warn → info by review dynamic-execution numba/core/untyped_passes.py:1012:9

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

            l = {}
            exec(wstr, {}, l)
            bfunc = l['foo']
            branches = compile_to_numba_ir(bfunc, {})
    likely benign LLM, confidence 0.90 exec of internally generated wrapper source to produce a compiled helper function.
    Reasoning

    Numba's internal code generates a wrapper function source string (wstr) from its own template and execs it into a local namespace to build a branch-pruning helper; this is a known compiler technique, not an attack.

  19. info warn → info by review dynamic-execution numba/cuda/compiler.py:369:12

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

        cc = get_current_device().compute_capability
        return compile(pyfunc, sig, debug=debug, lineinfo=lineinfo, device=device,
                       fastmath=fastmath, cc=cc, opt=opt, abi=abi,
                       abi_info=abi_info, output=output)
    likely benign LLM, confidence 0.93 Wrapper forwards arguments to numba's CUDA compile function.
    Reasoning

    compile here is numba's own CUDA compiler entry point forwarding user options; the call is an ordinary API delegation, not dynamic code execution of untrusted data.

  20. info warn → info by review dynamic-execution numba/cuda/compiler.py:380:12

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

        device function with the C ABI."""
        return compile(pyfunc, sig, debug=debug, lineinfo=lineinfo, device=device,
                       fastmath=fastmath, cc=cc, opt=opt, abi=abi,
                       abi_info=abi_info, output='ptx')
    likely benign LLM, confidence 0.93 Wrapper forwards to numba's CUDA compile with PTX output for device functions.
    Reasoning

    Same as the sibling: a thin wrapper calling numba's compile with output='ptx' for C-ABI device functions; legitimate API delegation.

  21. info warn → info by review dynamic-execution numba/cuda/deviceufunc.py:396:9

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

            sig = signature(types.void, *([a[:] for a in args] + [return_type[:]]))
            exec(kernelsource, glbl)
    
            stager = glbl['__vectorized_%s' % funcname]
    likely benign LLM, confidence 0.90 exec of generated CUDA kernel source for a vectorized device ufunc.
    Reasoning

    Generates CUDA vectorize kernel source from ufunc signatures and execs it into a namespace dict to obtain the stager; standard code generation used by numba's ufunc machinery.

  22. info warn → info by review dynamic-execution numba/cuda/deviceufunc.py:482:9

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

    
            exec(src, glbls)
            fnobj = glbls['__gufunc_{name}'.format(name=funcname)]
    likely benign LLM, confidence 0.90 exec of generated CUDA gufunc source to produce a kernel function.
    Reasoning

    Executes generated gufunc kernel source built from the library's own templates with a name derived from the function name; consistent with numba's codegen, no external payload.

  23. info warn → info by review frame-introspection numba/cuda/simulator/kernelapi.py:115:41

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

            # http://bugs.python.org/issue25108
            stack = traceback.extract_stack(sys._getframe())
            caller = stack[-2][0:2]
            res = self._allocations.get(caller)
    likely benign LLM, confidence 0.93 Simulator reads the caller frame to key shared-memory allocations.
    Reasoning

    The CUDA simulator uses sys._getframe to identify the caller's file and line for allocation bookkeeping; a debugging/simulation technique with no malicious effect.

  24. info warn → info by review dynamic-execution numba/cuda/tests/cudapy/test_atomics.py:434:5

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

        ld = {}
        exec(fns, {'cuda': cuda, 'float64': float64, 'uint64': uint64}, ld)
        return (ld['atomic'], ld['atomic_double_normalizedindex'],
                ld['atomic_double_oneindex'], ld['atomic_double_shared'])
    likely benign LLM, confidence 0.93 Test helper execs generated atomic kernel source into a local namespace.
    Reasoning

    Test helper execs a fixed, test-authored source string with explicit restricted globals to build atomic kernels; ordinary test scaffolding.

  25. info warn → info by review dynamic-execution numba/cuda/tests/cudapy/test_compiler.py:197:22

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

        def test_compile_defaults_to_c_abi(self):
            ptx, resty = compile(f_module, int32(int32, int32), device=True)
    
            # The function name should match the Python function name, and its
    likely benign LLM, confidence 0.95 Test calls numba's CUDA compile on a device function to check C ABI naming.
    Reasoning

    A unit test calling numba's compile API on a local test function; no dynamic execution of untrusted content.

  26. info warn → info by review dynamic-execution numba/cuda/tests/cudapy/test_compiler.py:208:24

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

    
            ltoir, resty = compile(f_module, int32(int32, int32), device=True,
                                   output="ltoir")
    likely benign LLM, confidence 0.95 Test calls numba's CUDA compile requesting LTOIR output.
    Reasoning

    Unit test invoking numba's compile with ltoir output; standard API test.

  27. info warn → info by review dynamic-execution numba/cuda/tests/cudapy/test_compiler.py:223:13

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

            with self.assertRaisesRegex(NotImplementedError, msg):
                compile(f_module, int32(int32, int32), device=True,
                        output=illegal_output)
    likely benign LLM, confidence 0.95 Test checks that compile rejects an unsupported output type.
    Reasoning

    Test asserting that an illegal output option raises NotImplementedError; the 'compile' is numba's API under test.

  28. info warn → info by review dynamic-execution numba/cuda/tests/cudapy/test_libdevice.py:144:9

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

            locals = {}
            exec(code, globals(), locals)
            pyfunc = locals['pyfunc']
    likely benign LLM, confidence 0.93 Test execs generated Python function source to build a libdevice test function.
    Reasoning

    Test execs a test-generated source snippet to produce a pyfunc for libdevice checks; ordinary test scaffolding.

  29. info warn → info by review dynamic-execution numba/cuda/tests/cudapy/test_ufuncs.py:14:5

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

        func_str = f'def fn({arg_str}):\n    np.{ufunc.__name__}({arg_str})'
        exec(func_str, globals(), ldict)
        fn = ldict['fn']
        fn.__name__ = '{0}_usecase'.format(ufunc.__name__)
    likely benign LLM, confidence 0.93 Test execs generated wrapper source for a numpy ufunc to exercise it.
    Reasoning

    Test builds a function source from ufunc name and argument string and execs it to test ufunc behavior; the ufunc names come from numpy, not untrusted input.

  30. info warn → info by review dynamic-execution numba/cuda/tests/nocuda/test_import.py:43:23

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

            out, _ = run_in_subprocess(code)
            modlist = set(eval(out.strip()))
            unexpected = set(banlist) & set(modlist)
            self.assertFalse(unexpected, "some modules unexpectedly imported")
    likely benign LLM, confidence 0.85 A test uses eval to parse a set literal printed by a subprocess that reports imported modules.
    Reasoning

    The eval input comes from the stdout of a subprocess the test itself launched, which prints a list of imported module names. It is test scaffolding, not an attack path.

  31. info warn → info by review dynamic-execution numba/experimental/jitclass/base.py:110:9

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

            glbls = {"__numba_cls_": cls}
            exec(ctor_source, glbls)
            ctor = glbls['ctor']
            cls._ctor = njit(ctor)
    likely benign LLM, confidence 0.90 Numba's jitclass builds its constructor by exec-ing generated Python source.
    Reasoning

    ctor_source is generated by Numba's jitclass machinery to build a constructor, and the namespace only exposes the class. This is standard JIT code generation.

  32. info warn → info by review dynamic-execution numba/experimental/jitclass/boxing.py:39:5

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

        glbls = {}
        exec(source, glbls)
        return njit(glbls[fname])
    likely benign LLM, confidence 0.90 Jitclass boxing code generates helper functions from internal source templates via exec.
    Reasoning

    The source is a template generated internally by Numba for jitclass boxing helpers, then compiled with njit. No external input reaches it.

  33. info warn → info by review dynamic-execution numba/experimental/jitclass/boxing.py:56:5

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

        glbls = {}
        exec(source, glbls)
        method = njit(glbls['method'])
    likely benign LLM, confidence 0.90 Jitclass boxing generates a method implementation from an internal template via exec.
    Reasoning

    Same pattern as the other boxing exec: an internally generated method template is compiled and wrapped with njit.

  34. info warn → info by review dynamic-execution numba/experimental/jitclass/overloads.py:44:5

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

        namespace = {}
        exec(template, namespace)
        return namespace[name]
    likely benign LLM, confidence 0.90 Jitclass overload code is produced by exec-ing an internal template.
    Reasoning

    The template is an internal Numba code template executed in a fresh namespace to produce an overload function.

  35. info warn → info by review dynamic-execution numba/experimental/structref.py:223:5

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

        glbs = dict(struct_typeclass=struct_typeclass, new=new)
        exec(source, glbs)
        ctor = glbs['ctor']
        # Make it an overload
    likely benign LLM, confidence 0.90 Structref constructor is generated from a template with exec.
    Reasoning

    The source is a constructor template generated internally for structref types, and the globals are fixed by the library.

  36. info critical → info by review dynamic-import numba/misc/help/inspector.py:181:23

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

                    # Import the module
                    mod = __import__(modname)
                except Exception:
                    continue
    likely benign LLM, confidence 0.85 The help inspector dynamically imports module names discovered in a package to document them.
    Reasoning

    This is a documentation inspector that imports modules by name while walking Numba's own package tree, inside a try/except. The critical severity reflects the dynamic __import__ pattern, not an attack.

  37. info critical → info by review dynamic-import numba/misc/help/inspector.py:386:15

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

        """
        package = __import__(package_name)
        if hasattr(package, '__path__'):
            mods = list_modules_in_package(package)
    likely benign LLM, confidence 0.85 A help utility imports a named package to enumerate its modules.
    Reasoning

    The package name is an argument to a documentation helper that lists modules in a package. Importing a named package is expected behavior for this tool.

  38. info warn → info by review dynamic-execution numba/misc/special.py:31:5

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

        l = {}
        exec(defn, {func_name: fn}, l)
        return numba.njit(l['_gdb_func_injection'])
    likely benign LLM, confidence 0.85 Numba exec-s a gdb helper function definition to inject a debugging function.
    Reasoning

    The definition is an internal gdb helper function template, executed with a controlled globals dict. It is used to inject a debugging helper.

  39. info warn → info by review dynamic-execution numba/np/arrayobj.py:5161:5

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

        fn = textwrap.dedent(fn)
        exec(fn, globals())
        fn = globals()[f'_{kind}']
        return register_jitable(fn)
    likely benign LLM, confidence 0.85 Array object helpers are generated from source templates with exec and registered as jitable.
    Reasoning

    The fn text is a Numba-internal function template dedented and then exec-ed into module globals to generate a jitable helper. The kind parameter is internal.

  40. info warn → info by review frame-introspection numba/np/npyfuncs.py:44:17

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

            import inspect
            fname = inspect.currentframe().f_back.f_code.co_name
            msg = '{0} called with invalid types: {1}'.format(fname, sig)
            assert False, msg
    likely benign LLM, confidence 0.90 An assertion message uses the caller's function name from the call-stack frame.
    Reasoning

    currentframe is used only to read the caller's function name for an error message on invalid types. No data leaves the process and nothing is executed.

  41. info identifier-low-length numba/np/random/_constants.py:1:1

    2048 of 3175 non-conventional identifiers are single-character (65%) (token pass, confidence 0.50)

  42. info warn → info by review dynamic-execution numba/np/ufunc/array_exprs.py:382:16

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

        # 2. Compile the AST module and extract the Python function.
        code_obj = compile(ast_module, expr_filename, 'exec')
        exec(code_obj, namespace)
        impl = namespace[expr_name]
    likely benign LLM, confidence 0.85 Array expression rewriting compiles a generated AST module to extract a Python function.
    Reasoning

    The code parses and rewrites the user's own array expression into a Python AST, then compiles it. This is the purpose of Numba's array-expression feature, and no external payload is involved.

  43. info warn → info by review dynamic-execution numba/np/ufunc/array_exprs.py:383:5

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

        code_obj = compile(ast_module, expr_filename, 'exec')
        exec(code_obj, namespace)
        impl = namespace[expr_name]
    likely benign LLM, confidence 0.85 Array expression code object is executed to obtain the generated implementation function.
    Reasoning

    This exec runs the compiled code object produced from the same array-expression rewrite, with a namespace controlled by the compiler.

  44. info warn → info by review dynamic-attribute numba/np/ufunc/omppool.cpp:273:17

    `dlsym` called with a non-literal symbol name (ast pass, confidence 0.75)

        (void)dlerror();
        void *sym = dlsym(RTLD_DEFAULT, name);
        if(dlerror() != NULL)
            return NULL;
    likely benign LLM, confidence 0.72 A helper resolves a symbol name at runtime with dlsym, a common pattern for optional library functions.
    Reasoning

    dlsym is looking up an internal OpenMP or threading symbol name in the default namespace, and the result is checked for null. The name is set in code rather than from untrusted input, though the parameter form leaves some doubt.

  45. info warn → info by review dynamic-execution numba/parfors/parfor_lowering.py:1441:5

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

        locls = {}
        exec(gufunc_txt, globls, locls)
        gufunc_func = locls[gufunc_name]
    likely benign LLM, confidence 0.85 Parallel loop lowering generates gufunc source text and execs it to create the kernel.
    Reasoning

    gufunc_txt is generated by Numba's parfor lowering from the compiler's own IR, and the result is a compiled gufunc. This is standard code generation.

  46. info warn → info by review frame-introspection numba/pycc/cc.py:64:13

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

            # Resolve source module name and directory
            f = sys._getframe(1)
            if source_module is None:
                dct = f.f_globals
    likely benign LLM, confidence 0.85 The AOT compiler inspects the caller's frame to resolve the source module name.
    Reasoning

    The caller's frame globals are read to infer the source module name and directory for AOT compilation. It is read-only resolution for the build step.

  47. info warn → info by review dynamic-execution numba/pycc/decorators.py:44:13

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

            with open(ifile) as fin:
                exec(compile(fin.read(), ifile, 'exec'))
    likely benign LLM, confidence 0.85 exec of compiled contents of a user-named source file in numba's pycc decorator.
    Reasoning

    pycc's decorator reads a user-supplied source file and execs it to build an AOT module. Executing a file the caller explicitly names is the expected behaviour of this API, not hidden payload execution.

  48. info warn → info by review dynamic-execution numba/pycc/decorators.py:44:18

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

            with open(ifile) as fin:
                exec(compile(fin.read(), ifile, 'exec'))
    likely benign LLM, confidence 0.85 compile of file contents read from a user-specified path in pycc.
    Reasoning

    The compile call is the same mechanism as the exec finding above, applied to the file contents the caller chose to load.

  49. info warn → info by review dynamic-execution numba/stencils/stencil.py:407:9

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

            dct = {}
            exec(dummy_text, dct)
            dummy_func = dct["__numba_dummy_stencil"]
            sig = sig.replace(pysig=utils.pysignature(dummy_func))
    likely benign LLM, confidence 0.88 exec of internally generated dummy stencil source to derive a signature.
    Reasoning

    Numba generates a dummy stencil function from text it builds itself, then reads its signature. This is ordinary code generation inside a compiler library.

  50. info warn → info by review dynamic-execution numba/stencils/stencil.py:666:9

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

            dct.update(globals())
            exec(func_text, dct)
            stencil_func = dct[stencil_func_name]
            if sigret is not None:
    likely benign LLM, confidence 0.88 exec of generated stencil function text into a namespace dict.
    Reasoning

    func_text is generated from the stencil kernel's AST by the library itself, a standard metaprogramming step in numba's stencil implementation.

  51. info warn → info by review dynamic-execution numba/stencils/stencilparfor.py:770:13

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

                loc = {}
                exec(f_text, {}, loc)
                f = loc['f']
                args = [offset_var]
    likely benign LLM, confidence 0.88 exec of internally generated function text for stencil parfor lowering.
    Reasoning

    f_text is code synthesized internally for stencil loop generation; the namespace is isolated and the function is then called as a compiler step.

  52. info warn → info by review dynamic-execution numba/stencils/stencilparfor.py:947:12

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

        op = OPERATORS_TO_BUILTINS[index_def.fn]
        return eval("{}{}".format(op, const_val))
    
    def _get_const_binary_expr(stencil_ir, func_ir, index_def):
    likely benign LLM, confidence 0.88 eval of an operator string formed from a fixed table and a constant.
    Reasoning

    The eval string is built from a fixed OPERATORS_TO_BUILTINS table and a numeric constant, so there is no attacker-controlled input.

  53. info warn → info by review dynamic-execution numba/stencils/stencilparfor.py:957:12

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

        op = OPERATORS_TO_BUILTINS[index_def.fn]
        return eval("{}{}{}".format(arg1, op, arg2))
    likely benign LLM, confidence 0.88 eval of a binary expression string built from internal operator mapping.
    Reasoning

    Same pattern as the previous finding: a fixed operator table and internal argument names form the eval string.

  54. info identifier-low-length numba/tests/chained_assign_usecases.py:1:1

    80 of 144 non-conventional identifiers are single-character (56%) (token pass, confidence 0.50)

  55. info warn → info by review decoder-import-with-exec numba/tests/npyufunc/test_dufunc.py:131:13

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

                l = {}
                exec(textwrap.dedent(fn), {'duadd': duadd}, l)
                return l['impl']
    likely benign LLM, confidence 0.80 Test helper that execs dedented source text; the file also imports pickle for test purposes.
    Reasoning

    This is a test helper that execs a dedented test-source string into a namespace. The pickle import is for serialization tests in the same suite, so the multi-stage payload label is a pattern-match false positive.

  56. info warn → info by review dynamic-execution numba/tests/npyufunc/test_dufunc.py:131:13

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

                l = {}
                exec(textwrap.dedent(fn), {'duadd': duadd}, l)
                return l['impl']
    likely benign LLM, confidence 0.88 exec of a test function definition string in a test helper.
    Reasoning

    Duplicate exec signal on the same test helper. The fn text is a literal test definition, not external input.

  57. 52 of 125 non-conventional identifiers are single-character (42%) (token pass, confidence 0.50)

  58. info warn → info by review dynamic-execution numba/tests/serialize_usecases.py:93:5

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

        ns = {}
        exec(code.strip(), ns)
        return jit(**jit_args)(ns['dyn_func'])
    likely benign LLM, confidence 0.88 exec of test code string to build a dynamic function for serialization tests.
    Reasoning

    A test-use-case helper execs a code string it was given in the test suite to create a dynamic function for JIT serialization tests.

  59. info warn → info by review dynamic-execution numba/tests/support.py:858:10

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

        """
        co = compile(code.rstrip(), "<string>", "single")
        ns = {}
        eval(co, globs, ns)
    likely benign LLM, confidence 0.88 compile of a test code snippet in support.py.
    Reasoning

    Test support helper that compiles a literal-style code snippet in single mode to exercise interactive-style execution, which is standard test infrastructure.

  60. info warn → info by review dynamic-execution numba/tests/support.py:860:5

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

        ns = {}
        eval(co, globs, ns)
        return ns[name]
    likely benign LLM, confidence 0.88 eval of a compiled test snippet into a namespace dict.
    Reasoning

    Executes the compiled test snippet in a namespace and returns a named symbol. This is test scaffolding.

  61. info critical → info by review dynamic-import numba/tests/support.py:926:5

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

        importlib.invalidate_caches()
        __import__(modname)
        return sys.modules[modname]
    likely benign LLM, confidence 0.85 Dynamic __import__ of a module name inside a test support helper.
    Reasoning

    Imports a module by name, invalidates caches, and returns it from sys.modules. This is a standard test-helper pattern for loading generated modules; the critical severity reflects the dynamic-import signal alone.

  62. info warn → info by review dynamic-execution numba/tests/test_closure.py:158:9

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

            ns = {}
            exec(code.strip(), ns)
    
            cfunc = njit(ns['outer'])
    likely benign LLM, confidence 0.88 exec of test closure source into a namespace before njit wrapping.
    Reasoning

    Test code execs a closure-defining source string and wraps the result with njit to check closure behaviour. This is an intentional test of compiler features.

  63. info critical → info by review frame-introspection numba/tests/test_controlflow.py:63:13

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

        def _probing_topo_order(self):
            f = sys._getframe()
            d = 0
            while f is not None:
    likely benign LLM, confidence 0.80 sys._getframe walk in a control-flow test helper computing probe depth.
    Reasoning

    The method walks the call stack to compute a topological order for control-flow testing. Frame introspection is used for compiler internals and tests, and the sys.exit/exec co-occurrence is unrelated to anti-analysis here.

  64. info critical → info by review frame-introspection numba/tests/test_controlflow.py:113:17

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

            def frames():
                f = sys._getframe(0)
                while f is not None:
                    f = f.f_back
    likely benign LLM, confidence 0.80 Frame-walking helper in a control-flow test using sys._getframe.
    Reasoning

    Walks frames via f_back in a test helper. This is ordinary introspection for control-flow tests, not evasion of analysis.

  65. info warn → info by review dynamic-execution numba/tests/test_controlflow.py:122:9

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

            env = {}
            exec(
                compile(
                    fun,
    likely benign LLM, confidence 0.85 exec of compiled test function source in an isolated env.
    Reasoning

    Compiles and execs a test function source string in a fresh env dict, a standard test pattern for exercising numba's control-flow handling.

  66. info warn → info by review dynamic-execution numba/tests/test_controlflow.py:123:13

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

            exec(
                compile(
                    fun,
                    "<generated_large_cfg>",
    likely benign LLM, confidence 0.90 Test helper compiles and execs a generated function to exercise large CFGs.
    Reasoning

    The compile call builds code for a large generated control-flow graph inside a Numba test. The source is produced locally by the test generator, so this is test scaffolding rather than a dropper.

  67. info warn → info by review dynamic-execution numba/tests/test_debuginfo.py:722:9

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

            l = dict()
            exec(dedent(strsrc), {}, l)
            foo = njit(debug=True)(l['foo'])
    likely benign LLM, confidence 0.90 Test executes locally defined source to build a function for debug-info testing.
    Reasoning

    The exec runs a dedented source string defined in the test, with an empty namespace, to create a function for njit debug-info checks. This is a standard pattern for generating test functions.

  68. info warn → info by review dynamic-execution numba/tests/test_deprecations.py:218:19

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

                container = f.__name__.strip('foo_')
                inp = eval(container)([10, ])
                with warnings.catch_warnings(record=True) as w:
                    warnings.simplefilter("ignore", category=NumbaWarning)
    likely benign LLM, confidence 0.85 Test evals a name derived from its own function name to pick a callable.
    Reasoning

    eval is applied to a name derived by stripping a test function's name prefix, which selects a numba/numpy-style callable. Input is internal test naming, not external data.

  69. info warn → info by review dynamic-execution numba/tests/test_dyn_func.py:23:9

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

            d = {}
            exec(code.strip(), d)
            self.f.append(numba.jit("void(f8[:])", nopython=True)(d['f']))
    likely benign LLM, confidence 0.90 Test execs local code text to define a function for JIT compilation.
    Reasoning

    The exec runs a code string defined inside the test module, then jit-compiles a function from the resulting namespace. This is ordinary dynamic-function testing.

  70. info warn → info by review dynamic-execution numba/tests/test_exceptions.py:328:13

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

                loc = {}
                exec(f_text, {'exc': exc}, loc)
                pyfunc = loc['f']
                cfunc = jit((types.int32,), **flags)(pyfunc)
    likely benign LLM, confidence 0.90 Test execs generated function text to check JIT exception behaviour.
    Reasoning

    The exec builds a function from locally generated text with an exc namespace entry, then jit-compiles it to test exception handling. The source is test-controlled.

  71. info warn → info by review decoder-import-with-exec numba/tests/test_extending.py:2154:37

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

                                    try:
                                        exec(fake_impl, {}, l)
                                    except SyntaxError:
                                        # likely elipsis, e.g. rand(d0, d1, ..., dn)
    likely benign LLM, confidence 0.85 Test execs a generated implementation string; pickle import is for serialization tests.
    Reasoning

    The pickle import in the file is most likely for serialization tests, and the exec runs a locally generated implementation string with a fallback for SyntaxError. The multi-stage shape is a heuristic false positive here, not a payload chain.

  72. info warn → info by review dynamic-execution numba/tests/test_extending.py:2154:37

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

                                    try:
                                        exec(fake_impl, {}, l)
                                    except SyntaxError:
                                        # likely elipsis, e.g. rand(d0, d1, ..., dn)
    likely benign LLM, confidence 0.90 Test execs a locally generated implementation string.
    Reasoning

    This is the same exec call reported under the dynamic-execution signal. The code is generated locally with a SyntaxError fallback, consistent with test code.

  73. info critical → info by review frame-introspection numba/tests/test_firstlinefinder.py:18:17

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

        def _get_grandparent_caller_code(self):
            frame = inspect.currentframe()
            caller_frame = inspect.getouterframes(frame)
            return caller_frame[2].frame.f_code
    likely benign LLM, confidence 0.90 Test inspects the caller frame to check first-line lookup.
    Reasoning

    The code walks the call stack to find the caller's code object, which is what a first-line-finder test needs. The critical rating reflects a heuristic that matched sys.exit/exec in the same file, not evasion.

  74. info critical → info by review frame-introspection numba/tests/test_firstlinefinder.py:19:24

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

            frame = inspect.currentframe()
            caller_frame = inspect.getouterframes(frame)
            return caller_frame[2].frame.f_code
    likely benign LLM, confidence 0.90 Test uses getouterframes to read the caller's code object.
    Reasoning

    getouterframes is used to read the caller frame's code, which is the purpose of the test. Nothing here hides behaviour or detects analysis.

  75. info warn → info by review dynamic-execution numba/tests/test_firstlinefinder.py:77:9

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

            globalns = {}
            exec(source, globalns)
            foo = globalns['foo']
    likely benign LLM, confidence 0.90 Test execs local source text into a fresh namespace to get a function.
    Reasoning

    The exec runs a test-provided source string in a fresh globals dict to obtain a function for first-line tests. The source is local and controlled.

  76. info warn → info by review dynamic-execution numba/tests/test_firstlinefinder.py:95:16

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

            # in the linecache
            code = compile(source, filename, "exec")
    
            globalns = {}
    likely benign LLM, confidence 0.90 Test compiles local source text to check line-number mapping.
    Reasoning

    The compile call turns test-provided source and filename into a code object, which the test then executes to check line mapping. This is test scaffolding.

  77. info warn → info by review dynamic-execution numba/tests/test_firstlinefinder.py:98:9

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

            globalns = {}
            exec(code, globalns)
            function = globalns[function_name]
    likely benign LLM, confidence 0.90 Test execs compiled local code to retrieve a named function.
    Reasoning

    The exec runs the compiled code object in a fresh namespace and reads back a named function, consistent with the same test scaffolding.

  78. info warn → info by review dynamic-execution numba/tests/test_funcdesc.py:24:20

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

            objs = dict(__file__=filename, __name__=name)
            compiled = compile(code, filename, 'exec')
            exec(compiled, objs)
    likely benign LLM, confidence 0.90 Test compiles local code for function-descriptor checks.
    Reasoning

    The compile call takes test-supplied code, filename and name to build a module for function-descriptor tests. The inputs are test constants, not external data.

  79. info warn → info by review dynamic-execution numba/tests/test_funcdesc.py:25:9

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

            compiled = compile(code, filename, 'exec')
            exec(compiled, objs)
    
            compiled_f = njit(objs['f'])
    likely benign LLM, confidence 0.90 Test execs compiled local code and jit-compiles the result.
    Reasoning

    The exec runs the compiled test code in a dict and then jit-compiles the resulting function. The pattern is standard for testing function descriptors.

  80. info critical → info by review dynamic-execution numba/tests/test_gdb_bindings.py:150:17

    `subprocess.Popen` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)

        def run_cmd(self, cmdline, env, kill_is_ok=False):
            popen = subprocess.Popen(cmdline,
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE,
    likely benign LLM, confidence 0.85 Test helper that launches gdb command lines via subprocess.Popen.
    Reasoning

    This is a test helper that runs gdb command lines through a shell with piped stdout and stderr. The command comes from the test suite itself, not from untrusted input, so the shell=True pattern is ordinary test-harness code.

  81. info critical → info by review dynamic-import numba/tests/test_import.py:33:17

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

                if mod not in ('cffi',) and distutils_check:
                    __import__(mod)
    
            code = """if 1:
    likely benign LLM, confidence 0.90 Test loop that imports a list of module names to check import side effects.
    Reasoning

    The __import__ call runs over a fixed list of module names inside a test that checks which modules get imported. It is a standard dynamic import in a test and does not handle external data.

  82. info warn → info by review dynamic-execution numba/tests/test_import.py:43:23

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

            out, _ = run_in_subprocess(code)
            modlist = set(eval(out.strip()))
            unexpected = set(banlist) & set(modlist)
            self.assertFalse(unexpected, "some modules unexpectedly imported")
    likely benign LLM, confidence 0.85 Test evaluates the printed module-set output of a subprocess.
    Reasoning

    eval parses the set literal printed by a subprocess that the test itself launched. The input is the test's own output, not attacker-controlled data, so this is a common test idiom.

  83. info warn → info by review dynamic-execution numba/tests/test_import.py:97:27

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

                out, _ = run_in_subprocess(code)
                modlist = set(eval(out.strip()))
                unexpected = set(banlist) & set(modlist)
                self.assertFalse(unexpected, "some modules unexpectedly imported")
    likely benign LLM, confidence 0.85 Test evaluates the printed module-set output of a subprocess.
    Reasoning

    This is the same pattern as the earlier eval in this file: it parses the test's own subprocess output into a set to check for banned imports.

  84. info warn → info by review dynamic-execution numba/tests/test_interpreter.py:157:9

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

            local_vars = {}
            exec(func_text, {"sum_jit_func": sum_jit_func}, local_vars)
            return local_vars["impl"]
    likely benign LLM, confidence 0.90 Test helper that execs generated function source to produce a test function.
    Reasoning

    The exec call builds a test function from generated source text in a local namespace and returns the function it defines. This is how numba tests generate jitted functions and it is not part of a payload.

  85. info warn → info by review decoder-import-with-exec numba/tests/test_jitclasses.py:1644:13

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

                namespace = {}
                exec(template, namespace)
                return namespace["f"]
    likely benign LLM, confidence 0.80 Test code execs a template into a namespace and returns a generated function.
    Reasoning

    The file imports pickle, which the scanner flagged as a decoder import with exec. The exec runs a test-authored template string into a namespace and returns a function. Nothing in the snippet decodes data from an outside source, so this looks like test code generation.

  86. info warn → info by review dynamic-execution numba/tests/test_jitclasses.py:1644:13

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

                namespace = {}
                exec(template, namespace)
                return namespace["f"]
    likely benign LLM, confidence 0.85 Test code execs a template string into a namespace to build a function.
    Reasoning

    This is the same exec of a test-defined template string as the paired decoder finding. The template is authored by the test and the exec is used for code generation.

  87. info warn → info by review dynamic-execution numba/tests/test_listobject.py:1625:13

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

                context = {}
                exec(dedent("""
                    from numba.typed import listobject
                    from numba import int32
    likely benign LLM, confidence 0.90 Test execs an embedded source string that imports numba typed-list internals.
    Reasoning

    The exec runs a dedented string of test code that imports numba typed-list helpers. It is literal test source embedded in the test, a common pattern for checking compiled behavior.

  88. info unicode-mixed-script numba/tests/test_mangling.py:25:19

    identifier `foಠ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        def test_unicode_fname(self):
            fname = u'foಠ'
            argtypes = types.int32, types.float32
            name = default_mangler(fname, argtypes)
  89. info warn → info by review dynamic-execution numba/tests/test_mixed_tuple_unroller.py:2003:9

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

            l = {}
            exec(f, {}, l)
            foo = njit(pipeline_class=CapturingCompiler)(l['foo'])
            foo()
    likely benign LLM, confidence 0.90 Test execs a function source string to build a jitted test function.
    Reasoning

    The exec runs a test-defined function source string into a local dict, which is then jitted and called. This is standard test code generation for the tuple unroller.

  90. info warn → info by review dynamic-execution numba/tests/test_mixed_tuple_unroller.py:2012:9

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

            l = {}
            exec(f, {}, l)
            foo = njit(pipeline_class=CapturingCompiler)(l['foo'])
            with self.assertRaises(errors.TypingError) as raises:
    likely benign LLM, confidence 0.90 Test execs a function source string to check a typing error.
    Reasoning

    This exec builds a test function from a string defined in the test so that a typing error can be asserted. Nothing reaches it from outside the test.

  91. info warn → info by review dynamic-execution numba/tests/test_mixed_tuple_unroller.py:2021:9

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

            l = {}
            exec(f, {'literal_unroll': literal_unroll}, l)
            foo = njit(pipeline_class=CapturingCompiler)(l['foo'])
            foo()
    likely benign LLM, confidence 0.90 Test execs a function source string with literal_unroll in its namespace.
    Reasoning

    The exec adds literal_unroll to the namespace and runs test-authored source, then jits the result. This is standard test scaffolding.

  92. info warn → info by review dynamic-execution numba/tests/test_mixed_tuple_unroller.py:2039:9

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

            l = {}
            exec(dedent(f), {}, l)
            foo = njit(pipeline_class=CapturingCompiler)(l['bar'])
            foo()
    likely benign LLM, confidence 0.90 Test execs a dedented source string to define a jitted test function.
    Reasoning

    The exec runs a dedented test-authored source string and the test then jits one of the functions it defines. This is ordinary test code generation.

  93. info warn → info by review dynamic-execution numba/tests/test_mixed_tuple_unroller.py:2057:9

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

            l = {}
            exec(dedent(f), {}, l)
            foo = njit(pipeline_class=CapturingCompiler)(l['bar'])
            foo()
    likely benign LLM, confidence 0.90 Test execs a dedented source string to define a jitted test function.
    Reasoning

    This is the same test-authored exec pattern as the other tuple-unroller findings and the input is a fixed test string.

  94. info warn → info by review dynamic-execution numba/tests/test_np_functions.py:7292:9

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

            dct = {}
            exec(compile(funcstr, '<string>', 'exec'), globals(), dct)
            return dct['foo']
    likely benign LLM, confidence 0.88 Test execs a generated NumPy function source string.
    Reasoning

    The exec runs compiled source built from a test-provided funcstr to define a NumPy function under test. This is a test harness generating code for comparison against NumPy.

  95. info warn → info by review dynamic-execution numba/tests/test_np_functions.py:7292:14

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

            dct = {}
            exec(compile(funcstr, '<string>', 'exec'), globals(), dct)
            return dct['foo']
    likely benign LLM, confidence 0.88 Test compiles a generated NumPy function source string before exec.
    Reasoning

    compile here only feeds the exec on the line above. It turns the test-generated funcstr into code for the NumPy comparison test, so the compile call is part of that same benign harness.

  96. info warn → info by review dynamic-execution numba/tests/test_object_mode.py:194:9

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

            custom_globals = {'np': np}
            exec(func_text, custom_globals, loc_vars)
            func = loc_vars['func']
            jitted = jit(forceobj=True)(func)
    likely benign LLM, confidence 0.90 Test helper execs generated function source to build a jitted test function.
    Reasoning

    Test code in numba's test suite builds a function from generated text and execs it with a restricted globals dict to exercise object mode; no network, decoding of hidden payloads, or process spawning is visible.

  97. info warn → info by review dynamic-execution numba/tests/test_random.py:1924:13

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

                l = {}
                exec(template, {'np': np}, l)
                # The answer doesn't matter, these are tested in the tests above,
                # the purpose of this test is to ensure that the code compiles with
    likely benign LLM, confidence 0.90 Test compiles a numpy-based template via exec to check it compiles.
    Reasoning

    exec of a test template with a limited namespace in a compile-check test; the template is a local test string, consistent with numba's testing practice.

  98. info warn → info by review dynamic-execution numba/tests/test_random.py:1947:13

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

                l = {}
                exec(template, {'np': np}, l)
    
                # Store result obtained by calling the np and nb functions.
    likely benign LLM, confidence 0.90 Test execs a local code template to produce reference results.
    Reasoning

    Same exec-of-template pattern in a numba random test; the purpose is to verify compilation of generated code, with no malicious indicators.

  99. info warn → info by review dynamic-attribute numba/tests/test_record_dtype.py:776:26

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

    
                    pyfunc = globals()[prefix + attr]
                    cfunc = self.get_cfunc(pyfunc, argtypes)
    likely benign LLM, confidence 0.90 Test selects a pyfunc from globals() by prefix plus attribute name.
    Reasoning

    Looks up a test function in module globals by a constructed name; a common test-dispatch idiom with no external input or execution risk.

  100. info warn → info by review dynamic-attribute numba/tests/test_record_dtype.py:817:22

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

                nbrecord = numpy_support.from_dtype(recordtype)
                pyfunc = globals()['get_two_records_' + attr]
                cfunc = self.get_cfunc(pyfunc, (nbrecord, nbrecord))
    likely benign LLM, confidence 0.90 Test fetches a record-getter test function from globals by constructed name.
    Reasoning

    Same globals-by-name test dispatch pattern over locally defined test functions; benign.

  101. info warn → info by review dynamic-execution numba/tests/test_repr.py:33:15

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

            ty = typeof(val)
            ty2 = eval(repr(ty), self.tys_ns)
            self.assertEqual(ty, ty2)
    likely benign LLM, confidence 0.90 Test evals the repr of a numba type to verify round-tripping.
    Reasoning

    eval of repr(ty) inside a test checking that type reprs round-trip in a controlled namespace; a standard round-trip test.

  102. info warn → info by review dynamic-execution numba/tests/test_svml.py:163:5

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

        ldict = {}
        exec(body, globals(), ldict)
        ldict[name].__doc__ = body
        return ldict[name], contains, avoids
    likely benign LLM, confidence 0.90 SVML test helper execs generated function body to create a test function.
    Reasoning

    Builds a test function from a generated body string via exec into a local dict to attach a docstring and check vectorization; consistent with numba test generation.

  103. info warn → info by review frame-introspection numba/tests/test_sys_monitoring.py:592:32

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

                meth_call = raise_callback.call_args_list[2]
                test_method_code = sys._getframe().f_code
                self.assertEqual(meth_call.args[0], test_method_code)
                self.assertIsInstance(meth_call.args[2], StopIteration)
    likely benign LLM, confidence 0.90 Test reads its own frame code object to validate monitoring callback arguments.
    Reasoning

    sys._getframe().f_code used to compare the current test method's code object against callback arguments; standard for testing sys.monitoring.

  104. info warn → info by review frame-introspection numba/tests/test_sys_monitoring.py:687:28

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

            meth_call = callback.call_args_list[2]
            test_method_code = sys._getframe().f_code
            self.assertEqual(meth_call.args[0], test_method_code)
            self.assertIs(meth_call.args[2], callback.side_effect)
    likely benign LLM, confidence 0.90 Test uses sys._getframe to get its own code object for assertion.
    Reasoning

    Same self-frame introspection in a sys.monitoring test; no malicious use.

  105. info warn → info by review dynamic-execution numba/tests/test_tuples.py:736:9

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

            src = "def f(x):\n    return g(%s)\n" % ", ".join(["x"] * n_args)
            exec(src, glbls)
    
            func_ir = compiler.run_frontend(glbls["f"])
    likely benign LLM, confidence 0.90 Test generates and execs a function of varying arity to exercise tuple handling.
    Reasoning

    Generates a function with n arguments via a format string and execs it into a globals dict for a tuple-argument test; a benign code generation pattern in tests.

  106. info warn → info by review dynamic-execution numba/tests/test_tuples.py:776:9

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

            )
            exec(src, glbls)
            pyfunc = glbls["f"]
            cfunc = jit(pyfunc)
    likely benign LLM, confidence 0.90 Test execs generated source to build a function for jit compilation.
    Reasoning

    Exec of a locally generated source string to produce a test function; no external input or malicious behavior.

  107. info warn → info by review dynamic-execution numba/tests/test_typedlist.py:679:13

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

                context = {}
                exec(dedent("""
                    from numba.typed import List
                    def bar():
    likely benign LLM, confidence 0.90 Test execs a local code snippet defining a typed-list function.
    Reasoning

    exec of a dedented local test snippet defining a function that uses numba typed List, to test reflection behavior; standard test scaffolding.

  108. info warn → info by review dynamic-execution numba/tests/test_typedlist.py:1428:13

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

                context = {}
                exec(dedent("""
                    from numba.typed import List
                    def bar():
    likely benign LLM, confidence 0.90 Test execs a local snippet to define a typed-list test function.
    Reasoning

    Same exec of a fixed local test snippet in the typed list tests; benign.

  109. info warn → info by review dynamic-execution numba/tests/test_typedlist.py:1486:13

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

                    """).format(line)
                exec(code, context)
                return njit(context["bar"])
            for line in ("l = List([0, 1, 2])",
    likely benign LLM, confidence 0.90 Test execs formatted local code to build a jitted typed-list function.
    Reasoning

    Exec of a test code string formatted with a local line of list construction, then njit of the result; benign test scaffolding.

  110. info warn → info by review dynamic-execution numba/tests/test_typedlist.py:1525:13

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

                    """).format(line)
                exec(code, context)
                return njit(context["bar"])
    likely benign LLM, confidence 0.90 Test execs formatted local code to build a jitted typed-list function.
    Reasoning

    Same formatted-exec test pattern for typed lists; no external input or malicious payload.

  111. info warn → info by review dynamic-execution numba/tests/test_ufuncs.py:42:5

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

        func_str = 'def fn({0}):\n    np.{1}({0})'.format(arg_str, ufunc.__name__)
        exec(func_str, globals(), ldict)
        fn = ldict['fn']
        fn.__name__ = '{0}_usecase'.format(ufunc.__name__)
    likely benign LLM, confidence 0.93 Test-suite helper that execs a generated wrapper function for a numpy ufunc.
    Reasoning

    This is a test helper that generates a small function definition from ufunc names and argument strings in order to exercise numba's ufunc compilation. The exec input is built only from internal test parameters, not untrusted data, and the file is a test module of a well-known numerical library.

  112. info warn → info by review dynamic-execution numba/tests/test_ufuncs.py:50:5

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

        ldict = {}
        exec("def fn(x):\n    return {0}(x)".format(ufunc_op), globals(), ldict)
        fn = ldict["fn"]
        fn.__name__ = "usecase_{0}".format(hash(ufunc_op))
    likely benign LLM, confidence 0.93 Test code that execs a generated binary-operator function for numba testing.
    Reasoning

    The exec string is formatted from a ufunc operator taken from a fixed list in the test suite. It defines a trivial function for compiler testing, with no network, process, or encoded payload involved.

  113. info warn → info by review dynamic-execution numba/tests/test_ufuncs.py:58:5

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

        ldict = {}
        exec("def fn(x,y):\n    return x{0}y".format(ufunc_op), globals(), ldict)
        fn = ldict["fn"]
        fn.__name__ = "usecase_{0}".format(hash(ufunc_op))
    likely benign LLM, confidence 0.93 Test code that execs a generated two-argument operator function.
    Reasoning

    Same pattern as the other ufunc tests: an operator string from internal test parameters is inserted into a simple function definition and exec'd. This is standard codegen testing with no attacker-controlled input.

  114. info warn → info by review dynamic-execution numba/tests/test_ufuncs.py:71:9

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

            ldict = {}
            exec("def fn(x,y):\n    x{0}y".format(ufunc_op), globals(), ldict)
            fn = ldict["fn"]
            fn.__name__ = "usecase_{0}".format(hash(ufunc_op))
    likely benign LLM, confidence 0.93 Test code that execs a generated function body for a ufunc operator.
    Reasoning

    A nested variant of the same generated-function test helper. The formatted operator comes from test parameters, and the exec only defines a function for compilation checks.

  115. info unicode-mixed-script numba/tests/test_unicode.py:1990:20

    identifier `ῼitlecases` mixes scripts: Greek + Latin (in string/comment) (raw pass, confidence 0.40)

                'ῼ',
                'Greek ῼitlecases ...'
            ]
            ISTITLE_EXAMPLES = UNICODE_EXAMPLES + unicode_title + special
  116. info unicode-mixed-script numba/tests/test_unicode.py:2175:37

    identifier `finnish` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

                       '\U0001044F\U00010427', 'X\U00010427x\U0001044F', 'h\u0130',
                       '\u1fd2\u0130', 'finnish', 'A\u0345\u03a3']
            # https://github.com/python/cpython/blob/1d4b6ba19466aba0eb91c4ba01ba509acf18c723/Lib/test/test_unicode.py#L926    # noqa: E501
  117. info unicode-mixed-script numba/tests/test_unicode.py:2268:21

    identifier `fiNNISH` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

                       'X\U00010427x\U0001044F X\U00010427x\U0001044F',
                       'fiNNISH', 'A\u03a3 \u1fa1xy', 'A\u03a3A']
    
            msg = 'Results of "{}".title() must be equal'
  118. info warn → info by review dynamic-execution numba/tests/test_unicode_names.py:22:9

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

            glb = {}
            exec(src, glb)
            fn = glb[fname]
            return fn
    likely benign LLM, confidence 0.92 Test helper that execs unicode-named source to verify numba name handling.
    Reasoning

    This helper executes source code containing unicode identifiers to test that numba handles non-ASCII names correctly. The source is test-provided, and the function returns the defined function for inspection, which is ordinary test scaffolding.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. 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.3.0
curl -fsSL -o numba-0.68.1rc2.tar.gz https://files.pythonhosted.org/packages/4a/d9/50d92b8e10f21dcd8dcfbf155135cc679130df6d6fb318b7c82e21199480/numba-0.68.1rc2.tar.gz
printf '%s  %s\n' 6f6b3c8d7dc0e718ec2c5bbe825d65cac9d4a3f41b6a2a1017f84d098d06f2b3 numba-0.68.1rc2.tar.gz | shasum -a 256 -c -
mkdir pkg && tar -xzf numba-0.68.1rc2.tar.gz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg