PyPI / anyio / 4.15.1

anyio 4.15.1

Source
https://github.com/agronholm/anyio
Artifact scanned
anyio-4.15.1-py3-none-any.whl (wheel · 129.0 KB · SHA-256 6152fdbbf9a7…)
Compared with
anyio-4.15.0-py3-none-any.whl (0 signals introduced since)
Files
48 scanned, 5 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 5 info
Scan time
5.2 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 5 of 5 warn and critical signals; 5 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 00:03

Signals

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

  1. info critical → info by review frame-introspection anyio/_lazyimport.py:19:22

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

    def install_lazy_importer() -> bool:
        module_globals = sys._getframe(1).f_globals
        module_name = module_globals["__name__"]
        module_prefix = module_name + "."
    likely benign LLM, confidence 0.90 Frame introspection to access caller module globals for a lazy importer.
    Reasoning

    sys._getframe(1).f_globals is the standard technique for lazy-importer modules that rewrite the calling module's globals (module __getattr__ emulation). Used here for lazy import of the caller's package. Flagged only because the file also contains exec/eval-like calls; the frame access itself is legitimate framework code.

  2. info critical → info by review frame-introspection anyio/_lazyimport.py:71:22

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

    def fix_package_names() -> None:
        module_globals = sys._getframe(1).f_globals
        module_prefix = module_globals["__name__"] + "."
        del module_globals[fix_package_names.__name__]
    likely benign LLM, confidence 0.90 Frame introspection to modify the caller module's globals after lazy setup.
    Reasoning

    Same pattern: fix_package_names reads the caller's globals to adjust __name__-based prefixes and deletes its own helper from the namespace. This is ordinary module-level metaprogramming in anyio's lazy import utility, not malicious.

  3. info critical → info by review frame-introspection anyio/_lazyimport.py:92:22

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

    def set_deprecated_aliases(aliases: dict[str, str]) -> None:
        module_globals = sys._getframe(1).f_globals
        module_name = module_globals["__name__"]
        del module_globals[set_deprecated_aliases.__name__]
    likely benign LLM, confidence 0.90 Frame introspection to install deprecated aliases in the caller's module namespace.
    Reasoning

    set_deprecated_aliases uses the caller's globals to register deprecated name aliases and removes its helper. Consistent with the anyio lazy-import design; no network, process, or decoding behavior.

  4. info warn → info by review dynamic-execution anyio/_lazyimport.py:120:12

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

    
        tree = compile(source, module.__file__ or "", "exec", ast.PyCF_ONLY_AST)
        assert isinstance(tree, ast.Module)
        out: dict[str, tuple[str, str]] = {}
    likely benign LLM, confidence 0.85 Parses a module's source file into an AST to inspect its contents.
    Reasoning

    compile(source, ..., PyCF_ONLY_AST) parses source text of a module into an AST to scan its names for re-export handling. Parsing only (no exec of the result) on a module's own source file is a common static-analysis pattern and is benign here.

  5. info warn → info by review decoder-import-with-exec anyio/to_interpreter.py:71:17

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

    
        _run_func = compile(
            """
    import _interpqueues
    likely benign LLM, confidence 0.75 Builds a code string executed in a subinterpreter to run a function there.
    Reasoning

    compile() builds a code string that imports _interpqueues and is executed in a subinterpreter. This is the expected mechanism for running a function in a Python subinterpreter; the embedded code is generated from the library's own logic. The pickle and exec co-occurrence matches the library's documented cross-interpreter data transfer, though it is a dynamic-execution pattern worth a glance.

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 anyio-4.15.1-py3-none-any.whl https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl
printf '%s  %s\n' 6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 anyio-4.15.1-py3-none-any.whl | shasum -a 256 -c -
unzip -q anyio-4.15.1-py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg