PyPI / xxhash / 4.0.2

xxhash 4.0.2

Source
https://github.com/ifduyue/python-xxhash
Tag scanned
v4.0.2
Compared with
v4.0.1 (0 signals introduced since)
Files
21 scanned, 4 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 11 info
Scan time
4.0 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 2 of 2 warn and critical signals; 2 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-22 06:48

Signals

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

  1. info identifier-low-length bench.sh:1:1

    40 of 70 non-conventional identifiers are single-character (57%) (token pass, confidence 0.50)

  2. info dynamic-execution bench.sh:8:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh32_intdigest     1000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh32_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  3. info dynamic-execution bench.sh:16:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh32_intdigest    10000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh32_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  4. info dynamic-execution bench.sh:25:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh64_intdigest     1000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh64_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  5. info dynamic-execution bench.sh:33:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh64_intdigest    10000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh64_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  6. info dynamic-execution bench.sh:42:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh3_64_intdigest   1000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh3_64_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  7. info dynamic-execution bench.sh:50:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh3_64_intdigest  10000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh3_64_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  8. info dynamic-execution bench.sh:59:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh3_128_intdigest  1000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh3_128_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  9. info dynamic-execution bench.sh:67:1

    command name is a variable (`$PYTHON`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo -n "    xxh3_128_intdigest 10000B: "
    $PYTHON -mtimeit -s 'from xxhash import xxh3_128_intdigest' \
                     -s 'import os'  \
                     -s 'import random' \
  10. info critical → info by review dynamic-execution setup.py:28:1

    `exec` at module scope (runs on import) on a non-literal expression (ast pass, confidence 0.80)

    version_dict = {}
    exec(d.joinpath("xxhash", "version.py").read_text(), {}, version_dict)
    version = version_dict["VERSION"]
    likely benign LLM, confidence 0.80 setup.py execs the package's own version.py to read a VERSION variable during setup.
    Reasoning

    The exec reads xxhash/version.py from the package's own source directory into an isolated namespace and then reads VERSION from it. This is a common, if unusual, way to pull a version string out of a package at build time. Nothing in the snippet fetches remote data or decodes a hidden payload, so it looks like a legitimate version lookup. The residual doubt is that exec of file contents at import time is a sensitive pattern, and the file itself is not shown.

  11. info critical → info by review dynamic-import tests/test_interpreters.py:19:19

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

            try:
                mod = __import__(name)
                if hasattr(mod, 'create'):
                    return mod
    likely benign LLM, confidence 0.90 A test helper calls __import__ on candidate interpreter module names and returns one that exposes create().
    Reasoning

    The __import__ call sits in a test helper that loops over candidate module names and checks for a 'create' attribute, which is a typical way to probe for an optional interpreter backend. The file is a test module and the code does nothing hidden or harmful in the snippet.

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/ifduyue/python-xxhash python-xxhash && cd python-xxhash
git checkout v4.0.2
disclude scan --severity info --diff v4.0.1 .