PyPI / typing-inspection / 0.4.4

typing-inspection 0.4.4

Source
https://github.com/pydantic/typing-inspection
Tag scanned
v0.4.4
Compared with
v0.4.3 (0 signals introduced since)
Files
19 scanned, 6 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 3 info
Scan time
3.4 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 3 of 3 warn and critical signals; 3 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-21 21:22

Signals

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

  1. info warn → info by review dynamic-execution build-docs.sh:9:1

    pipeline feeds into `sh` — piped data is executed as shell code (ast pass, confidence 0.80)

    
    curl -LsSf https://astral.sh/uv/install.sh | sh
    uv python install 3.13
    uv sync --python 3.13 --frozen --group docs
    likely benign LLM, confidence 0.85 Docs build script installs uv via curl piped to sh from astral.sh.
    Reasoning

    Piping the official Astral uv installer script from its HTTPS domain into sh is a widely documented install method. It is a supply-chain trust decision, but it is standard practice for this tool and the script is a docs build helper, not an obfuscated dropper.

  2. info warn → info by review dynamic-execution src/typing_inspection/typing_objects.py:112:5

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

        locals_: dict[str, Any] = {}
        exec(func_code, globals_, locals_)
        return locals_[function_name]
    likely benign LLM, confidence 0.75 Library uses exec to build a function from generated source code in a typing utility.
    Reasoning

    exec is used on generated function code inside a typing-introspection library, a known technique for creating functions with specific signatures. The snippet shows no attacker-controlled input, though the source of func_code is not visible.

  3. info warn → info by review dynamic-execution src/typing_inspection/typing_objects.py:153:5

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

        locals_: dict[str, Any] = {}
        exec(func_code, globals_, locals_)
        return locals_[function_name]
    likely benign LLM, confidence 0.75 Second exec call in the same typing library, building a function from generated source.
    Reasoning

    Same pattern as the other finding in this file: exec on generated code to create a typing-related helper, consistent with legitimate signature-generation code in a typing library.

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/pydantic/typing-inspection typing-inspection && cd typing-inspection
git checkout v0.4.4
disclude scan --severity info --diff v0.4.3 .