PyPI / defusedxml / 0.7.1

defusedxml 0.7.1

Source
https://github.com/tiran/defusedxml
Tag scanned
v0.7.1
Compared with
v0.7.0 (0 signals introduced since)
Files
22 scanned, 23 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 1 info
Scan time
3.2 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 1 of 1 warn and critical signal; 1 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-14 18:37

Signals

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

  1. info critical → info by review dynamic-import defusedxml/common.py:78:5

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

        stdlib_name = defused_mod.__origin__
        __import__(stdlib_name, {}, {}, ["*"])
        stdlib_mod = sys.modules[stdlib_name]
        stdlib_names = set(dir(stdlib_mod))
    likely benign LLM, confidence 0.85 A dynamic __import__ of the stdlib module whose name is stored in the defused module's __origin__ attribute, used to mirror its names.
    Reasoning

    The __import__ target comes from defused_mod.__origin__, which is the stdlib module name that defusedxml wraps. The code imports that stdlib module and copies its public names into the defused module, a common compatibility shim. The dynamic import is driven by the package's own module metadata, not by external or attacker-controlled input, and nothing in the snippet decodes, downloads, or executes a payload. The critical severity comes from the generic dynamic-import signal, not from anything suspicious in this code.

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.0.0
git clone https://github.com/tiran/defusedxml defusedxml && cd defusedxml
git checkout v0.7.1
disclude scan --severity info --diff v0.7.0 .