PyPI / hypothesis / 6.170.4

hypothesis 6.170.4

Source
https://github.com/HypothesisWorks/hypothesis
Tag scanned
v6.170.4
Directory
hypothesis (only this part of the repository was scanned)
Compared with
v6.170.3 (0 signals introduced since)
Files
537 scanned, 16 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 107 info
Scan time
32.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-20 00:58

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 runs on the contents of the project's own src/hypothesis/version.py read from the repo's root, a standard Sphinx pattern for reading __version__ without importing the package. The expression is non-literal but comes from a fixed local path, not untrusted input. It runs only when building docs, so the risk is low but the exec of a file is worth a note.

  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():
    likely benign LLM, confidence 0.93 Uses frame introspection to report the calling location for reject().
    Reasoning

    inspect.currentframe is used to locate the caller for error messages in reject(). This is ordinary diagnostic code in a testing library.

  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():
    likely benign LLM, confidence 0.93 Uses frame introspection to report the calling location for assume().
    Reasoning

    Same pattern as reject(): frame introspection to produce a location string for assume() diagnostics. Benign.

  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.90 Decodes and decompresses a reproduction blob for failure replay.
    Reasoning

    zlib.decompress on a blob with a version-byte prefix is the standard decoding of Hypothesis's reproduce_failure blob format, which is user-supplied test data, not an embedded payload executed at runtime. The decompressed data is parsed as choice sequences, not executed.

  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.90 Syntax-checks the repr of a default value to decide if it can be emitted.
    Reasoning

    compile is used only to check whether repr of a parameter default is valid syntax, inside a suppress(SyntaxError) block, to decide whether to include it. It is a syntax check on repr output, not execution of untrusted code.

  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.90 Compiles a generated expression string only to validate its syntax.
    Reasoning

    compile(r, ..., 'eval') validates the generated strategy expression as syntax to work out imports. It compiles but does not run the code, and the source is generated by the tool itself.

  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.90 Syntax-checks a repr string and falls back to repr on failure.
    Reasoning

    compile(repr(identity), ..., 'exec') is a syntax check on a repr inside a SyntaxError handler, with the source generated by the tool. Compilation does not execute the code.

  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:
    likely benign LLM, confidence 0.90 Walks the call stack via sys._getframe to compute a frame-based size.
    Reasoning

    sys._getframe walks the call stack to measure frame depth for a size computation. This is internal bookkeeping in a testing library, with no malicious 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}"
    likely benign LLM, confidence 0.92 Reads the caller frame's file and line for coverage descriptions.
    Reasoning

    sys._getframe is used to read the caller's filename and line number for coverage descriptions. Routine tooling code.

  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.85 Evals reconstructed lambda source in the function's globals.
    Reasoning

    eval of source for a lambda being reconstructed, using the function's own globals. This is a known approach for recovering lambda objects from source in a testing library; the source comes from the user's own code under test, not from an external attacker.

  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.85 Execs generated source to reconstruct a lambda with its closure.
    Reasoning

    exec of a generated constructor string to rebuild a lambda with closure variables. It is code-generation used by a testing library, operating on the user's own source; no sign of a dropper or hidden payload.

  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.85 Execs source text into a module namespace to build a callable.
    Reasoning

    exec of a source string into a result module dict, cached by source. This is the standard way Hypothesis rebuilds functions from source text for its own testing features; it does not fetch or decode external payloads.

  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
    likely benign LLM, confidence 0.92 Installs a trace function to analyse execution for test explanations.
    Reasoning

    sys.settrace installs a tracer for coverage/explanation analysis during tests, guarded by a check for sys.monitoring on older Pythons. This is a legitimate debugging and tracing use.

  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
    likely benign LLM, confidence 0.92 Removes the trace function installed by the scrutineer.
    Reasoning

    Clears the trace function set earlier in the same tracing context. Matching teardown for the legitimate tracer.

  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 Walks the call stack to locate the user's caller for reporting.
    Reasoning

    sys._getframe(1) is used to walk past Hypothesis's own files to find the user's calling location for error reporting. This is a common, legitimate pattern in a testing library and does not hide any payload.

  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 Walks frames to record a source location for a strategy.
    Reasoning

    sys._getframe() walks frames to record a source location for strategy reporting. This is ordinary library introspection, with no network, exec, or obfuscation involved.

  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.80 Test helper that runs a shell command string for codemod CLI tests.
    Reasoning

    A small test helper wraps subprocess.run with shell=True so tests can run CLI command strings. The command comes from test code, not untrusted input, so the risk is limited to test tooling.

  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 through recursive calls using inspect.stack.
    Reasoning

    inspect.stack(0) is used in a recursion test to check that stack depth matches the caller's expectation. It is a test assertion with no malicious behavior.

  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-trips a feature-flags object through repr and eval in a test.
    Reasoning

    eval(repr(flags)) is a round-trip serialization check on a local feature-flags object within a test. The input is the program's own repr, 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-trips feature flags through repr and eval in a test.
    Reasoning

    Same repr/eval round-trip pattern on a locally constructed feature-flags object, testing that serialization preserves state.

  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 computing the caller's file and line via currentframe.
    Reasoning

    inspect.currentframe().f_back is used in a test helper to compute an expected file and line number. This is benign introspection for test assertions.

  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 Evals pretty-printed regex to verify round-trip fidelity.
    Reasoning

    eval of pretty-printed repr output of a regex object, checked against the original pattern and flags. This is a round-trip test on locally generated data.

  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 Evals a pretty-printed float representation in a round-trip test.
    Reasoning

    eval of a pretty-printed float representation with a restricted namespace, used to check round-trip lexing. The input is generated by the library under test.

  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 Evals enum representations to check pretty-printing as code.
    Reasoning

    eval(rep) on parametrized pretty-printed enum representations in a test. The input is a fixed test parameter, not external data.

  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 Evals a formatted hex string to verify the round-trip value.
    Reasoning

    eval of formatted hexadecimal output with underscores, checked against the original integer. This is a test of the formatter's output.

  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 Evals a reproduce_failure blob extracted from notes to rebuild a test decorator.
    Reasoning

    The snippet is paired with a decoder-import signal because base64 and zlib are imported in the file. The eval input is a regex match on the @reproduce_failure note text in Hypothesis's own reproduction feature. It is the library's documented mechanism, not a multi-stage dropper, though an eval of extracted text is 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 Same eval of a reproduce_failure decorator string as the paired finding.
    Reasoning

    This is the same eval call as the preceding finding, flagged separately by the dynamic-execution signal. It operates on the library's own reproduction decorator text in a test.

  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 Deliberate unicode identifier in a test of non-ASCII identifier support.
    Reasoning

    The identifier is_approx_π deliberately mixes Latin and Greek to test unicode identifier handling in a test file. Mixed-script identifiers are intentional here and not an attack.

  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 deliberate unicode identifier is_approx_π.
    Reasoning

    Same deliberate mixed-script identifier, used in a test asserting its pretty description. It is intentional test coverage for unicode names.

  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 appears in a recorded text fixture, not as executed code.
    Reasoning

    This is a recorded text fixture containing the string eval(source, globals, locals) in documentation prose or expected output. It is not executed code, so the dynamic-execution signal does not apply.

  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.90 Test helper that execs generated Python source to verify it compiles and runs.
    Reasoning

    This is a Hypothesis ghostwriter test that execs generated source code to check it is valid. The base64 import is incidental to the test file and the exec is on test-generated code, not a dropper pipeline.

  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.90 exec of expected generated source in a ghostwriter test.
    Reasoning

    exec on the expected source string inside a test verifying ghostwriter output; the expected content is a fixed test fixture, so this is ordinary test validation.

  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.90 exec of expected generated source in a ghostwriter test.
    Reasoning

    Same pattern: exec of expected test-fixture source to confirm it runs without NameError, in a test module.

  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.90 exec of expected generated source in a ghostwriter test.
    Reasoning

    Same test-validation pattern of exec on expected fixture source.

  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.90 Test helper executing generated source code and printing it on exception.
    Reasoning

    Helper in a test that execs ghostwriter-generated source in a namespace and prints it on failure; standard test-harness behavior.

  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.90 Test executes ghostwriter-generated source to check it runs.
    Reasoning

    exec of output from ghostwriter.magic inside a test to confirm validity; no external input or network source.

  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.90 Test executes ghostwriter-generated binary_operation source.
    Reasoning

    Same ghostwriter test validation of generated binary_operation source.

  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.90 Test executes generated source to check for NameError.
    Reasoning

    Test asserts generated code executes without NameError; benign test logic.

  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.90 Test executes generated binary_operation source.
    Reasoning

    Benign test of ghostwriter binary_operation output via exec.

  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.90 Test executes generated binary_operation source with identity argument.
    Reasoning

    Benign test of ghostwriter binary_operation output 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.90 Test executes generated source containing one_of.
    Reasoning

    Benign test executing generated one_of source after asserting its content.

  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.90 Test executes generated ufunc source.
    Reasoning

    Benign test executing ghostwriter.ufunc generated source.

  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.90 Test executes generated ufunc source with annotate.
    Reasoning

    Benign test executing ghostwriter.ufunc output with annotate=True.

  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 wrapping subprocess.run with shell=True for CLI tests.
    Reasoning

    A small test-utility wrapper around subprocess.run with shell=True; the cmd is supplied by test code, not untrusted input. Shell=True is a poor practice but this is a legitimate test helper, and the critical severity is overstated.

  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.90 Test evaluates repr of a strategy to verify round-trip.
    Reasoning

    eval of repr of a Hypothesis strategy in a round-trip test checking repr stability; the input is generated locally by the test.

  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.90 Test evals sampled strategy repr strings for round-trip checks.
    Reasoning

    Parametrized test evaluating repr strings of strategies to check round-trip; benign test logic.

  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 test evaluates a parameter string to build an array before checking floor and ceil results.
    Reasoning

    The eval call sits in a test function whose parameter is named value, and the file is a numpy test exercising floor and ceil behaviour. Test suites commonly eval a parametrized string to build an array literal. Nothing in the snippet shows attacker-controlled input, network data, or a dropper pattern. The eval is still a poor practice, and its input source is not shown, so the verdict is likely benign rather than dismissed.

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.170.4
disclude scan --severity info --diff v6.170.3 hypothesis