PyPI / pymongo / 4.19.0

pymongo 4.19.0

Source
https://github.com/mongodb/mongo-python-driver
Artifact scanned
pymongo-4.19.0.tar.gz (sdist · 2.6 MB · SHA-256 3c510dd3c5d9…)
Compared with
pymongo-4.18.3.tar.gz (11 signals introduced since)
Files
594 scanned, 1530 skipped (binary, oversized, or unrecognised)
Signals
2 critical · 1 warn · 68 info
Scan time
48.4 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 65 of 67 warn and critical signals; 64 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 11:18

Signals

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

  1. critical dynamic-execution .evergreen/resync-specs.sh:91:10 new in this release

    command name is a variable (`$PY`) and `PY` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)

        [ -n "$PY" ] || PY=python3
        [ "$("$PY" -c 'import sys; print(sys.version_info >= (3, 7))' 2>/dev/null)" = True ] \
            || { echo "Error: $PY is not Python 3.7+, which this conversion requires." >&2; return 1; }
        "$PY" - "$src" "$PYMONGO"/pymongo/public_suffix_list.dat <<'EOF'
  2. critical dynamic-execution .evergreen/resync-specs.sh:93:5 new in this release

    command name is a variable (`$PY`) and `PY` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)

            || { echo "Error: $PY is not Python 3.7+, which this conversion requires." >&2; return 1; }
        "$PY" - "$src" "$PYMONGO"/pymongo/public_suffix_list.dat <<'EOF'
    import os
    import sys
  3. warn hidden-llm-instruction .github/pull_request_template.md:9:1

    AI-directed instruction in a Markdown comment, which the page does not render (ast pass, confidence 0.75)

    We only accept pull requests that are authored and submitted by human contributors who fully understand the changes they are proposing. All contributions must be written and understood by human contributors.
    inconclusive LLM, confidence 0.50 A hidden Markdown comment states that PRs must be written and understood by humans.
    Reasoning

    The comment is a policy statement about human authorship, placed in an HTML comment that does not render. It may be aimed at AI-assisted submissions, which fits the hidden-instruction pattern, but the text is a harmless contributor policy and does not ask an AI to do anything harmful.

  4. info warn → info by review dynamic-import .evergreen/run-tests.sh:30:1 new in this release

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    # No-op on Evergreen (just.sh already ran this); needed for direct/local runs (PYTHON-6135).
    . $SCRIPT_DIR/scripts/setup-uv-python.sh
    
    # Start the test runner.
    likely benign LLM, confidence 0.80 Sources a repo-local script to set up uv and Python.
    Reasoning

    Sources setup-uv-python.sh from the repo's scripts directory; the comment explains its purpose for local runs.

  5. info warn → info by review dynamic-import .evergreen/scripts/install-dependencies.sh:73:5 new in this release

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      if [ -f "$DRIVERS_TOOLS/.evergreen/ensure-uv.sh" ]; then
        . "$DRIVERS_TOOLS/.evergreen/ensure-uv.sh"
        ensure_uv || exit 1
      fi
    likely benign LLM, confidence 0.75 Sources an ensure-uv helper from the drivers-tools checkout.
    Reasoning

    Sources ensure-uv.sh from DRIVERS_TOOLS, an external drivers-tools checkout provided by the CI environment. The path is variable, so trust depends on that checkout; it is a legitimate helper pattern.

  6. info warn → info by review dynamic-import .evergreen/scripts/install-dependencies.sh:84:5 new in this release

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      if [ -f $HERE/env.sh ]; then
        . $HERE/env.sh
      fi
    fi
    likely benign LLM, confidence 0.80 Conditionally sources a local env.sh in the install script.
    Reasoning

    Conditionally sources local env.sh from HERE; ordinary repo-local include.

  7. info critical → info by review dynamic-execution .evergreen/scripts/resync-all-specs.sh:40:8 new in this release

    command name is a variable (`$PY`) and `PY` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)

      [ -n "$PY" ] || PY=python3
      [ "$("$PY" -c 'import sys; print(sys.version_info >= (3, 7))' 2>/dev/null)" = True ] \
          || { echo "Error: $PY is not Python 3.7+, which resync-all-specs.py requires." >&2; exit 1; }
      "$PY" ./.evergreen/scripts/resync-all-specs.py --filename "$PR_DESC"
    likely benign LLM, confidence 0.80 Runs the resync Python script using a version-checked interpreter.
    Reasoning

    Interpreter selection via $PY with a version check, then runs a repo-local Python script to resync specs; no obfuscation or encoded payload.

  8. info critical → info by review dynamic-execution .evergreen/scripts/resync-all-specs.sh:42:3 new in this release

    command name is a variable (`$PY`) and `PY` is assigned the output of a command — executed command determined at runtime (ast pass, confidence 0.90)

          || { echo "Error: $PY is not Python 3.7+, which resync-all-specs.py requires." >&2; exit 1; }
      "$PY" ./.evergreen/scripts/resync-all-specs.py --filename "$PR_DESC"
      if [[ -f $PR_DESC ]]; then
        # changes were made -> call scrypt to create PR for us
    likely benign LLM, confidence 0.80 Executes the repository's spec resync Python script.
    Reasoning

    Runs the repo-local resync-all-specs.py with the chosen interpreter and a PR description file; standard maintenance automation.

  9. info warn → info by review dynamic-import .evergreen/scripts/setup-dev-env.sh:89:1 new in this release

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    # Handle the value for UV_PYTHON.
    . $HERE/setup-uv-python.sh
    
    # Only run the next part if not running on CI.
    likely benign LLM, confidence 0.90 Sources a sibling setup-uv-python.sh helper.
    Reasoning

    Sourcing setup-uv-python.sh from the script directory is the expected way to split out setup logic in the repository.

  10. info warn → info by review dynamic-execution .evergreen/scripts/setup-uv-python.sh:27:10 new in this release

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

      if [ -e "$_py" ] || [ -L "$_py" ]; then
        if ! "$_py" -c 'import sys' > /dev/null 2>&1; then
          echo "Removing broken .venv (its interpreter will not start); uv sync will recreate it."
          rm -rf "$ROOT/.venv"
    likely benign LLM, confidence 0.75 Runs a Python interpreter stored in $_py to test whether an existing .venv is functional.
    Reasoning

    The variable $_py is an interpreter path that the script checks for existence and then runs with a sanity import to detect a broken .venv. That is local environment repair, not a dropper. The variable is not set in this file, so some doubt remains about its origin.

  11. info warn → info by review dynamic-import .evergreen/scripts/setup-uv-python.sh:38:3 new in this release

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f "$HERE/env.sh" ]; then
      . "$HERE/env.sh"
    fi
    likely benign LLM, confidence 0.93 Conditionally sources env.sh from the script's directory.
    Reasoning

    Sourcing env.sh from $HERE with an existence check is ordinary build-script configuration loading.

  12. info warn → info by review dynamic-import .evergreen/scripts/setup-uv-python.sh:43:3 new in this release

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f "$HERE/test-env.sh" ]; then
      . "$HERE/test-env.sh"
    fi
    likely benign LLM, confidence 0.93 Conditionally sources test-env.sh from the script's directory.
    Reasoning

    Conditionally sourcing test-env.sh from the script's directory is routine setup code.

  13. info warn → info by review dynamic-import .evergreen/run-tests.sh:15:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing env inputs"
      . $SCRIPT_DIR/scripts/env.sh
    else
      echo "Not sourcing env inputs"
    likely benign LLM, confidence 0.80 Sources a repository-local environment setup script.
    Reasoning

    Sourcing env.sh via $SCRIPT_DIR is a standard CI helper include from the repository's own scripts directory; no remote or encoded input.

  14. info warn → info by review dynamic-import .evergreen/run-tests.sh:23:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing test inputs"
      . $SCRIPT_DIR/scripts/test-env.sh
    else
      echo "Missing test inputs, please run 'just setup-tests'"
    likely benign LLM, confidence 0.80 Sources a repository-local test environment script.
    Reasoning

    Sources a repo-local test-env.sh from SCRIPT_DIR, typical CI configuration loading.

  15. info warn → info by review dynamic-import .evergreen/scripts/check-import-time.sh:7:1

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    
    source $HERE/env.sh
    
    pushd $HERE/../.. >/dev/null
    likely benign LLM, confidence 0.80 Sources a sibling env.sh configuration script.
    Reasoning

    Sources env.sh relative to the script's own directory, standard repo-local CI helper pattern.

  16. info warn → info by review dynamic-import .evergreen/scripts/check-import-time.sh:15:1

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    # Set up the virtual env.
    . $HERE/setup-dev-env.sh
    uv venv --seed
    source .venv/bin/activate
    likely benign LLM, confidence 0.80 Sources a sibling setup script to create a dev environment.
    Reasoning

    Sources setup-dev-env.sh from the script's directory to set up a virtualenv; ordinary build tooling.

  17. info warn → info by review dynamic-import .evergreen/scripts/cleanup.sh:10:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing env file"
      source $HERE/env.sh
    fi
    likely benign LLM, confidence 0.80 Conditionally sources a local env.sh file during cleanup.
    Reasoning

    Conditionally sources env.sh from the script directory in a cleanup script; ordinary repo-local include.

  18. info warn → info by review dynamic-import .evergreen/scripts/configure-env.sh:72:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Reading $SCRIPT_DIR/env.sh file"
      . "$SCRIPT_DIR/env.sh"
      exit 0
    fi
    likely benign LLM, confidence 0.80 Sources a local env.sh to configure the environment.
    Reasoning

    Reads env.sh from SCRIPT_DIR, a repo-local configuration file; standard for CI scripts.

  19. info warn → info by review dynamic-import .evergreen/scripts/install-dependencies.sh:18:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f $HERE/env.sh ]; then
      . $HERE/env.sh
    fi
    likely benign LLM, confidence 0.80 Sources a local env.sh before installing dependencies.
    Reasoning

    Conditionally sources env.sh from HERE, repo-local; typical CI pattern.

  20. info warn → info by review dynamic-import .evergreen/scripts/run-getdata.sh:12:1

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    
    . ${DRIVERS_TOOLS}/.evergreen/get-distro.sh || true
    get_distro || true
    echo $DISTRO
    likely benign LLM, confidence 0.93 Sources get-distro.sh from a variable DRIVERS_TOOLS path in a CI script.
    Reasoning

    Sourcing a helper from DRIVERS_TOOLS, an environment-configured CI tools checkout, is ordinary Evergreen build plumbing. No encoding or obfuscation is involved.

  21. info warn → info by review dynamic-import .evergreen/scripts/run-server.sh:10:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing env file"
      source $HERE/env.sh
    fi
    likely benign LLM, confidence 0.93 Sources a sibling env.sh file located via $HERE.
    Reasoning

    Sourcing an env.sh that sits beside the script, via a path derived from the script's own directory, is a standard pattern in CI helper scripts.

  22. info warn → info by review dynamic-import .evergreen/scripts/setup-dev-env.sh:11:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f $HERE/env.sh ]; then
      . $HERE/env.sh
    fi
    likely benign LLM, confidence 0.93 Conditionally sources env.sh from the script's directory.
    Reasoning

    Conditionally sourcing an env.sh next to the script is a common dev-environment setup idiom and is guarded by an existence check.

  23. info warn → info by review dynamic-import .evergreen/scripts/setup-dev-env.sh:16:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f $HERE/test-env.sh ]; then
      . $HERE/test-env.sh
    fi
    likely benign LLM, confidence 0.93 Conditionally sources test-env.sh from the script's directory.
    Reasoning

    Conditionally sourcing test-env.sh from the script's directory is ordinary setup logic with an existence guard.

  24. info warn → info by review dynamic-import .evergreen/scripts/setup-dev-env.sh:85:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f $HERE/env.sh ]; then
      . $HERE/env.sh
    fi
    likely benign LLM, confidence 0.93 Conditionally sources env.sh again later in the same setup script.
    Reasoning

    This repeats the env.sh sourcing pattern found earlier in the same script, with an existence check. Nothing suggests malice.

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

    # Add 'server' and 'hostname_not_in_cert' as a hostnames
    echo "127.0.0.1 server" | $SUDO tee -a /etc/hosts
    echo "127.0.0.1 hostname_not_in_cert" | $SUDO tee -a /etc/hosts
  26. command name is a variable (`$SUDO`) that this file sets only to plain text (ast pass, confidence 0.40)

    echo "127.0.0.1 server" | $SUDO tee -a /etc/hosts
    echo "127.0.0.1 hostname_not_in_cert" | $SUDO tee -a /etc/hosts
    
    echo "Setting up system... done."
  27. info warn → info by review dynamic-import .evergreen/scripts/setup-tests.sh:21:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

    if [ -f $SCRIPT_DIR/env.sh ]; then
      source $SCRIPT_DIR/env.sh
    fi
    likely benign LLM, confidence 0.93 Conditionally sources env.sh from the script's directory.
    Reasoning

    Conditionally sourcing env.sh from SCRIPT_DIR is routine test setup with an existence guard.

  28. info warn → info by review dynamic-import .evergreen/scripts/stop-server.sh:12:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing env file"
      source $HERE/env.sh
    fi
    likely benign LLM, confidence 0.93 Sources env.sh from $HERE to load configuration before stopping a server.
    Reasoning

    Sourcing env.sh from the script directory to load settings for stopping the server is ordinary CI script behavior.

  29. info warn → info by review dynamic-import .evergreen/scripts/teardown-tests.sh:10:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing env inputs"
      . $SCRIPT_DIR/env.sh
    else
      echo "Not sourcing env inputs"
    likely benign LLM, confidence 0.93 Conditionally sources env.sh from SCRIPT_DIR during test teardown.
    Reasoning

    Sourcing env.sh from SCRIPT_DIR in a conditional branch is standard teardown configuration loading.

  30. info warn → info by review dynamic-import .evergreen/scripts/teardown-tests.sh:18:3

    `source` called with a dynamic path — sourcing a variable script path (ast pass, confidence 0.75)

      echo "Sourcing test inputs"
      . $SCRIPT_DIR/test-env.sh
    else
      echo "Missing test inputs, please run 'just setup-tests'"
    likely benign LLM, confidence 0.93 Conditionally sources test-env.sh from SCRIPT_DIR during teardown.
    Reasoning

    Sourcing test-env.sh from SCRIPT_DIR in a conditional branch is standard test-input loading.

  31. info identifier-low-length doc/_templates/layout.html:9:15

    [embedded javascript] 19 of 37 non-conventional identifiers are single-character (51%) (token pass, confidence 0.50)

  32. info warn → info by review decoder-decompress-payload pymongo/compression_support.py:200:14

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

    
            dc = zlib.decompressobj()
            # Bound the decompressed output during decompression to avoid
            # allocating a huge buffer before the size check runs.
    likely benign LLM, confidence 0.90 Uses zlib.decompressobj with bounded output to decompress wire-protocol compression.
    Reasoning

    zlib decompressobj with a bounded output size is standard, defensive handling of compressed MongoDB wire-protocol messages. The comment explicitly explains the size bounding, and there is no embedded payload.

  33. info warn → info by review decoder-import-with-exec test/asynchronous/test_client.py:1203:20

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

    
            async with eval(the_repr) as client_two:
                self.assertEqual(client_two, client)
    likely benign LLM, confidence 0.85 Test code uses eval on a client repr inside an async context manager.
    Reasoning

    The file imports base64 and calls eval on a repr string in a test. The eval is odd and unsafe-looking, but it is confined to a test fixture in a MongoDB driver's async test suite, with no sign of a decode-then-execute payload.

  34. info warn → info by review dynamic-execution test/asynchronous/test_client.py:1203:20

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

    
            async with eval(the_repr) as client_two:
                self.assertEqual(client_two, client)
    likely benign LLM, confidence 0.85 Test evaluates a client's repr to check round-trip construction.
    Reasoning

    eval of repr(client) in a test round-trips a MongoClient repr to verify it reconstructs an equal client; the input is the object's own repr, not untrusted data. Common test idiom.

  35. info warn → info by review dynamic-execution test/asynchronous/test_client.py:1224:20

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

    
            async with eval(the_repr) as client_two:
                self.assertEqual(client_two, client)
    likely benign LLM, confidence 0.85 Test evaluates a client's repr to verify reconstruction equality.
    Reasoning

    Same repr round-trip eval pattern as the other finding in this test file; benign test code.

  36. info warn → info by review payload-bytes-literal test/asynchronous/test_collection.py:1237:13

    concatenated bytes literal contains 336 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

            data = (
                b"a\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83"
                b"\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83"
                b"\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83"
    likely benign LLM, confidence 0.85 Test fixture bytes encoding repeated UTF-8 snowman characters.
    Reasoning

    Concatenated bytes literal of UTF-8 encoded snowman characters used as test data for a PyMongo/BSON test; this is a fixture of expected encoded bytes, not a hidden payload.

  37. info warn → info by review dynamic-execution test/asynchronous/test_connection_monitoring.py:432:19

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

        def assertRepr(self, obj):
            new_obj = eval(repr(obj))
            self.assertEqual(type(new_obj), type(obj))
            self.assertEqual(repr(new_obj), repr(obj))
    likely benign LLM, confidence 0.85 Test helper evaluates an object's repr to check round-trip fidelity.
    Reasoning

    eval(repr(obj)) in an assertRepr test helper round-trips an object's repr to check type and repr equality. Input is the test's own objects; benign.

  38. info warn → info by review encoding-base64 test/asynchronous/test_encryption.py:1514:14

    base64-like blob (112 bytes, compression ratio 0.98) (raw pass, confidence 0.60)

            return await self._test_explicit(
                "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ=="
            )
    likely benign LLM, confidence 0.90 Base64 ciphertext test vector for client-side encryption tests.
    Reasoning

    Base64 string is a BSON Queryable Encryption test vector (binary subtype 6 ciphertext) passed to a test helper; expected test data in a driver test suite.

  39. info warn → info by review encoding-base64 test/asynchronous/test_encryption.py:1522:28

    base64-like blob (112 bytes, compression ratio 0.98) (raw pass, confidence 0.60)

                "$binary": {
                    "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==",
                    "subType": "06"}
            }}"""
    likely benign LLM, confidence 0.90 Base64 binary test vector within extended JSON for encryption tests.
    Reasoning

    Same base64 encrypted-BSON test vector embedded in extended JSON for an encryption test; legitimate fixture.

  40. info warn → info by review encoding-base64 test/asynchronous/test_encryption.py:1539:14

    base64-like blob (112 bytes, compression ratio 0.93) (raw pass, confidence 0.60)

            return await self._test_explicit(
                "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg=="
            )
    likely benign LLM, confidence 0.90 Base64 ciphertext test vector for explicit encryption tests.
    Reasoning

    Another base64 encryption test vector of the same kind, used in explicit encryption tests; benign fixture.

  41. info warn → info by review encoding-base64 test/asynchronous/test_encryption.py:1547:28

    base64-like blob (112 bytes, compression ratio 0.93) (raw pass, confidence 0.60)

                "$binary": {
                    "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==",
                    "subType": "06"}
            }}"""
    likely benign LLM, confidence 0.90 Base64 binary test vector in extended JSON for encryption tests.
    Reasoning

    Base64 binary test vector within extended JSON for encryption tests, matching the pattern of other fixtures in the file; benign.

  42. info warn → info by review payload-bytes-literal test/asynchronous/test_raw_bson.py:120:13

    concatenated bytes literal contains 41 `\xNN` escapes (85% of content) — binary payload shape (ast pass, confidence 0.85)

            bson_string = (
                b"D\x00\x00\x00\x04embedded\x005\x00\x00\x00\x030\x00-\x00\x00\x00"
                b"\tdate\x00\x8a\xd6\xb9\xbaM\x01\x00\x00\x05_id\x00\x10\x00\x00"
                b"\x00\x03eI_\x97\x8f\xabo\x02\xff`L\x87\xad\x85\xbf\x9f\x00\x00"
    likely benign LLM, confidence 0.85 Raw BSON document bytes used as test input.
    Reasoning

    Bytes literal is a hand-written BSON document used to test raw BSON decoding; expected for a BSON library's test suite.

  43. info warn → info by review encoding-base64 test/helpers_shared.py:87:7

    base64-like blob (71 bytes, compression ratio 1.15) (raw pass, confidence 0.60)

    LOCAL_MASTER_KEY = base64.b64decode(
        b"Mng0NCt4ZHVUYUJCa1kxNkVyNUR1QURhZ2h2UzR2d2RrZzh0cFBwM3R6NmdWMDFBMUN3YkQ"
        b"5aXRRMkhGRGdQV09wOGVNYUMxT2k3NjZKelhaQmRCZGJkTXVyZG9uSjFk"
    )
    likely benign LLM, confidence 0.85 Test-only base64 master key for encryption test helpers.
    Reasoning

    Base64 string decodes to a test master key for client-side encryption tests; a fixture key in a test helper. Not a real secret, and the decoded content is only used locally in tests.

  44. info dynamic-execution test/lambda/build_internal.sh:5:1

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

    PYTHON=/opt/python/cp310-cp310/bin/python
    $PYTHON -m pip install -v -e .
  45. info warn → info by review payload-bytes-literal test/test_bson.py:308:17

    concatenated bytes literal contains 32 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

                decode_all(
                    b"\x1b\x00\x00\x00\x0e\x74\x65\x73\x74"
                    b"\x00\x0c\x00\x00\x00\x68\x65\x6c\x6c"
                    b"\x6f\x20\x77\x6f\x72\x6c\x64\x00\x00"
    likely benign LLM, confidence 0.90 BSON-encoded test document bytes for decode_all.
    Reasoning

    Bytes literal encodes a small BSON document 'hello world' for decode_all tests; standard BSON test fixture.

  46. info warn → info by review payload-bytes-literal test/test_bson.py:318:21

    concatenated bytes literal contains 32 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

                    decode_iter(
                        b"\x1b\x00\x00\x00\x0e\x74\x65\x73\x74"
                        b"\x00\x0c\x00\x00\x00\x68\x65\x6c\x6c"
                        b"\x6f\x20\x77\x6f\x72\x6c\x64\x00\x00"
    likely benign LLM, confidence 0.90 BSON test fixture bytes for decode_iter.
    Reasoning

    Same BSON 'hello world' fixture passed to decode_iter in a test; benign.

  47. info warn → info by review payload-bytes-literal test/test_bson.py:330:25

    concatenated bytes literal contains 32 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

                        BytesIO(
                            b"\x1b\x00\x00\x00\x0e\x74\x65\x73\x74"
                            b"\x00\x0c\x00\x00\x00\x68\x65\x6c\x6c"
                            b"\x6f\x20\x77\x6f\x72\x6c\x64\x00\x00"
    likely benign LLM, confidence 0.90 BSON test fixture bytes wrapped in BytesIO.
    Reasoning

    Same BSON test fixture wrapped in BytesIO for decoding tests; benign.

  48. info warn → info by review payload-bytes-literal test/test_bson.py:377:17

    concatenated bytes literal contains 32 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

                (
                    b"\x1a\x00\x00\x00\x0e\x74\x65\x73\x74"
                    b"\x00\x0c\x00\x00\x00\x68\x65\x6c\x6c"
                    b"\x6f\x20\x77\x6f\x72\x6c\x64\x00\x00"
    likely benign LLM, confidence 0.93 Concatenated BSON byte-string test vector in the bson test suite.
    Reasoning

    The bytes literal is a hand-written BSON encoding of a small document with a 'test' key and 'hello world' value, the kind of fixture a BSON library's test suite uses to check its decoder. It is test data, not a payload.

  49. info warn → info by review payload-bytes-literal test/test_bson.py:392:17

    concatenated bytes literal contains 32 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

                (
                    b"\x1b\x00\x00\x00\x0e\x74\x65\x73\x74"
                    b"\x00\x0c\x00\x00\x00\x68\x65\x6c\x6c"
                    b"\x6f\x20\x77\x6f\x72\x6c\x64\x00\x00"
    likely benign LLM, confidence 0.93 Second BSON byte-vector fixture in the bson test suite.
    Reasoning

    Same structure as the neighbouring fixture, a BSON-encoded document used as expected input for a decode or encode assertion in a test. Nothing executes it.

  50. info warn → info by review payload-bytes-literal test/test_bson.py:658:13

    concatenated bytes literal contains 33 `\xNN` escapes (90% of content) — binary payload shape (ast pass, confidence 0.85)

                encode({"ref": DBRef("coll", a)}),
                b"\x2f\x00\x00\x00\x03ref\x00\x25\x00\x00\x00\x02"
                b"$ref\x00\x05\x00\x00\x00coll\x00\x07$id\x00\x00"
                b"\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x00"
    likely benign LLM, confidence 0.93 BSON DBRef encoding fixture used as expected output in a test.
    Reasoning

    A BSON-encoded DBRef document (collection 'coll', ObjectId bytes 01..0b) used as the expected encoding for a DBRef round-trip test. This is a standard test fixture.

  51. info warn → info by review decoder-import-with-exec test/test_bson.py:980:19

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

        def assertRepr(self, obj):
            new_obj = eval(repr(obj))
            self.assertEqual(type(new_obj), type(obj))
            self.assertEqual(repr(new_obj), repr(obj))
    likely benign LLM, confidence 0.90 Test helper that checks an object's repr round-trips through eval.
    Reasoning

    assertRepr evals repr(obj) of an object the test itself constructed to check that its repr round-trips. The input is locally produced, not external, and the pickle import is only incidental to the test module.

  52. info warn → info by review dynamic-execution test/test_bson.py:980:19

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

        def assertRepr(self, obj):
            new_obj = eval(repr(obj))
            self.assertEqual(type(new_obj), type(obj))
            self.assertEqual(repr(new_obj), repr(obj))
    likely benign LLM, confidence 0.90 eval of repr output in an assertion helper for round-trip testing.
    Reasoning

    eval(repr(obj)) inside assertRepr is a deliberate repr round-trip check on a test-constructed object. The argument is the output of repr on trusted local data.

  53. info warn → info by review payload-bytes-literal test/test_bson.py:1138:13

    concatenated bytes literal contains 33 `\xNN` escapes (92% of content) — binary payload shape (ast pass, confidence 0.85)

            self.assertEqual(
                b"\x2c\x00\x00\x00"
                b"\x02_id\x00\x02\x00\x00\x00b\x00"
                b"\x03b\x00"
    likely benign LLM, confidence 0.93 BSON byte-string fixture in an assertEqual in the bson test suite.
    Reasoning

    A BSON byte fixture (an _id field plus a short string, or similar) passed to assertEqual as expected bytes in a codec test. It is test data.

  54. info warn → info by review dynamic-execution test/test_bson.py:1481:18

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

            self.assertEqual(
                repr(eval(repr(tz))), "FixedOffset(datetime.timedelta(seconds=2520), 'forty-two')"
            )
    likely benign LLM, confidence 0.90 Round-trip eval of a timezone repr in a test assertion.
    Reasoning

    eval(repr(tz)) round-trips a locally constructed FixedOffset tzinfo object and compares the result to its expected repr string. This is a repr-stability test on local data.

  55. info warn → info by review payload-bytes-literal test/test_bson.py:1602:13

    concatenated bytes literal contains 36 `\xNN` escapes (62% of content) — binary payload shape (ast pass, confidence 0.85)

            pickled_with_3 = (
                b"\x80\x04\x95q\x00\x00\x00\x00\x00\x00\x00\x8c\n"
                b"bson.dbref\x94\x8c\x05DBRef\x94\x93\x94)\x81\x94}"
                b"\x94(\x8c\x12_DBRef__collection\x94\x8c\x03foo\x94"
    likely benign LLM, confidence 0.88 Pickled DBRef byte fixture for backward-compatibility testing.
    Reasoning

    The bytes are a pickle protocol-4 stream for a bson.dbref.DBRef object, used as a fixture to verify that old pickles still unpickle correctly. Pickle fixtures are normal in serialization tests, and this one does not execute anything by itself.

  56. info warn → info by review payload-bytes-literal test/test_bson.py:1612:13

    concatenated bytes literal contains 43 `\xNN` escapes (63% of content) — binary payload shape (ast pass, confidence 0.85)

            pickled_with_3 = (
                b"\x80\x04\x95\x81\x00\x00\x00\x00\x00\x00\x00\x8c"
                b"\nbson.dbref\x94\x8c\x05DBRef\x94\x93\x94)\x81\x94}"
                b"\x94(\x8c\x12_DBRef__collection\x94\x8c\x03foo\x94"
    likely benign LLM, confidence 0.88 Second pickled DBRef fixture for compatibility testing.
    Reasoning

    Another pickle protocol-4 fixture for bson.dbref.DBRef, used as test input for unpickling compatibility. It is test data.

  57. info warn → info by review dynamic-execution test/test_bson.py:1989:30

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

                obj = DatetimeMS(value)
                self.assertEqual(eval(repr(obj)), obj)
    
        def test_datetime_ms_invalid_type(self):
    likely benign LLM, confidence 0.90 Repr round-trip eval for DatetimeMS in a test.
    Reasoning

    eval(repr(obj)) on a DatetimeMS value the test just constructed, checking that the repr round-trips. The input is trusted and local.

  58. info warn → info by review decoder-import-with-exec test/test_client.py:1174:14

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

    
            with eval(the_repr) as client_two:
                self.assertEqual(client_two, client)
    likely benign LLM, confidence 0.90 Test evaluates a client repr to check round-tripping.
    Reasoning

    eval(the_repr) reconstructs a MongoClient from its own repr to check that the repr round-trips, and the result is used as a context manager. The repr is produced locally by the test, so no untrusted input reaches eval.

  59. info warn → info by review dynamic-execution test/test_client.py:1174:14

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

    
            with eval(the_repr) as client_two:
                self.assertEqual(client_two, client)
    likely benign LLM, confidence 0.90 Dynamic eval of a client repr string inside a round-trip test.
    Reasoning

    Same eval(the_repr) round-trip of a locally generated client repr in a test. No external input.

  60. info warn → info by review dynamic-execution test/test_client.py:1195:14

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

    
            with eval(the_repr) as client_two:
                self.assertEqual(client_two, client)
    likely benign LLM, confidence 0.90 Second round-trip eval of a client repr in a test.
    Reasoning

    Repeats the same eval(the_repr) round-trip pattern on a locally produced repr in another test. It is benign.

  61. info warn → info by review payload-bytes-literal test/test_collection.py:1223:13

    concatenated bytes literal contains 336 `\xNN` escapes (100% of content) — binary payload shape (ast pass, confidence 0.85)

            data = (
                b"a\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83"
                b"\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83"
                b"\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83\xe2\x98\x83"
    likely benign LLM, confidence 0.93 UTF-8 encoded snowman character test data in a collection test.
    Reasoning

    The bytes literal is a UTF-8 snowman (\xe2\x98\x83) repeated to build a Unicode test string, used to check encoding and size handling. It is an ordinary test fixture.

  62. info warn → info by review decoder-decompress-payload test/test_compression_support.py:172:26

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

            compressed = ctx.compress(data)
            self.assertEqual(zlib.decompress(compressed), data)
    dismissed LLM, confidence 0.95 Test round-trips data through zlib compress and decompress to verify the compression context.
    Reasoning

    zlib.decompress on data the test itself just compressed with ctx.compress; a round-trip assertion in a compression test suite, not a runtime payload.

  63. info warn → info by review dynamic-execution test/test_connection_monitoring.py:430:19

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

        def assertRepr(self, obj):
            new_obj = eval(repr(obj))
            self.assertEqual(type(new_obj), type(obj))
            self.assertEqual(repr(new_obj), repr(obj))
    dismissed LLM, confidence 0.95 Test helper evaluates repr of a test object to verify round-trip representation.
    Reasoning

    eval(repr(obj)) in a test helper checks that a BSON/PyMongo object's repr round-trips; the input is the test's own object, not attacker data.

  64. info warn → info by review encoding-base64 test/test_encryption.py:1508:14

    base64-like blob (112 bytes, compression ratio 0.98) (raw pass, confidence 0.60)

            return self._test_explicit(
                "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ=="
            )
    dismissed LLM, confidence 0.93 Base64 test fixture for an encrypted BSON binary value.
    Reasoning

    Base64 string is a Queryable Encryption/CSFLE test vector with a binary subtype header; expected for MongoDB encryption tests.

  65. info warn → info by review encoding-base64 test/test_encryption.py:1516:28

    base64-like blob (112 bytes, compression ratio 0.98) (raw pass, confidence 0.60)

                "$binary": {
                    "base64": "AQGVERPgAAAAAAAAAAAAAAAC5DbBSwPwfSlBrDtRuglvNvCXD1KzDuCKY2P+4bRFtHDjpTOE2XuytPAUaAbXf1orsPq59PVZmsbTZbt2CB8qaQ==",
                    "subType": "06"}
            }}"""
    dismissed LLM, confidence 0.93 Extended JSON binary fixture for encryption test vectors.
    Reasoning

    Same base64 test vector embedded in extended JSON ($binary with subType 06) for encryption tests; legitimate fixture data.

  66. info warn → info by review encoding-base64 test/test_encryption.py:1533:14

    base64-like blob (112 bytes, compression ratio 0.93) (raw pass, confidence 0.60)

            return self._test_explicit(
                "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg=="
            )
    dismissed LLM, confidence 0.93 Base64 encryption test vector fixture.
    Reasoning

    Another encryption test vector in base64 with a fixed structure typical of MongoDB client-side encryption fixtures.

  67. info warn → info by review encoding-base64 test/test_encryption.py:1541:28

    base64-like blob (112 bytes, compression ratio 0.93) (raw pass, confidence 0.60)

                "$binary": {
                    "base64": "ARgj/gAAAAAAAAAAAAAAAAACwFd+Y5Ojw45GUXNvbcIpN9YkRdoHDHkR4kssdn0tIMKlDQOLFkWFY9X07IRlXsxPD8DcTiKnl6XINK28vhcGlg==",
                    "subType": "06"}
            }}"""
    dismissed LLM, confidence 0.93 Extended JSON binary test fixture for encryption.
    Reasoning

    Duplicate of the extended JSON $binary fixture pattern used in MongoDB encryption tests; benign test data.

  68. info warn → info by review dynamic-execution test/test_operations.py:30:19

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

        def assertRepr(self, obj):
            new_obj = eval(repr(obj))
            self.assertEqual(type(new_obj), type(obj))
            self.assertEqual(repr(new_obj), repr(obj))
    dismissed LLM, confidence 0.93 Test helper using eval on repr of a test object to check round-trip.
    Reasoning

    Same assertRepr helper in the PyMongo test suite evaluating repr of test objects; no external input reaches eval.

  69. info warn → info by review payload-bytes-literal test/test_raw_bson.py:120:13

    concatenated bytes literal contains 41 `\xNN` escapes (85% of content) — binary payload shape (ast pass, confidence 0.85)

            bson_string = (
                b"D\x00\x00\x00\x04embedded\x005\x00\x00\x00\x030\x00-\x00\x00\x00"
                b"\tdate\x00\x8a\xd6\xb9\xbaM\x01\x00\x00\x05_id\x00\x10\x00\x00"
                b"\x00\x03eI_\x97\x8f\xabo\x02\xff`L\x87\xad\x85\xbf\x9f\x00\x00"
    dismissed LLM, confidence 0.93 Raw BSON byte-string test vector.
    Reasoning

    Hand-written BSON byte literal with \x escapes encoding a document for raw BSON tests; binary escapes are expected for BSON test vectors.

  70. info warn → info by review payload-bytes-literal test/test_raw_bson_shared.py:38:5

    concatenated bytes literal contains 37 `\xNN` escapes (73% of content) — binary payload shape (ast pass, confidence 0.85)

    TEST_RAW_BSON = (
        b"Z\x00\x00\x00\x07_id\x00Um\xf6\x8bn2\xab!\xa9^\x07\x85\x02name\x00\t"
        b"\x00\x00\x00Sherlock\x00\x04addresses\x00&\x00\x00\x00\x030\x00\x1e"
        b"\x00\x00\x00\x02street\x00\r\x00\x00\x00Baker Street\x00\x00\x00\x00"
    dismissed LLM, confidence 0.93 Shared raw BSON byte fixture for tests.
    Reasoning

    Shared raw BSON test fixture with recognizable BSON structure (field names, lengths); legitimate test data.

  71. info warn → info by review dynamic-execution test/test_write_concern.py:72:19

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

        def assertRepr(self, obj):
            new_obj = eval(repr(obj))
            self.assertEqual(type(new_obj), type(obj))
            self.assertEqual(repr(new_obj), repr(obj))
    dismissed LLM, confidence 0.93 Test helper evaluating repr of a test object for round-trip checking.
    Reasoning

    Repeated assertRepr eval(repr(obj)) test helper in the test suite; the input is a locally constructed object.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. 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.3.0
curl -fsSL -o pymongo-4.19.0.tar.gz https://files.pythonhosted.org/packages/42/8b/a9d214044153cb7d9141229d3e1b171cdf4f460fa07cade9354c4ce2f84d/pymongo-4.19.0.tar.gz
printf '%s  %s\n' 3c510dd3c5d9b392d3b33bb5d2a594758acfe8f026fca654253f947ce0af9d40 pymongo-4.19.0.tar.gz | shasum -a 256 -c -
mkdir pkg && tar -xzf pymongo-4.19.0.tar.gz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg