wrapt 2.5.2rc1
- Source
- https://github.com/GrahamDumpleton/wrapt
- Tag scanned
2.5.2rc1- Compared with
2.5.1(0 signals introduced since)- Files
- 166 scanned, 47 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 26 info
- Scan time
- 18.7 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 26 of 26 warn and critical signals; 26 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-19 18:11
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
info
warn→ info by reviewframe-introspectionblog/09-performance-overhead-of-using-decorators.md:103:1likely benign Markdown tutorial snippet demonstrating sys.setprofile for measuring decorator overhead.Reasoning
A blog post's embedded Python example calls sys.setprofile(tracer) to illustrate profiling overhead. This is documentation, not executed code.
-
info
warn→ info by reviewframe-introspectionblog/10-performance-overhead-when-applying-decorators-to-methods.md:90:1likely benign Markdown tutorial snippet using sys.setprofile to trace a method call.Reasoning
Same pattern as the sibling blog post: an educational example of profiling a method call with sys.setprofile. No malicious behaviour is shown.
-
info
critical→ info by reviewdynamic-importblog/13-ordering-issues-when-monkey-patching-in-python.md:105:9=likely benign Blog example of dynamically importing a patch module by name during monkey patching.Reasoning
An illustrative monkey-patching example in a blog post loads a module by name with __import__ and applies a patch. The name is a parameter in a tutorial, not an obfuscated payload.
-
andlikely benign Docs config executes extracted version-helper AST nodes to derive the package version.Reasoning
Sphinx conf.py parses its own source with ast, extracts a _format_version function and version assignments, then execs them into a namespace to read the version without importing the package. The compiled source comes from the local file's AST, a common and legitimate technique.
-
andlikely benign compile() of an AST module built from the project's own version definitions.Reasoning
This is the compile() half of the same AST-extraction version-reading pattern, operating on the project's own source tree.
-
): =likely benign Second exec in the docs version-extraction logic, reading __version_info__ from a namespace.Reasoning
The exec of the extracted version nodes into _ns, followed by reading __version_info__ from the namespace, is the same benign self-introspection for version metadata.
-
): =likely benign compile() paired with the exec in the docs version-reading logic.Reasoning
The compile call supports the same benign version-extraction flow in the Sphinx config.
-
return returnlikely benign Attribute lookup via vars(cls) during path resolution in the wrapt patching utility.Reasoning
wrapt is a decorator and wrapping library, and vars(cls)/getattr is standard attribute resolution for patching. Name-based attribute access is inherent to its function, not obfuscation.
-
= = =likely benign Fetches the original attribute from a parent's __dict__ before applying a wrapper.Reasoning
Reading the prior attribute value through vars(parent).get before wrapping it is the normal mechanism for a monkey-patching library to preserve the original.
-
likely benign MRO traversal using vars(cls) to locate an attribute definition.
Reasoning
Walking the MRO with vars(cls) to find an attribute is standard descriptor and inheritance handling in a proxy/patching library.
-
=likely benign Lazy module import helper in the wrapt object proxy implementation.Reasoning
wrapt's lazy import helper calls __import__(name, fromlist=[""]) to load a module on demand. The name comes from the library's own lazy-proxy machinery, which is a normal pattern.
-
=likely benign Test setup that execs a constant source string into a synthetic decorators module.Reasoning
A test fixture builds a types.ModuleType and execs a DECORATORS_CODE string constant defined in the test file, to create decorators for adapter tests. This is a test-harness pattern, not a payload.
-
=likely benign Test fixture exec of a local decorators source string for annotation adapter tests.Reasoning
The same test-fixture pattern of exec-ing a local DECORATORS_CODE constant into a ModuleType, used for annotation tests.
-
=likely benign Test fixture exec of decorators source for keyword-only adapter tests.Reasoning
Keyword-only adapter tests use the same local exec of a constant decorators source, consistent with a test harness.
-
=likely benign Test fixture exec of a decorators source string for class-decorator tests.Reasoning
The class tests exec the same local DECORATORS_CODE constant into a synthetic module. The pattern is consistent with a test fixture rather than a dropper.
-
=likely benign Test helper that imports its own module via __import__(__name__) to patch a function.Reasoning
`__import__(__name__)` imports the test module itself to pass it to wrapt.apply_patch. This is a common self-reference idiom in test code, with no network, decoding, or shell activity in the snippet.
-
=likely benign Test code using __import__(__name__) to obtain its own module for patching in the wrapt test suite.Reasoning
Same self-import pattern as the other finding in this file: __import__(__name__) passed to wrapt.apply_patch in a unit test. Nothing suggests malicious intent.
-
=likely benign Test fixture that execs a locally defined decorators code string into a synthetic module.Reasoning
The module-level exec runs a DECORATORS_CODE string into a ModuleType namespace, which is a known wrapt test idiom for generating decorator fixtures. The string is defined in the same test suite, and the snippet shows no network or shell calls.
-
=likely benign Test fixture executing a local decorators code constant to build classmethod test decorators.Reasoning
Identical fixture pattern: exec of a local DECORATORS_CODE constant into a types.ModuleType namespace inside the wrapt test suite. This is a deliberate way to build decorator variants for testing.
-
=likely benign Test fixture executing a local decorators code constant to build staticmethod test decorators.Reasoning
Same DECORATORS_CODE exec-into-ModuleType fixture pattern used across wrapt's tests. The code is a local constant, not external input.
-
=likely benign Test fixture executing a local decorators code constant to build instance method test decorators.Reasoning
Identical DECORATORS_CODE exec fixture in a wrapt unit test. The exec input is static test code defined in the same suite.
-
=likely benign Test fixture executing a local decorators code constant to build nested function test decorators.Reasoning
Same DECORATORS_CODE exec pattern as the other wrapt test modules. It runs trusted, in-repo test code into an isolated module namespace.
-
=likely benign Test fixture executing a local objects code constant to build proxy test objects.Reasoning
exec of a local OBJECTS_CODE string into a ModuleType namespace for object proxy testing. This is a standard fixture technique in wrapt's test suite with no external input or malicious signals.
-
=likely benign Test fixture executing a local decorators code constant to build outer classmethod test decorators.Reasoning
Same DECORATORS_CODE exec-into-module fixture in a wrapt test. The source is an in-repo constant and the snippet shows no harmful behavior.
-
=likely benign Test fixture executing a local decorators code constant to build outer staticmethod test decorators.Reasoning
Same DECORATORS_CODE exec fixture used throughout wrapt's test suite. The code is static test input.
-
=likely benign Test fixture executing a local objects code constant to build module attribute test objects.Reasoning
exec of a local OBJECTS_CODE constant into a ModuleType namespace, matching the other wrapt test fixtures. It is deliberate test scaffolding, not an obfuscated payload.
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.
&&