PyPI / virtualenv / 21.14.10

virtualenv 21.14.10

Source
https://github.com/pypa/virtualenv
Tag scanned
21.14.10
Compared with
21.14.9 (0 signals introduced since)
Files
208 scanned, 33 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 14 info
Scan time
10.7 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 10 of 10 warn and critical signals; 10 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-18 09:40

Signals

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

  1. info critical → info by review dynamic-import docs/render_cli.py:40:34

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

            module_name, attr_name = self.options["module"], self.options["func"]
            parser_creator = getattr(__import__(module_name, fromlist=[attr_name]), attr_name)
            core_result = parse_parser(parser_creator())
    likely benign LLM, confidence 0.80 Docs extension dynamically imports a parser module named in its directive options.
    Reasoning

    This is a Sphinx-style docs extension that imports the module and function named in the directive options. Those options come from the documentation author's own source, not from untrusted input, and the import is a standard plugin-loading pattern for documentation tooling.

  2. info critical → info by review dynamic-import docs/render_cli.py:236:20

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

        of_class = of_type.split(".")
        data = getattr(__import__(".".join(of_class[:-1]), fromlist=[of_class[-1]]), of_class[-1])
        return [n.literal("", text=",".join(data))], []
    likely benign LLM, confidence 0.80 Docs extension resolves a dotted class path from a directive option via __import__.
    Reasoning

    The same docs-tooling pattern: the dotted class path comes from the directive's `of_type` option, which the documentation author controls. The dynamic import is expected for resolving named classes in docs generation, and nothing shows attacker-controlled input reaching it.

  3. info warn → info by review dynamic-execution docs/tutorial/getting-started.rst:102:21

    [embedded bash] command name is a variable (`$which`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

            (myproject) $ which python
            /home/user/myproject/bin/python
    likely benign LLM, confidence 0.90 Tutorial shell example uses `which python` with a variable-named command in prose.
    Reasoning

    This is a reStructuredText tutorial showing an interactive shell session. `$which` is a placeholder in documentation prose, not executed code, and the snippet is ordinary `which python` output.

  4. info critical → info by review path-command-shadow docs/tutorial/getting-started.rst:109:23

    [embedded bash] redirect writes to `python` — filename matches a system command (PATH hijack setup) (ast pass, confidence 0.88)

            (myproject) PS> where.exe python
            C:\Users\user\myproject\Scripts\python.exe
    likely benign LLM, confidence 0.85 Windows tutorial output of `where.exe python` misread as a PATH-hijack redirect.
    Reasoning

    The flagged item is the output of `where.exe python` in a Windows tutorial, showing the expected venv path. The 'redirect' and 'PATH hijack' reading is a false positive from the scanner matching the word `python` in sample output. No real redirect or shadowing setup is present.

  5. info warn → info by review obfuscated-command-name docs/tutorial/getting-started.rst:110:9

    [embedded bash] command name contains 5 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

            (myproject) PS> where.exe python
            C:\Users\user\myproject\Scripts\python.exe
    likely benign LLM, confidence 0.90 Windows path separators in tutorial output flagged as obfuscated command name.
    Reasoning

    The 'backslash escape' finding is triggered by an ordinary Windows path (C:\Users\...\Scripts\python.exe) in documentation output. Backslashes are path separators here, not obfuscation of a command name.

  6. info warn → info by review obfuscated-command-name docs/tutorial/getting-started.rst:117:9

    [embedded bash] command name contains 5 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

            (myproject) C:\> where.exe python
            C:\Users\user\myproject\Scripts\python.exe
    likely benign LLM, confidence 0.90 Windows path separators in tutorial output flagged as obfuscated command name.
    Reasoning

    Same false positive as the preceding finding: a Windows path in documented `where.exe` output, with backslashes used as path separators in a tutorial.

  7. info warn → info by review dynamic-execution docs/tutorial/getting-started.rst:127:17

    [embedded bash] command name is a variable (`$pip`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

        (myproject) $ pip install requests
        Collecting requests
          Using cached requests-2.32.3-py3-none-any.whl (64 kB)
    likely benign LLM, confidence 0.90 Tutorial pip install example flagged for a variable command name.
    Reasoning

    `$pip` is a documentation prompt example for installing the requests package, shown in a tutorial. It is not an attacker-controlled execution path, and the snippet shows normal pip output.

  8. info warn → info by review dynamic-execution docs/tutorial/getting-started.rst:137:17

    [embedded bash] command name is a variable (`$python`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

        (myproject) $ python -c "import requests; print(requests.__file__)"
        /home/user/myproject/lib/python3.13/site-packages/requests/__init__.py
    likely benign LLM, confidence 0.90 Tutorial Python example flagged for a variable command name.
    Reasoning

    `$python` is a prompt placeholder in a tutorial showing `python -c` printing a package path. This is ordinary documentation of a standard workflow.

  9. info warn → info by review obfuscated-command-name docs/tutorial/getting-started.rst:176:9

    [embedded bash] command name contains 3 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

            PS> .\myproject\Scripts\python.exe -c "import sys; print(sys.prefix)"
            C:\Users\user\myproject
    
            PS> .\myproject\Scripts\pip.exe install httpx
    likely benign LLM, confidence 0.90 Relative Windows venv executable paths flagged as obfuscated command names.
    Reasoning

    Relative Windows paths to venv executables in a tutorial are flagged because of backslashes. This is normal path syntax in documentation, not hidden command names.

  10. info warn → info by review obfuscated-command-name docs/tutorial/getting-started.rst:185:9

    [embedded bash] command name contains 3 backslash-escape sequences — hiding the true command (ast pass, confidence 0.85)

            C:\> .\myproject\Scripts\python.exe -c "import sys; print(sys.prefix)"
            C:\Users\user\myproject
    
            C:\> .\myproject\Scripts\pip.exe install httpx
    likely benign LLM, confidence 0.90 Relative Windows venv executable paths flagged as obfuscated command names.
    Reasoning

    Same as the preceding finding: a Windows venv path with backslash separators in a standard tutorial command, not obfuscation.

  11. info unicode-homoglyph tests/conftest.py:310:47

    identifier `èрт` contains homoglyph candidates: р (0440)→p (in string/comment) (raw pass, confidence 0.35)

        # in PowerShell paths
        base = "'\";&&e-$ !%`|>__VIRTUAL_NAME__[1]èрт🚒♞中片-j"
        if IS_WIN:
            # NTFS path components cannot contain any of these, regardless of where they sit in the string
  12. info unicode-mixed-script tests/conftest.py:310:47

    identifier `èрт` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

        # in PowerShell paths
        base = "'\";&&e-$ !%`|>__VIRTUAL_NAME__[1]èрт🚒♞中片-j"
        if IS_WIN:
            # NTFS path components cannot contain any of these, regardless of where they sit in the string
  13. identifier `èрт` contains homoglyph candidates: р (0440)→p (in string/comment) (raw pass, confidence 0.35)

        """Exclude ampersands, which batch activation does not support in paths."""
        base = "'\";e-$ èрт🚒♞中片-j"
        if IS_WIN:
            base = base.replace('"', "").replace(";", "")
  14. info unicode-mixed-script tests/unit/activation/test_batch.py:27:21

    identifier `èрт` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

        """Exclude ampersands, which batch activation does not support in paths."""
        base = "'\";e-$ èрт🚒♞中片-j"
        if IS_WIN:
            base = base.replace('"', "").replace(";", "")

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/pypa/virtualenv virtualenv && cd virtualenv
git checkout 21.14.10
disclude scan --severity info --diff 21.14.9 .