PyPI / hypothesis / 6.169.2

hypothesis 6.169.2

Source
https://github.com/HypothesisWorks/hypothesis
Tag scanned
v6.169.2
Directory
hypothesis (only this part of the repository was scanned)
Compared with
v6.169.1 (0 signals introduced since)
Files
536 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-15 13:41

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 build execs the project's own version.py to read __version__.
    Reasoning

    exec reads the project's own version.py from a path under the repo root and runs it to extract __version__. This is a known Sphinx docs idiom; it is not obfuscated and the executed file is in-repo source, not fetched or decoded data.

  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.93 Uses currentframe to report where reject() was called from.
    Reasoning

    inspect.currentframe is used to locate the caller for error messages in reject(). Standard testing-library introspection with no malicious effect.

  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.93 Uses currentframe to report where assume() was called from.
    Reasoning

    Same caller-location introspection for assume(), used for 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.85 Decodes a base64 reproduction blob and zlib-decompresses it to replay a failure.
    Reasoning

    zlib.decompress on a value from a user-supplied reproduction blob (the decoded[1:] after base64 decoding of a seed/blob for @reproduce_failure). This is a documented serialization format for failure replay, not a hidden payload, though it is a decoded-then-decompressed path.

  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:
    dismissed LLM, confidence 0.90 Syntax-checks repr of a strategy default via compile.
    Reasoning

    compile is used only as a syntax check on repr() of a strategy for a parameter default, inside suppress(SyntaxError). It is a validation idiom, 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
    dismissed LLM, confidence 0.90 Compiles a generated expression string to validate syntax.
    Reasoning

    compile(r, ..., 'eval') validates a generated expression string for syntax only; it is never executed here. Benign 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)
    dismissed LLM, confidence 0.90 Syntax-checks a repr via compile to decide whether to emit it.
    Reasoning

    compile(repr(identity), ..., 'exec') is a syntax check with SyntaxError fallback. The comment indicates this is about whether a repr is valid source. 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.93 Walks the call stack via sys._getframe to measure depth.
    Reasoning

    sys._getframe(2) is used to count stack depth for a size/diagnostic helper. Benign introspection.

  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.93 Reads caller frame file and line for coverage labels.
    Reasoning

    sys._getframe used to label coverage-collection locations by caller file and line. Benign 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 Evaluates reconstructed lambda source to rebuild a callable for reporting.
    Reasoning

    eval of source recovered for lambda reconstruction, used for reporting lambda source in test output. The source is derived from the user's own code under test, not attacker-controlled data, so this is an expected introspection 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.85 Execs generated source to reconstruct a lambda with its free variables.
    Reasoning

    exec of a generated construct string to rebuild a lambda with closures. It is a dynamic codegen technique within a testing library, operating on source the library itself derived from the user's code.

  62. info warn → info by review dynamic-execution hypothesis/src/hypothesis/internal/reflection.py:358: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 into a module namespace to materialize a function, with caching.
    Reasoning

    exec of source into a fresh module dict with caching, used to rebuild functions from source for strategy/test reflection. Expected dynamic-codegen behavior for this library; the source is not fetched from an external or hidden location.

  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.93 Installs a trace function for scrutineer's line tracking.
    Reasoning

    sys.settrace installs a coverage/tracing hook in a __enter__ method, guarded for Python versions without sys.monitoring. Standard tracing for a testing tool.

  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.93 Removes the trace function on scope exit.
    Reasoning

    Pairs with the settrace install to remove the trace hook on exit. Benign.

  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 Hypothesis uses sys._getframe to locate the caller outside its own package.
    Reasoning

    Walks the call stack to find the first non-Hypothesis frame so error messages can point at user code. This is standard library-internal introspection with no network, file-write, or payload behaviour.

  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 Hypothesis walks the frame stack to record the location of a strategy definition.
    Reasoning

    Walks frames to record a source location for strategy reporting. The pattern is ordinary debugging/reporting support inside a testing library.

  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.70 Test helper invokes a CLI command through the shell via subprocess.run.
    Reasoning

    A test helper that runs a caller-supplied command string with shell=True. This is test-harness code for invoking the codemod CLI, not a dropper or hidden execution path, though shell=True with a variable command is a generic risk pattern.

  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 uses inspect.stack to verify stack depth in a recursive helper.
    Reasoning

    Test asserting the stack depth reported by inspect.stack matches expectations in a recursive function. Purely a unit test of the junkdrawer helper.

  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 Test evals the repr of a FeatureFlags object to check round-trip behaviour.
    Reasoning

    Round-trips a FeatureFlags object via repr and eval to check it reconstructs correctly. The eval input is the library's own repr output within a test.

  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 Test evals the repr of feature flags for a second round-trip check.
    Reasoning

    Same repr/eval round-trip pattern on a generated feature set. Benign test code operating on self-produced strings.

  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 reads the caller's frame to compute an expected file and line.
    Reasoning

    Uses currentframe().f_back to compute the expected source line of a calling function for an assertion. Standard test utility.

  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 Test evals pretty-printed regex code to verify round-tripping.
    Reasoning

    Evals pretty-printed regex output to check it reproduces the original pattern. This is a round-trip test of the library's own output.

  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 evals a repr string to compare float encodings.
    Reasoning

    Evals a repr string with a restricted namespace to compare float lexicographic encodings. Test code on controlled inputs.

  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 evals enum repr strings and checks pretty-printing reproduces them.
    Reasoning

    Evals parametrized enum representations and checks pretty output matches. Parametrized test data, not attacker input.

  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 evals a formatted hex string to check it parses back to the original.
    Reasoning

    Evals a formatted hexadecimal string to confirm it parses back to the original value. Benign round-trip assertion.

  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 extracts a reproduce_failure decorator from notes and evals it to replay a failure.
    Reasoning

    Evals a reproduce_failure decorator string extracted from test notes, which is Hypothesis's own format, then calls it. The base64/zlib plus eval combination matches the flagged shape, but here it is a deliberate, documented replay feature exercised in tests, with no external payload.

  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.85 Same eval of an extracted reproduce_failure string for replay testing.
    Reasoning

    Same eval of a reproduction decorator extracted from notes. Part of Hypothesis's replay feature under test, not a hidden dropper.

  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
    dismissed LLM, confidence 0.95 Test defines a lambda with a Greek letter in its name to test Unicode identifier handling.
    Reasoning

    A deliberately Unicode-named lambda that the test file exists to exercise. Mixed Latin and Greek is intentional test input, 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"
    dismissed LLM, confidence 0.95 Test references the Unicode-named lambda to check description output.
    Reasoning

    Same intentional Unicode identifier used in a test assertion. The file's purpose is Unicode identifier support.

  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.85 Recorded ghostwriter output text contains an eval call on a string.
    Reasoning

    A recorded prose/doc snapshot showing an eval call in ghostwriter output. Text fixture, not executed code, and the eval is a documented example.

  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 asserts that generated source code executes without error via exec.
    Reasoning

    Test file in Hypothesis ghostwriter suite; exec of generated source code to verify it is valid. The base64 import is incidental to the test module, not a decoding dropper.

  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.92 exec on expected generated source inside a unit test.
    Reasoning

    exec of generated test expectation source in a test; the expected string is a literal test fixture, so this is a deliberate code-validity check.

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

    Same test pattern: exec of generated expected source with a namespace for a test assertion.

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

    Same ghostwriter test verification pattern; no external input reaches exec.

  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.92 Test helper execs generated code and prints it on exception.
    Reasoning

    Helper in test suite that execs generated source to check it runs, printing on failure. Standard test technique.

  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.91 Test execs ghostwriter-generated source for a socket function.
    Reasoning

    Test executes output of ghostwriter.magic on a known module to confirm validity; no untrusted input.

  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.91 Test execs generated binary operation source.
    Reasoning

    Test execs ghostwriter-generated binary_operation source; benign test verification.

  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.91 Test execs generated source to check for NameErrors.
    Reasoning

    Test asserting generated code executes without NameError; benign.

  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.91 Test execs generated binary operation source.
    Reasoning

    Benign test of generated binary_operation source.

  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.91 Test execs generated binary operation source with explicit identity.
    Reasoning

    Benign test of generated binary_operation source with 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.91 Test execs generated source containing one_of.
    Reasoning

    Benign test executing generated source containing one_of.

  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.91 Test execs ufunc-generated source.
    Reasoning

    Benign test executing ufunc-generated source for numpy.isnan.

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

    Benign test executing ufunc-generated source with annotate.

  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 utility running a command string through the shell.
    Reasoning

    Test helper wrapping subprocess with shell=True for running the CLI in tests; cmd is supplied by test code, not external input. Shell=True with variable command is a common test pattern but worth noting.

  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 evals repr of a strategy to check round-trip stability.
    Reasoning

    Test evaluating repr of Hypothesis strategies to verify round-trip; eval input is the repr of a known strategy object in a 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.
    Reasoning

    Parametrized test evaluating sampled strategy reprs; 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 test helper calls eval on a function parameter to build an array for testing floor and ceil behavior.
    Reasoning

    The eval call sits in a test function that takes a parameter named value and builds a numpy array from it, which is a common test-harness pattern for parametrized inputs. Test files in a numerical library rarely need eval in a sensitive way, but the eval is on a test parameter, not on network data or decoded payloads, and the snippet shows no network, encoding, or shell activity. It is a poor practice worth a note but not evidence of malicious intent.

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