pydantic 2.14.1
- Source
- https://github.com/pydantic/pydantic
- Tag scanned
v2.14.1- Compared with
v2.14.0(0 signals introduced since)- Files
- 708 scanned, 101 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 23 info
- Scan time
- 13.3 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 15 of 15 warn and critical signals; 15 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-14 18:11
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
# Install Rust |likely benign Installs Rust via the official rustup curl-to-shell installer in a docs build script.Reasoning
The script pipes the official rustup installer from sh.rustup.rs into sh, a known but widely used bootstrap pattern. The URL is the vendor's own, the command enforces TLS 1.2+, and it sits in a docs build script. The risk is the unverified curl-to-shell pattern, not evidence of malicious intent.
-
| # Install uvlikely benign Sources the cargo environment file after installing Rust.Reasoning
The sourced path is $HOME/.cargo/env, the standard file the rustup installer creates. The variable is the user's home directory, so this is an ordinary environment setup step.
-
# Install uv |likely benign Installs uv via the official astral.sh curl-to-shell installer.Reasoning
This is the official astral.sh uv installer piped to sh, a standard install method. It is a supply-chain trust decision rather than obfuscation, and the surrounding script is a normal build setup.
-
# https://pre-commit.com/#install |likely benign Contributor docs show installing uv via the official curl-to-shell script.Reasoning
This is an embedded install instruction in contributor documentation, pointing to the same official uv installer and linked to pre-commit's docs. It is documentation, not executed code in the project.
-
= b = b = b assert ==dismissed Test fixture containing base64-encoded bytes used to verify JSON serialization.Reasoning
The blob is a base64 encoding of 32 bytes of random-looking test data, shown alongside its standard and URL-safe encoded forms and used in an assertion comparing to_json output. This is a unit test fixture for bytes_mode='base64', not a payload.
-
), , ], ) -
), , ], ) -
-
let buffer = await blob.; return ; } } -
= = returnlikely benign Lazy submodule loader that caches imported attributes into module globals.Reasoning
This is the standard lazy-loading pattern in pydantic's module __getattr__: it imports a submodule by name and caches it in globals(). It is a common, legitimate Python idiom for deferred imports.
-
=likely benign Uses inspect.currentframe to walk frames while extracting class docs.Reasoning
Walking the call stack with inspect.currentframe is how pydantic extracts source docstrings for class fields. This is expected introspection in a validation library.
-
=likely benign Fetches a caller frame to resolve the generic parameterization context.Reasoning
sys._getframe(depth) is used to find the caller's module for generic parameter resolution, with a proper ValueError guard. This is standard internal machinery in pydantic's generics code.
-
""" frame = sys._getframe(parent_depth) if frame.f_code.co_name.startswith('<generic parameters of'):likely benign Reads a parent stack frame to detect generic parameter scopes.Reasoning
Reads a parent frame to detect generic-parameter scopes and namespaces. This is a typical type-resolution technique, with no code execution or exfiltration.
-
= =likely benign Reads the caller frame's module name when __module__ is unset.Reasoning
When __module__ is not given, the code takes the caller's __name__ from frame globals. This is a common way to set a class's module, and it reads only metadata.
-
= # Because `TypeAdapter` is generic, explicitly parametrizing the class resultslikely benign Fetches the parent frame to resolve TypeAdapter namespaces.Reasoning
Fetches the parent frame to resolve the namespace of a TypeAdapter, with a typing-module check. This is expected behavior for namespace resolution in pydantic.
-
# and so we skip the globalns = get_module_ns_of(typ) call that would normally happen = . =likely benign Reads the caller's globals to build a namespace resolver.Reasoning
Takes the caller's f_globals as a namespace, with a bounded depth and a comment explaining the logic. It is internal namespace resolution and nothing more.
-
=likely benign Fetches a caller frame to resolve generic parameters in pydantic v1.Reasoning
This is the same caller-frame lookup used for generics in pydantic v1, with a ValueError guard. It is standard, legitimate library internals.
-
assert .. is Nonelikely benign Test helper executes generated model source to verify docstring extraction behavior.Reasoning
This is a pydantic test that execs a source string built in the test to define a model and then checks the resulting class's field description. The exec is on test-generated source with explicit namespace dicts, which is a common pattern for testing docstring extraction. No network, shell, or encoded payload is visible.
-
, , , , -
-
, , , ), -
, , ), -
""" exec(code, {'bar': 'baz'})likely benign Test code executes a small snippet in a controlled namespace to exercise plugin behavior.Reasoning
The exec runs a code string with a restricted globals dict {'bar': 'baz'} inside a test that checks plugin behavior. This is test scaffolding for exercising plugin or validation behavior with controlled inputs, with no evident malicious indicators in the snippet.
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.
&&