PyPI / defusedxml / 0.7.1

defusedxml 0.7.1

Source
https://github.com/tiran/defusedxml
Artifact scanned
defusedxml-0.7.1-py2.py3-none-any.whl (wheel · 25.0 KB · SHA-256 a352e7e42877…)
Compared with
defusedxml-0.7.0-py2.py3-none-any.whl (0 signals introduced since)
Files
12 scanned, 4 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 1 info
Scan time
3.1 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 1 of 1 warn and critical signal; 1 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 06:31

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.88 A compatibility helper in defusedxml imports the stdlib XML module named by its own `__origin__` attribute and inspects its names.
    Reasoning

    The snippet is from defusedxml's compatibility code. It takes the stdlib module name from the `__origin__` attribute of the defused module, imports it, and reads its attribute names so the defused replacements can be checked against the originals. The import target is a module name taken from the package's own metadata, not from untrusted input or a decoded payload, and nothing here decodes, spawns processes, or reaches the network. The non-literal `__import__` is a known pattern in this kind of shim, so the finding is a false positive from the dynamic-import signal.

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 defusedxml-0.7.1-py2.py3-none-any.whl https://files.pythonhosted.org/packages/07/6c/aa3f2f849e01cb6a001cd8554a88d4c77c5c1a31c95bdf1cf9301e6d9ef4/defusedxml-0.7.1-py2.py3-none-any.whl
printf '%s  %s\n' a352e7e428770286cc899e2542b6cdaedb2b4953ff269a210103ec58f6198a61 defusedxml-0.7.1-py2.py3-none-any.whl | shasum -a 256 -c -
unzip -q defusedxml-0.7.1-py2.py3-none-any.whl -d pkg
disclude scan --untrusted --severity info pkg