PyPI / hypothesis / 6.169.4

hypothesis 6.169.4

Source
https://github.com/HypothesisWorks/hypothesis
Tag scanned
v6.169.4
Directory
hypothesis (only this part of the repository was scanned)
Compared with
v6.169.3 (0 signals introduced since)
Files
536 scanned, 16 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 107 info
Scan time
31.5 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 47 of 47 warn and critical signals; 47 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-15 13:42

Signals

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

  1. info critical → info by review dynamic-execution hypothesis/docs/conf.py:185:1

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

    _version_file = root.joinpath("src", "hypothesis", "version.py")
    exec(_version_file.read_text(encoding="utf-8"), _d)
    version = _d["__version__"]
    release = _d["__version__"]
    likely benign LLM, confidence 0.85 Docs config execs the project's own version.py to read __version__.
    Reasoning

    exec of a version.py file read from the project's own source tree in docs config; this is a common Sphinx pattern to extract __version__ without importing the package. Non-literal but benign, local, and not fetched from the network.

  2. line length 1436 characters (raw pass, confidence 0.50)

    The following notable open-source projects use Hypothesis to test their code: `pytorch <https://github.com/pytorch/pytorch>`_, `jax <https://github.com/jax-ml/jax>`_, `PyPy <https://github.com/pypy/pypy>`_, `numpy <https://github.com/numpy/numpy>`_, `pandas <https://github.com/pandas-dev/pandas>`_, `attrs <https://gith
  3. info dynamic-execution hypothesis/scripts/basic-test.sh:26:1

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

    # Run all the no-extra-dependency tests for this version (except slow nocover tests)
    $PYTEST tests/cover tests/pytest
    
    # Run tests for each extra module while the requirements are installed
  4. info dynamic-execution hypothesis/scripts/basic-test.sh:30:1

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

    pip install ".[pytz, dateutil, zoneinfo]"
    $PYTEST tests/datetime/
    pip uninstall -y pytz python-dateutil
  5. info dynamic-execution hypothesis/scripts/basic-test.sh:34:1

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

    pip install ".[dpcontracts]"
    $PYTEST tests/dpcontracts/
    pip uninstall -y dpcontracts
  6. info dynamic-execution hypothesis/scripts/basic-test.sh:40:1

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

    pip install "$(grep 'fakeredis==' ../requirements/coverage.txt)"
    $PYTEST tests/redis/
    pip uninstall -y redis fakeredis
  7. info dynamic-execution hypothesis/scripts/basic-test.sh:44:1

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

    pip install "$(grep 'typing-extensions==' ../requirements/coverage.txt)"
    $PYTEST tests/typing_extensions/
    pip uninstall -y typing_extensions
  8. info dynamic-execution hypothesis/scripts/basic-test.sh:49:1

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

    pip install "$(grep -m 1 -oE 'lark>=([0-9.]+)' ../hypothesis/pyproject.toml | tr '>' =)"
    $PYTEST -Wignore tests/lark/
    pip install "$(grep 'lark==' ../requirements/coverage.txt)"
    $PYTEST tests/lark/
  9. info dynamic-execution hypothesis/scripts/basic-test.sh:51:1

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

    pip install "$(grep 'lark==' ../requirements/coverage.txt)"
    $PYTEST tests/lark/
    pip uninstall -y lark
  10. info dynamic-execution hypothesis/scripts/basic-test.sh:56:3

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

      pip install ".[codemods,cli]"
      $PYTEST tests/codemods/
      pip uninstall -y libcst click
  11. info dynamic-execution hypothesis/scripts/basic-test.sh:62:3

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

      pip install "$(grep -E 'black(==| @)' ../requirements/coverage.txt)"
      $PYTEST tests/ghostwriter/
      pip uninstall -y black numpy
    fi
  12. info dynamic-execution hypothesis/scripts/basic-test.sh:70:1

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

    
    $PYTEST tests/nocover/
    
    # Run some tests without docstrings or assertions, to catch bugs
  13. info dynamic-execution hypothesis/scripts/basic-test.sh:74:1

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

    # like issue #822 in one of the test decorators.  See also #1541.
    PYTHONOPTIMIZE=2 $PYTEST \
        -W'ignore:assertions not in test modules or plugins will be ignored because assert statements are not executed by the underlying Python interpreter:pytest.PytestConfigWarning' \
  14. info dynamic-execution hypothesis/scripts/basic-test.sh:89:5

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

        pip install "$NUMPY"
        $PYTEST tests/array_api
        $PYTEST tests/numpy
  15. info dynamic-execution hypothesis/scripts/basic-test.sh:90:5

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

        $PYTEST tests/array_api
        $PYTEST tests/numpy
    
        pip install "$(grep 'pandas==' ../requirements/coverage.txt)"
  16. info dynamic-execution hypothesis/scripts/basic-test.sh:93:5

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

        pip install "$(grep 'pandas==' ../requirements/coverage.txt)"
        $PYTEST tests/pandas
    esac
  17. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    # like issue #822 in one of the test decorators.  See also #1541.
    PYTHONOPTIMIZE=2 $PYTEST \
        -W'ignore:assertions not in test modules or plugins will be ignored because assert statements are not executed by the underlying Python interpreter:pytest.PytestConfigWarning' \
  18. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install ".[pytz, dateutil, zoneinfo]"
    $PYTEST tests/datetime/
    pip uninstall -y pytz python-dateutil
  19. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install ".[dpcontracts]"
    $PYTEST tests/dpcontracts/
    pip uninstall -y dpcontracts
  20. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install attrs
    $PYTEST tests/attrs/
    pip uninstall -y attrs
  21. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install scipy
    $PYTEST tests/scipy/
    pip uninstall -y scipy
  22. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install "$(grep 'typing-extensions==' ../requirements/coverage.txt)"
    $PYTEST tests/redis/
    pip uninstall -y redis fakeredis
  23. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    
    $PYTEST tests/typing_extensions/
    if [ "$HYPOTHESIS_PROFILE" != "crosshair" ]; then
      pip uninstall -y typing-extensions
  24. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install "$(grep 'annotated-types==' ../requirements/coverage.txt)"
    $PYTEST tests/test_annotated_types.py
    pip uninstall -y annotated-types
  25. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install "$(grep -m 1 -oE 'lark>=([0-9.]+)' ../hypothesis/pyproject.toml | tr '>' =)"
    $PYTEST -Wignore tests/lark/
    pip install "$(grep 'lark==' ../requirements/coverage.txt)"
    $PYTEST tests/lark/
  26. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

    pip install "$(grep 'lark==' ../requirements/coverage.txt)"
    $PYTEST tests/lark/
    pip uninstall -y lark
  27. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

      pip install ".[codemods,cli]"
      $PYTEST tests/codemods/
    
      if [ "$(python -c 'import sys; print(sys.version_info[:2] == (3, 11))')" = "True" ] ; then
  28. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

      pip install "$(grep -E 'black(==| @)' ../requirements/coverage.txt)"
      $PYTEST tests/patching/
      pip uninstall -y libcst
  29. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

      pip install attrs
      $PYTEST tests/ghostwriter/
      pip uninstall -y attrs
      pip uninstall -y black
  30. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

          pip install .
          $PYTEST --count=2 --repeat-scope=session tests/numpy tests/crosshair
          # ...but running twice takes time, don't overdo it
          $PYTEST tests/array_api
  31. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

          # ...but running twice takes time, don't overdo it
          $PYTEST tests/array_api
        else
          $PYTEST tests/array_api tests/numpy
  32. command name is a variable (`$PYTEST`) that this file sets only to plain text (ast pass, confidence 0.40)

        else
          $PYTEST tests/array_api tests/numpy
        fi
      fi
  33. info warn → info by review frame-introspection hypothesis/src/hypothesis/control.py:50:13

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

            )
        frame = inspect.currentframe()
        where = _calling_function_location("reject", frame)
        if currently_in_test_context():
    dismissed LLM, confidence 0.90 Uses frame introspection to report the calling location for reject().
    Reasoning

    inspect.currentframe used to locate the caller for error reporting in reject(). Standard testing-library behaviour, no malicious use.

  34. info warn → info by review frame-introspection hypothesis/src/hypothesis/control.py:78:17

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

        if observability_enabled() or not condition:
            frame = inspect.currentframe()
            where = _calling_function_location("assume", frame)
            if observability_enabled() and currently_in_test_context():
    dismissed LLM, confidence 0.90 Frame introspection to record the location of assume() calls.
    Reasoning

    Same caller-location introspection for assume(), used for observability reporting. Legitimate.

  35. info warn → info by review decoder-decompress-payload hypothesis/src/hypothesis/core.py:442:23

    file imports decoder module(s) base64, zlib and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)

            try:
                decoded = zlib.decompress(decoded[1:])
            except zlib.error as err:
                raise InvalidArgument(
    likely benign LLM, confidence 0.85 Decodes and decompresses a Hypothesis blob-format value with error handling.
    Reasoning

    zlib.decompress on a decoded blob from a reproduction/seed blob string, with error handling raising InvalidArgument. This is a user-facing serialization format for reproducing failures, not a hidden embedded payload. The base64/zlib pairing is a known false-positive pattern for this rule.

  36. info warn → info by review dynamic-execution hypothesis/src/hypothesis/extra/ghostwriter.py:293:17

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

                with contextlib.suppress(SyntaxError):
                    compile(repr(st.just(param.default)), "<string>", "eval")
                    elements.insert(0, param.default)
            if elements or types:
    likely benign LLM, confidence 0.85 Syntax-checks a repr string with compile() to validate generated code.
    Reasoning

    compile(repr(...)) is used only as a syntax validity check on generated repr text, inside a suppress(SyntaxError). It does not execute the code. Benign.

  37. info warn → info by review dynamic-execution hypothesis/src/hypothesis/extra/ghostwriter.py:719:9

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

            r = re.sub(r"(lambda.*?: )(<unknown>)([,)])", r"\1...\3", r)
            compile(r, "<string>", "eval")
            # Finally, try to work out the imports we need for builds(), .map(),
            # .filter(), and .flatmap() to work without NameError
    likely benign LLM, confidence 0.85 Compiles generated expression text purely to check its syntax.
    Reasoning

    compile(r, ..., 'eval') validates generated source text for syntax only, not executing it. Benign ghostwriter validation.

  38. info warn → info by review dynamic-execution hypothesis/src/hypothesis/extra/ghostwriter.py:1837:13

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

                # executed; so you still shouldn't ghostwrite for hostile code.
                compile(repr(identity), "<string>", "exec")
            except SyntaxError:
                identity = repr(identity)
    likely benign LLM, confidence 0.85 Syntax-checks a repr string via compile() without executing it.
    Reasoning

    compile(repr(identity), 'exec') is a syntax check on a repr; the comment notes ghostwriting still should not be used on hostile code, implying awareness. Compile does not run the code. Benign.

  39. identifier `aᵏ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # The sum of a geometric series is given by (ref: wikipedia):
        #     ᵐ∑ₖ₌₀ aᵏ = (aᵐ⁺¹ - 1) / (a - 1)
        #               = S(m) / S(0)
        # assuming a != 1 and using the definition
  40. identifier `aᵐ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # The sum of a geometric series is given by (ref: wikipedia):
        #     ᵐ∑ₖ₌₀ aᵏ = (aᵐ⁺¹ - 1) / (a - 1)
        #               = S(m) / S(0)
        # assuming a != 1 and using the definition
  41. identifier `aᵐ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # assuming a != 1 and using the definition
        #         S(m) := aᵐ⁺¹ - 1.
        # The sum we want, starting from a number n [0 <= n <= m] rather than zero, is
        #     ᵐ∑ₖ₌ₙ aᵏ = ᵐ∑ₖ₌₀ aᵏ - ⁿ⁻¹∑ₖ₌₀ aᵏ = S(m) / S(0) - S(n - 1) / S(0)
  42. identifier `aᵏ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # The sum we want, starting from a number n [0 <= n <= m] rather than zero, is
        #     ᵐ∑ₖ₌ₙ aᵏ = ᵐ∑ₖ₌₀ aᵏ - ⁿ⁻¹∑ₖ₌₀ aᵏ = S(m) / S(0) - S(n - 1) / S(0)
        def S(n):
            return alphabet_size ** (n + 1) - 1
  43. identifier `aᵏ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # The sum we want, starting from a number n [0 <= n <= m] rather than zero, is
        #     ᵐ∑ₖ₌ₙ aᵏ = ᵐ∑ₖ₌₀ aᵏ - ⁿ⁻¹∑ₖ₌₀ aᵏ = S(m) / S(0) - S(n - 1) / S(0)
        def S(n):
            return alphabet_size ** (n + 1) - 1
  44. identifier `aᵏ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # The sum we want, starting from a number n [0 <= n <= m] rather than zero, is
        #     ᵐ∑ₖ₌ₙ aᵏ = ᵐ∑ₖ₌₀ aᵏ - ⁿ⁻¹∑ₖ₌₀ aᵏ = S(m) / S(0) - S(n - 1) / S(0)
        def S(n):
            return alphabet_size ** (n + 1) - 1
  45. info warn → info by review frame-introspection hypothesis/src/hypothesis/internal/conjecture/junkdrawer.py:316:13

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        """
        frame = sys._getframe(2)
        size = 1
        while frame:
    dismissed LLM, confidence 0.90 Walks stack frames via sys._getframe for internal sizing logic.
    Reasoning

    sys._getframe used to walk stack frames for size estimation of a helper. Internal introspection with no network or payload behaviour.

  46. identifier `ˆøπ` mixes scripts: Other + Latin + Greek (in string/comment) (raw pass, confidence 0.40)

        # common unicode characters
        "Ω≈ç√∫˜µ≤≥÷åß∂ƒ©˙∆˚¬…æœ∑´®†¥¨ˆøπ“‘¡™£¢∞§¶•ªº–≠¸˛Ç◊ı˜Â¯˘¿ÅÍÎÏ˝ÓÔ⟨U+F8FF⟩ÒÚÆ☃Œ„´‰ˇÁ¨ˆØ∏”’`⁄€‹›fifl‡°·‚—±",
        # characters which increase in length when lowercased
  47. identifier `ˇÁ` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # common unicode characters
        "Ω≈ç√∫˜µ≤≥÷åß∂ƒ©˙∆˚¬…æœ∑´®†¥¨ˆøπ“‘¡™£¢∞§¶•ªº–≠¸˛Ç◊ı˜Â¯˘¿ÅÍÎÏ˝ÓÔ⟨U+F8FF⟩ÒÚÆ☃Œ„´‰ˇÁ¨ˆØ∏”’`⁄€‹›fifl‡°·‚—±",
        # characters which increase in length when lowercased
  48. identifier `ˆØ` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # common unicode characters
        "Ω≈ç√∫˜µ≤≥÷åß∂ƒ©˙∆˚¬…æœ∑´®†¥¨ˆøπ“‘¡™£¢∞§¶•ªº–≠¸˛Ç◊ı˜Â¯˘¿ÅÍÎÏ˝ÓÔ⟨U+F8FF⟩ÒÚÆ☃Œ„´‰ˇÁ¨ˆØ∏”’`⁄€‹›fifl‡°·‚—±",
        # characters which increase in length when lowercased
  49. identifier `æœÆŒffʤʨß` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

        # ligatures
        "æœÆŒffʤʨß",
        # emoticons
        "(╯°□°)╯︵ ┻━┻)",
  50. identifier `ʇǝɯɐ` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # upsidown text
        "ʇǝɯɐ ʇᴉs ɹolop ɯnsdᴉ ɯǝɹo˥",
        # reserved strings in windows
        "NUL",
  51. identifier `ʇᴉs` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # upsidown text
        "ʇǝɯɐ ʇᴉs ɹolop ɯnsdᴉ ɯǝɹo˥",
        # reserved strings in windows
        "NUL",
  52. identifier `ɹolop` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # upsidown text
        "ʇǝɯɐ ʇᴉs ɹolop ɯnsdᴉ ɯǝɹo˥",
        # reserved strings in windows
        "NUL",
  53. identifier `ɯnsdᴉ` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # upsidown text
        "ʇǝɯɐ ʇᴉs ɹolop ɯnsdᴉ ɯǝɹo˥",
        # reserved strings in windows
        "NUL",
  54. identifier `ɯǝɹo` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

        # upsidown text
        "ʇǝɯɐ ʇᴉs ɹolop ɯnsdᴉ ɯǝɹo˥",
        # reserved strings in windows
        "NUL",
  55. identifier `ͅi` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

    �̲e͇̣̰̦̬͎ ̢̼̻̱̘h͚͎͙̜̣̲ͅi̦̲̣̰̤v̻͍e̺̭̳̪̰-m̢iͅn̖̺̞̲̯̰d̵̼̟͙̩̼̘̳ ̞̥̱̳̭r̛̗̘e͙p͠r̼̞̻̭̗e̺̠̣͟s̘͇̳͍̝͉e͉̥̯̞̲͚̬͜ǹ̬͎͎̟̖͇̤t͍̬̤͓̼̭͘ͅi̪̱n͠g̴͉ ⟨U+034F⟩͉ͅc̬̟h͡a̫̻̯͘o̫̟̖͍̙̝͉s̗̦̲.̨̹͈̣",
  56. identifier `iͅn` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)

    �̜̣̲ͅi̦̲̣̰̤v̻͍e̺̭̳̪̰-m̢iͅn̖̺̞̲̯̰d̵̼̟͙̩̼̘̳ ̞̥̱̳̭r̛̗̘e͙p͠r̼̞̻̭̗e̺̠̣͟s̘͇̳͍̝͉e͉̥̯̞̲͚̬͜ǹ̬͎͎̟̖͇̤t͍̬̤͓̼̭͘ͅi̪̱n͠g̴͉ ⟨U+034F⟩͉ͅc̬̟h͡a̫̻̯͘o̫̟̖͍̙̝͉s̗̦̲.̨̹͈̣",
  57. identifier `ͅi` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

    �̲͚̬͜ǹ̬͎͎̟̖͇̤t͍̬̤͓̼̭͘ͅi̪̱n͠g̴͉ ⟨U+034F⟩͉ͅc̬̟h͡a̫̻̯͘o̫̟̖͍̙̝͉s̗̦̲.̨̹͈̣",
  58. identifier `ͅc` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)

    �͇̤t͍̬̤͓̼̭͘ͅi̪̱n͠g̴͉ ⟨U+034F⟩͉ͅc̬̟h͡a̫̻̯͘o̫̟̖͍̙̝͉s̗̦̲.̨̹͈̣",
  59. info warn → info by review frame-introspection hypothesis/src/hypothesis/internal/coverage.py:74:18

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # stack frames up.
            caller = sys._getframe(depth + 2)
            fname = pretty_file_name(caller.f_code.co_filename)
            local_description = f"{name} at {fname}:{caller.f_lineno}"
    dismissed LLM, confidence 0.90 Reads caller frame filename and line number for coverage descriptions.
    Reasoning

    sys._getframe used to find the caller's file and line for coverage-related description. Legitimate internal debugging/coverage support.

  60. info warn → info by review dynamic-execution hypothesis/src/hypothesis/internal/lambda_sources.py:265:20

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

        if not f_code.co_freevars and not referenced_modules:
            compiled = eval(source, f_globals)
        else:
            if f_code.co_freevars:
    likely benign LLM, confidence 0.80 Evaluates reconstructed lambda source to rebuild a function object.
    Reasoning

    eval of source reconstructed from a lambda's own source text in the caller's globals, to recreate lambda objects for lambda-source tracking. Expected for this library's purpose, though eval of recovered source is a sensitive pattern.

  61. info warn → info by review dynamic-execution hypothesis/src/hypothesis/internal/lambda_sources.py:298:9

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

            )
            exec(exec_str, f_globals)
            compiled = f_globals["__construct_lambda"]()
    likely benign LLM, confidence 0.80 Executes generated code to reconstruct a lambda with closure variables.
    Reasoning

    exec of a generated construction string into the function's globals to rebuild closures with free variables. Consistent with the library's lambda-reconstruction feature; source is derived from the user's own code, not fetched externally.

  62. info warn → info by review dynamic-execution hypothesis/src/hypothesis/internal/reflection.py:367:5

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

        assert isinstance(source, str)
        exec(source, result.__dict__)
        eval_cache[source] = result
        return result
    likely benign LLM, confidence 0.80 Execs a source string into a fresh namespace to build a function.
    Reasoning

    exec of a source string into a fresh module-like namespace to build a function from source; it is a cached helper for recreating functions from their source. Expected in this library, source originates locally.

  63. info warn → info by review frame-introspection hypothesis/src/hypothesis/internal/scrutineer.py:114:13

    `sys.settrace` — call-stack frame introspection (ast pass, confidence 0.70)

            if not hasattr(sys, "monitoring"):  # pragma: no cover  # only on Python < 3.12
                sys.settrace(self.trace)
                return self
    dismissed LLM, confidence 0.90 Installs a trace function for Hypothesis's explanation analysis.
    Reasoning

    sys.settrace used to install a tracer for coverage/explanation analysis on Python below 3.12, with a pragma comment. Legitimate profiling/tracing.

  64. info warn → info by review frame-introspection hypothesis/src/hypothesis/internal/scrutineer.py:137:13

    `sys.settrace` — call-stack frame introspection (ast pass, confidence 0.70)

            if not hasattr(sys, "monitoring"):  # pragma: no cover  # only on Python < 3.12
                sys.settrace(None)
                return
    dismissed LLM, confidence 0.90 Removes the trace function installed by the scrutineer.
    Reasoning

    Paired sys.settrace(None) removing the tracer installed above. Legitimate.

  65. info warn → info by review frame-introspection hypothesis/src/hypothesis/strategies/_internal/strategies.py:102:31

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            return location
        frame: FrameType | None = sys._getframe(1)
        while frame is not None and is_hypothesis_file(frame.f_code.co_filename):
            frame = frame.f_back
    likely benign LLM, confidence 0.90 Frame walk in Hypothesis strategies to find the user-facing caller location.
    Reasoning

    Hypothesis walks the call stack to locate the user's code that created a strategy, skipping its own files. This is a standard, legitimate use of sys._getframe for error reporting.

  66. info warn → info by review frame-introspection hypothesis/src/hypothesis/strategies/_internal/types.py:227:37

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        found_loc: str | None = None
        frame: types.FrameType | None = sys._getframe()
        while frame is not None:
            loc = f"{frame.f_code.co_filename}:{frame.f_lineno}"
    likely benign LLM, confidence 0.90 Frame walk in type-strategy code to find a source location.
    Reasoning

    Same pattern as the other sys._getframe call: a loop over frames to report a source location. Consistent with Hypothesis's own debugging or reporting logic.

  67. info critical → info by review dynamic-execution hypothesis/tests/codemods/test_codemod_cli.py:40:12

    `subprocess.run` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)

    def run(command, *, cwd=None, input=None):
        return subprocess.run(
            command,
            input=input,
    likely benign LLM, confidence 0.75 Test helper wrapping subprocess.run with shell=True for codemod CLI tests.
    Reasoning

    A test helper that runs a command string through subprocess with shell=True. The command comes from test code, not untrusted input, so it is a test convenience rather than a dropper. The shell use is still worth a glance.

  68. info warn → info by review frame-introspection hypothesis/tests/conjecture/test_junkdrawer.py:201:16

    `inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)

    def recur(i):
        assert len(inspect.stack(0)) == stack_depth_of_caller()
        if i >= 1:
            recur(i - 1)
    likely benign LLM, confidence 0.90 Test checking stack depth via inspect.stack in a recursive function.
    Reasoning

    inspect.stack is used in a recursion test to check stack depth. It is a test of the stack-depth helper with no malicious behaviour.

  69. info warn → info by review dynamic-execution hypothesis/tests/cover/test_feature_flags.py:58:14

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

        assert not flags.is_enabled("off")
        flags2 = eval(repr(flags))
        assert flags2.is_enabled("on")
        assert not flags2.is_enabled("off")
    likely benign LLM, confidence 0.90 Round-trip test evaluating the repr of a feature-flags object.
    Reasoning

    eval(repr(flags)) is a round-trip test checking that the repr of a feature-flags object reconstructs an equivalent object. The input is the test's own object, not external data.

  70. info warn → info by review dynamic-execution hypothesis/tests/cover/test_feature_flags.py:72:14

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

    
        flags2 = eval(repr(flags))
    
        for f in features:
    likely benign LLM, confidence 0.90 Round-trip test evaluating the repr of a feature-flags object.
    Reasoning

    Same repr round-trip pattern as the other feature-flags eval, testing serialization of the test's own object.

  71. info warn → info by review frame-introspection hypothesis/tests/cover/test_observability.py:337:13

    `inspect.currentframe` — call-stack frame introspection (ast pass, confidence 0.70)

        # the line `offset` lines below the `def` statement of the calling function
        frame = inspect.currentframe().f_back
        return f"{__file__}:{frame.f_code.co_firstlineno + offset}"
    likely benign LLM, confidence 0.90 Test helper reading the caller's frame to compute a line number.
    Reasoning

    inspect.currentframe().f_back is used to compute the line number of a calling function for a test assertion. Read-only introspection in a test.

  72. info warn → info by review dynamic-execution hypothesis/tests/cover/test_pretty.py:596:14

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

        ]:
            r2 = eval(pretty.pretty(r), globals())
            assert r.pattern == r2.pattern
            assert r.flags == r2.flags
    likely benign LLM, confidence 0.90 Round-trip test evaluating pretty-printed regex output.
    Reasoning

    eval of pretty-printed output to verify that pretty-printing a regex round-trips. The input is generated within the test.

  73. info warn → info by review dynamic-execution hypothesis/tests/cover/test_pretty.py:625:9

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

        assert float_to_lex(obj) == float_to_lex(
            eval(rep, {"struct": struct, "nan": float("nan")})
        )
    likely benign LLM, confidence 0.90 Test evaluating a float repr with a limited namespace.
    Reasoning

    eval of a repr with a restricted namespace, used to check float round-tripping in a test. Benign test code.

  74. info warn → info by review dynamic-execution hypothesis/tests/cover/test_pretty.py:686:26

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

    def test_pretty_prints_enums_as_code(rep):
        assert pretty.pretty(eval(rep)) == rep
    likely benign LLM, confidence 0.90 Test evaluating pretty-printed enum source.
    Reasoning

    eval of pretty-printed enum code, checking that the printed form reproduces the input. Test-only.

  75. info warn → info by review dynamic-execution hypothesis/tests/cover/test_pretty.py:770:12

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

        assert got == f"{x:#_x}"  # hexadecimal with underscores
        assert eval(got) == x
    likely benign LLM, confidence 0.90 Test evaluating a formatted integer literal.
    Reasoning

    eval of a formatted hex-with-underscores string to confirm the round-trip value. Test-only, with fixed inputs.

  76. info warn → info by review decoder-import-with-exec hypothesis/tests/cover/test_reproduce_failure.py:146:20

    file imports decoder module(s) base64, zlib and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)

        extract = exp.search(notes)
        reproduction = eval(extract.group(0))
        test = reproduction(test)
    likely benign LLM, confidence 0.80 Test decoding a reproduce_failure blob and evaluating it to rebuild a test.
    Reasoning

    The file imports base64 and zlib and calls eval, which matches the decoder-plus-exec shape. In context this is Hypothesis's @reproduce_failure decoding, which turns a blob from test notes back into a test reproduction. That is legitimate, though eval on decoded data is a real pattern worth noting.

  77. info warn → info by review dynamic-execution hypothesis/tests/cover/test_reproduce_failure.py:146:20

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

        extract = exp.search(notes)
        reproduction = eval(extract.group(0))
        test = reproduction(test)
    likely benign LLM, confidence 0.80 Eval of an extracted reproduce_failure expression in a test.
    Reasoning

    The dynamic-execution eval of the regex-extracted reproduction string, the same site as the decoder finding. Same legitimate reproduction-decoding purpose.

  78. identifier `te02тест49st` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)

        with pytest.raises(InvalidArgument):
            check_can_generate_examples(characters(include_characters="te02тест49st"))
  79. identifier `te02тест49st` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

        with pytest.raises(InvalidArgument):
            check_can_generate_examples(characters(include_characters="te02тест49st"))
  80. identifier `te02тест49st` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)

    def test_whitelisted_characters_overlap_blacklisted_characters():
        good_chars = "te02тест49st"
        bad_chars = "ts94тсет"
        with pytest.raises(InvalidArgument) as exc:
  81. identifier `te02тест49st` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

    def test_whitelisted_characters_overlap_blacklisted_characters():
        good_chars = "te02тест49st"
        bad_chars = "ts94тсет"
        with pytest.raises(InvalidArgument) as exc:
  82. identifier `ts94тсет` contains homoglyph candidates: с (0441)→c, е (0435)→e (in string/comment) (raw pass, confidence 0.35)

        good_chars = "te02тест49st"
        bad_chars = "ts94тсет"
        with pytest.raises(InvalidArgument) as exc:
            check_can_generate_examples(
  83. identifier `ts94тсет` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

        good_chars = "te02тест49st"
        bad_chars = "ts94тсет"
        with pytest.raises(InvalidArgument) as exc:
            check_can_generate_examples(
  84. identifier `teтестst` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)

    def test_whitelisted_characters_override():
        good_characters = "teтестst"
        st = characters(
            min_codepoint=ord("0"),
  85. identifier `teтестst` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

    def test_whitelisted_characters_override():
        good_characters = "teтестst"
        st = characters(
            min_codepoint=ord("0"),
  86. identifier `te02тест49st` contains homoglyph candidates: е (0435)→e, с (0441)→c (in string/comment) (raw pass, confidence 0.35)

    def test_blacklisted_characters():
        bad_chars = "te02тест49st"
        st = characters(
            min_codepoint=ord("0"), max_codepoint=ord("9"), exclude_characters=bad_chars
  87. identifier `te02тест49st` mixes scripts: Latin + Cyrillic (in string/comment) (raw pass, confidence 0.40)

    def test_blacklisted_characters():
        bad_chars = "te02тест49st"
        st = characters(
            min_codepoint=ord("0"), max_codepoint=ord("9"), exclude_characters=bad_chars
  88. info warn → info by review unicode-mixed-script hypothesis/tests/cover/test_unicode_identifiers.py:37:1

    identifier `is_approx_π` mixes scripts: Latin + Greek (raw pass, confidence 0.80)

    
    is_approx_π = lambda x: x == 3.1415
    likely benign LLM, confidence 0.95 Lambda assigned to a Latin-plus-Greek identifier in a unicode test.
    Reasoning

    A deliberate Unicode identifier in a test named for unicode identifier handling. Mixed-script names are the point of the test, not obfuscation.

  89. info warn → info by review unicode-mixed-script hypothesis/tests/cover/test_unicode_identifiers.py:41:44

    identifier `is_approx_π` mixes scripts: Latin + Greek (raw pass, confidence 0.80)

    def test_can_handle_unicode_identifier_in_same_line_as_lambda_def():
        assert get_pretty_function_description(is_approx_π) == "lambda x: x == 3.1415"
    likely benign LLM, confidence 0.95 Test referencing the Greek-letter unicode identifier.
    Reasoning

    Same intentional mixed-script identifier, used in a test that checks source description of unicode-named lambdas.

  90. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/recorded/magic_builtins.txt:112:5

    [markup prose] `eval` called on a string literal (ast pass, confidence 0.85)

        eval(source, globals, locals)
    dismissed LLM, confidence 0.90 Eval appearing in a recorded documentation or fixture text file.
    Reasoning

    The file is a recorded text fixture of ghostwriter output, and the eval appears in quoted prose or example code. It is not executed by the package.

  91. info warn → info by review decoder-import-with-exec hypothesis/tests/ghostwriter/test_expected_output.py:302:5

    file imports decoder module(s) base64 and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)

        assert actual == expected  # We got the expected source code
        exec(expected, {})  # and there are no SyntaxError or NameErrors
    likely benign LLM, confidence 0.93 Test helper executes generated Python source to verify it is valid.
    Reasoning

    Test file for Hypothesis ghostwriter; exec of generated source code to check it runs without SyntaxError/NameError. Decoder import flag is incidental (base64 imported for test data), no obfuscated payload.

  92. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_expected_output.py:302:5

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

        assert actual == expected  # We got the expected source code
        exec(expected, {})  # and there are no SyntaxError or NameErrors
    likely benign LLM, confidence 0.93 exec of expected generated source inside a test.
    Reasoning

    exec on a variable holding expected generated source in a test assertion context; legitimate test verification pattern.

  93. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_expected_output.py:317:5

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

            assert actual == expected
        exec(expected, {"not_set": not_set})
    likely benign LLM, confidence 0.93 Test executes generated source code to check validity.
    Reasoning

    Same test pattern executing generated code with a namespace containing a sentinel; no malicious indicators.

  94. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_expected_output.py:339:5

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

        assert actual == expected  # We got the expected source code
        exec(expected, {})  # and there are no SyntaxError or NameErrors
    likely benign LLM, confidence 0.93 Test executes generated source code to check validity.
    Reasoning

    Same legitimate test verification of generated code.

  95. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:56:9

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

        try:
            exec(source_code, namespace)
        except Exception:
            print(f"************\n{source_code}\n************")
    likely benign LLM, confidence 0.93 Test helper execs generated code and prints it on exception.
    Reasoning

    Helper in a test that execs generated source and prints it on failure; standard test scaffolding.

  96. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:206:5

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

        source_code = ghostwriter.magic(socket)
        exec(source_code, {})
    likely benign LLM, confidence 0.92 Test execs generator output to check it runs.
    Reasoning

    Test executes output of ghostwriter.magic to ensure it runs; legitimate test of a code generator.

  97. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:213:5

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

        source_code = ghostwriter.binary_operation(takes_frozensets)
        exec(source_code, {})
    likely benign LLM, confidence 0.92 Test execs generated binary operation source.
    Reasoning

    Same pattern: test verifies generated binary_operation source executes.

  98. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:234:5

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

        # Most importantly: the code should execute without NameError
        exec(source_code, {})
    likely benign LLM, confidence 0.92 Test execs generated source to check for NameError.
    Reasoning

    Test comment states code should execute without NameError; legitimate verification.

  99. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:436:5

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

        source_code = ghostwriter.binary_operation(compose_types)
        exec(source_code, {})
        # and also works with explicit identity element
        source_code = ghostwriter.binary_operation(compose_types, identity=type)
    likely benign LLM, confidence 0.92 Test execs generated binary_operation source.
    Reasoning

    Legitimate test of generated code from binary_operation.

  100. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:439:5

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

        source_code = ghostwriter.binary_operation(compose_types, identity=type)
        exec(source_code, {})
    likely benign LLM, confidence 0.92 Test execs generated binary_operation source with identity.
    Reasoning

    Legitimate test of generated code with explicit identity.

  101. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:846:5

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

        assert "one_of(" in source_code
        exec(source_code, {})
    likely benign LLM, confidence 0.92 Test execs generated source after asserting content.
    Reasoning

    Test asserts substring then execs generated source; legitimate.

  102. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:854:5

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

        source_code = ghostwriter.ufunc(numpy.isnan)
        exec(source_code, {})
        # Also cover passing an explicit `annotate`, rather than the default None.
        source_code = ghostwriter.ufunc(numpy.isnan, annotate=True)
    likely benign LLM, confidence 0.92 Test execs generated ufunc source.
    Reasoning

    Test execs generated ufunc source; legitimate test of code generator.

  103. info warn → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter.py:857:5

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

        source_code = ghostwriter.ufunc(numpy.isnan, annotate=True)
        exec(source_code, {})
    likely benign LLM, confidence 0.92 Test execs generated ufunc source with annotate.
    Reasoning

    Same legitimate ufunc generation test.

  104. info critical → info by review dynamic-execution hypothesis/tests/ghostwriter/test_ghostwriter_cli.py:43:12

    `subprocess.run` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)

    def run(cmd, *, cwd=None):
        return subprocess.run(
            cmd, capture_output=True, shell=True, text=True, cwd=cwd, encoding="utf-8"
        )
    likely benign LLM, confidence 0.85 Test helper running CLI commands through a shell.
    Reasoning

    Test helper wrapping subprocess with shell=True for running CLI commands in tests; cmd is supplied by test code, not untrusted input. Critical severity is overstated for a test helper, though shell=True with variable input is a general hygiene concern.

  105. info warn → info by review dynamic-execution hypothesis/tests/nocover/test_pretty_repr.py:102:16

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

        r = repr(strategy)
        via_eval = eval(r, strategy_globals)
        r2 = repr(via_eval)
        assert r == r2
    likely benign LLM, confidence 0.85 Test evals repr of strategy for round-trip check.
    Reasoning

    Evals repr of Hypothesis strategies from the test's own parametrized inputs to check round-tripping; legitimate test pattern with controlled inputs.

  106. info warn → info by review dynamic-execution hypothesis/tests/nocover/test_pretty_repr.py:116:17

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

    def test_sampled_transform_reprs(r):
        assert repr(eval(r, strategy_globals)) == r
    likely benign LLM, confidence 0.85 Test evals strategy repr strings for round-trip.
    Reasoning

    Parametrized test evaluating repr strings of strategies it generated itself; benign round-trip check.

  107. info warn → info by review dynamic-execution hypothesis/tests/numpy/test_floor_ceil.py:35:18

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

    def test_our_floor_and_ceil_avoid_numpy_rounding(value):
        a = np.array(eval(value))
        f = floor(a)
        c = ceil(a)
    likely benign LLM, confidence 0.80 A numpy floor/ceil test helper calls eval on a function parameter to build an array.
    Reasoning

    The eval call takes a function parameter named value and wraps it in np.array. This looks like a test helper that evaluates a parametrized literal expression, such as a list or number supplied by pytest parametrization. Eval on test input is a poor practice and a real risk if untrusted data reaches it, but within a test file with no shell, network, or encoded payload, it reads as a legitimate though sloppy test pattern. The doubt is that the parameter source is not shown.

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/HypothesisWorks/hypothesis hypothesis && cd hypothesis
git checkout v6.169.4
disclude scan --severity info --diff v6.169.3 hypothesis