PyPI / pymongo / 4.19.0

pymongo 4.19.0

Source
https://github.com/mongodb/mongo-python-driver
Tag scanned
4.19.0
Compared with
4.18.3 (0 signals introduced since)
Files
526 scanned, 1516 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 40 info
Scan time
24.3 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 39 of 39 warn and critical signals; 39 demoted to info.
Disclude version
4.0.0
Scanned (UTC)
2026-10-15 09:26

Signals

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

  1. 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 zlib decompressobj used to decompress MongoDB wire messages with a size bound.
    Reasoning

    This is the standard zlib decompressobj used for MongoDB wire-protocol compression with a bounded output size. It is a legitimate decompression of network data, not an embedded payload.

  2. 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.93 Test evaluates a client repr string to check round-trip equality.
    Reasoning

    eval on repr of a MongoClient in a test to verify round-tripping of repr. The base64 import co-occurrence is incidental. Test-only, no obfuscation.

  3. 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.93 Test evaluates self-generated repr of a client object.
    Reasoning

    Same eval(the_repr) round-trip test pattern; the argument is a repr generated by the test itself, not attacker-controlled input.

  4. 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.93 Test evaluates self-generated repr of a client object.
    Reasoning

    Same repr round-trip eval in a test helper; no external input reaches it.

  5. 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.92 Test fixture bytes literal encoding UTF-8 snowman characters.
    Reasoning

    A bytes literal of UTF-8 encoded snowman characters used as test data for unicode handling. Expected test fixture content.

  6. 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.93 Test helper evaluates repr of an object to verify round-tripping.
    Reasoning

    eval(repr(obj)) in an assertion helper checks repr round-tripping of driver objects in tests. Input is internally generated.

  7. 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 explicit encryption tests.
    Reasoning

    A base64 string is a ciphertext test vector for client-side field-level encryption (subType 06 binary), a standard fixture in driver tests.

  8. 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.92 Base64 encrypted binary test vector in extended JSON.
    Reasoning

    Same base64 encrypted-value test vector embedded in extended JSON for encryption tests.

  9. 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 ciphertext test vector for explicit encryption, consistent with the surrounding test cases.

  10. 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.92 Base64 encrypted binary test vector in extended JSON.
    Reasoning

    Base64 encrypted binary test vector in extended JSON, matching the pattern of the other encryption fixtures.

  11. 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.90 Raw BSON byte fixture for testing embedded document decoding.
    Reasoning

    A hand-built BSON byte sequence used to test raw BSON decoding; the bytes are a well-formed document structure, consistent with a BSON test.

  12. 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.90 Base64-encoded local master key used by encryption test helpers.
    Reasoning

    A base64-encoded test master key for client-side encryption tests, decoded at import. Test key material, not a malicious payload.

  13. 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 .
  14. 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.92 BSON byte fixture for decode_all test with a hello world document.
    Reasoning

    A BSON byte literal encoding a simple document with a 'hello world' string, passed to decode_all in a BSON test. Standard test data.

  15. 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.95 Test fixture of a BSON-encoded document as a bytes literal.
    Reasoning

    This is the PyMongo BSON test suite; the bytes literals are hand-written BSON wire-format fixtures used to test decode_iter. The hex escapes are the expected format for binary test vectors, not obfuscation.

  16. 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.95 BSON binary test vector wrapped in BytesIO.
    Reasoning

    Same BSON wire-format test fixture passed to BytesIO for decoding tests in a BSON library's test suite.

  17. 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.95 BSON binary fixture in a decoding test.
    Reasoning

    BSON test vector in the bson library's own test file; the escapes encode a length-prefixed document with a string field, consistent with a serialization test.

  18. 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.95 BSON binary fixture in a decoding test.
    Reasoning

    Identical BSON wire-format fixture pattern in the library's tests; expected for binary-format testing.

  19. 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.95 BSON DBRef binary fixture for an encoding test.
    Reasoning

    Hand-built BSON bytes encoding a DBRef document, used to verify encoding output in the bson test suite. Legitimate test data.

  20. 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.93 Round-trip repr test helper using eval on the object's repr.
    Reasoning

    assertRepr evaluates repr(obj) in a test to verify round-tripping of objects. The eval input is the object's own repr, not external data. Benign test idiom.

  21. 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.93 eval of repr(obj) in a repr round-trip test.
    Reasoning

    Same assertRepr helper; eval is applied to repr of a test object for a round-trip check. No untrusted input.

  22. 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.95 BSON binary fixture in a test assertion.
    Reasoning

    BSON wire-format fixture used in an assertEqual comparison in the library test suite.

  23. 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.93 Round-trip eval of a tzinfo repr in a test.
    Reasoning

    Test asserts repr of eval(repr(tz)) for a FixedOffset tzinfo; round-trip repr check on a local object.

  24. 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.90 Pickled DBRef fixture for compatibility testing.
    Reasoning

    Bytes literal beginning with 0x80 0x04 (pickle protocol 4 header) containing a pickled DBRef, used to test unpickling compatibility in the bson test suite. Test fixture, not a live payload.

  25. 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.90 Pickled DBRef bytes fixture for unpickle tests.
    Reasoning

    Pickle protocol fixture with embedded DBRef class reference, used in the library's pickling tests. Expected test data.

  26. 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.93 eval of repr(obj) to verify DatetimeMS round-trip.
    Reasoning

    Test evaluates repr of a DatetimeMS object and compares it back for equality. Local round-trip check with no external input.

  27. 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 eval of a client repr string in a round-trip test.
    Reasoning

    Test evaluates the repr of a MongoClient to rebuild and compare a client. The 'base64' import flag is a spurious decoder match; the eval input is the locally generated repr. Benign test code.

  28. 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 eval of client repr in a round-trip test.
    Reasoning

    Same eval of a locally generated repr in a PyMongo client test; no untrusted input reaches eval.

  29. 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 eval of a client repr string in a PyMongo test checking that the repr round-trips.
    Reasoning

    The eval is applied to repr(client) in a repr round-trip assertion inside a test suite. The input is the library's own repr output, not attacker-controlled data, so this is a legitimate test pattern.

  30. 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.90 Test fixture of UTF-8 encoded bytes in a PyMongo collection test.
    Reasoning

    The bytes literal is a UTF-8 encoding of snowman characters used as test data for string and bytes handling. Escaped bytes in a test fixture are expected and do not indicate a hidden payload.

  31. 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)
    likely benign LLM, confidence 0.90 zlib round-trip assertion in a compression support test.
    Reasoning

    The test compresses data with a context and then decompresses it with zlib to verify the round trip. The decompressed content is the test's own data, not a runtime-loaded payload.

  32. 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))
    likely benign LLM, confidence 0.90 Test helper that evals repr(obj) to check round-tripping of BSON or client objects.
    Reasoning

    This is the same repr round-trip helper used across PyMongo tests. It evals the repr of a library object the test created, so the input is not untrusted.

  33. 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=="
            )
    likely benign LLM, confidence 0.92 Base64 ciphertext test vector in a PyMongo encryption test.
    Reasoning

    The base64 string is a client-side encryption test vector, and the surrounding code is an explicit-encryption test. Its high entropy is expected for ciphertext in a test fixture.

  34. 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"}
            }}"""
    likely benign LLM, confidence 0.92 Extended-JSON $binary test vector containing base64 ciphertext.
    Reasoning

    This is the same base64 encrypted-value test vector embedded in extended JSON with a $binary wrapper. It is a standard test fixture.

  35. 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=="
            )
    likely benign LLM, confidence 0.92 Base64 encrypted-value test vector in a PyMongo encryption test.
    Reasoning

    This is another base64 ciphertext test vector for explicit encryption tests, consistent with the rest of the encryption test suite.

  36. 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"}
            }}"""
    likely benign LLM, confidence 0.92 Extended-JSON $binary test vector containing base64 ciphertext.
    Reasoning

    This is the extended-JSON $binary form of the preceding base64 test vector, used as a fixture in the encryption tests.

  37. 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))
    likely benign LLM, confidence 0.90 Test helper using eval(repr(obj)) to verify round-tripping.
    Reasoning

    The eval is applied to repr(obj) inside a test helper that checks the repr round-trip. It is a standard test pattern on the library's own objects.

  38. 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"
    likely benign LLM, confidence 0.90 BSON binary test fixture in a raw BSON test.
    Reasoning

    The bytes literal is a hand-written BSON document used as a test fixture for raw BSON decoding. Escaped binary is the normal way to express BSON test data.

  39. 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"
    likely benign LLM, confidence 0.90 Shared BSON document fixture in PyMongo tests.
    Reasoning

    This is a shared raw BSON test fixture containing an encoded document with a name and address. It is expected test data for the BSON library.

  40. 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))
    likely benign LLM, confidence 0.90 Test helper using eval(repr(obj)) to verify write concern object repr round-tripping.
    Reasoning

    The eval of repr(obj) is the same round-trip test helper used throughout the PyMongo suite, operating on library objects.

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/mongodb/mongo-python-driver mongo-python-driver && cd mongo-python-driver
git checkout 4.19.0
disclude scan --severity info --diff 4.18.3 .