wrapt 2.5.1
- Source
- https://github.com/GrahamDumpleton/wrapt
- Tag scanned
2.5.1- Compared with
2.5.0(0 signals introduced since)- Files
- 166 scanned, 47 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 26 info
- Scan time
- 20.3 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-15 00:53
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 Blog example using sys.setprofile to trace function calls while measuring decorator performance.Reasoning
Markdown tutorial snippet showing sys.setprofile for timing decorator overhead. It is documentation prose in a blog post, not executed code.
-
info
warn→ info by reviewframe-introspectionblog/10-performance-overhead-when-applying-decorators-to-methods.md:90:1likely benign Blog example calling sys.setprofile with a tracer around a method call.Reasoning
Same profiling demonstration in a blog post about method decorator overhead. Illustrative code in documentation.
-
info
critical→ info by reviewdynamic-importblog/13-ordering-issues-when-monkey-patching-in-python.md:105:9=likely benign Blog example helper that dynamically imports a patch module and applies it to a target module.Reasoning
Illustrative monkey-patching helper in a blog post that imports a patch module by name and calls apply_patch. The name is a parameter in an example, and the code is documentation, not a dropper.
-
andlikely benign Docs config extracts version definitions from source via ast and exec into a namespace.Reasoning
Sphinx conf.py parses its own version source with ast and execs only the extracted _format_version function and version assignments into a namespace. This is a common, bounded pattern for reading a version without importing the package.
-
andlikely benign Compiles an AST node extracted from the project's own version source.Reasoning
The compile call is part of the same bounded ast-extraction pattern, compiling only a parsed AST node built from the project's own source.
-
): =likely benign Second exec of extracted version assignments in the docs config.Reasoning
Second exec of the same ast-extracted version code in the docs config. Consistent with reading version metadata from the local source file.
-
): =likely benign Compiles extracted version AST nodes from the local source.Reasoning
Compile step matching the previous exec in the same version-extraction logic. No external input is involved.
-
return returnlikely benign Reflective attribute lookup via vars() while resolving a patched attribute.Reasoning
wrapt is a decorator and wrapping library, and this reads attributes through vars(cls) along an MRO to resolve descriptors when patching. This is standard reflection in a library that needs to inspect class attributes.
-
= = =likely benign Fetches the existing attribute from a parent's vars to wrap it.Reasoning
Retrieves the prior attribute value via vars(parent).get so a wrapper can be applied and later restored. Expected behavior for a wrapping library.
-
likely benign Iterates the MRO via vars(cls) to locate an attribute's original definition.
Reasoning
Walks the MRO of an owner class to find the original attribute definition. This is ordinary introspection for wrapping class members.
-
=likely benign Lazy module import helper inside the wrapt proxy implementation.Reasoning
Lazy import helper in a library module, importing a module by name with fromlist to support lazy attribute loading. The name is internal to the library, not attacker-controlled input.
-
=likely benign Test execs a constant source string to build a decorators test module.Reasoning
Test fixture execs a DECORATORS_CODE string constant defined in the same test file into a fresh module namespace. The code is a literal test fixture, not external input.
-
=likely benign Test execs a local constant source string to build a decorators module.Reasoning
Same test-fixture pattern of exec on a local constant string to create a decorators module for annotation tests.
-
=likely benign Test execs a local constant decorators source string for keyword-only adapter cases.Reasoning
Keyword-only adapter test uses the same local DECORATORS_CODE exec fixture. Benign test scaffolding.
-
=likely benign Test execs a local constant decorators source string for class tests.Reasoning
Class test uses the same local DECORATORS_CODE exec to generate test decorators. Standard test setup with no external input.
-
=dismissed Test code that imports its own module via __import__(__name__) to exercise wrapt's patching API.Reasoning
The call is `__import__(__name__)`, which imports the test module itself to pass it to wrapt.apply_patch in a unit test. The argument is the module's own name, not attacker-controlled input, and the same pattern repeats at line 219. This is ordinary test scaffolding.
-
=dismissed Test code that imports its own module to test wrapt path resolution.Reasoning
Same self-import pattern, `__import__(__name__)` passed to wrapt.apply_patch in a test that checks resolve_path. No external input or decoding is involved.
-
=likely benign Test fixture that execs a module-level decorator-definition string into a ModuleType namespace.Reasoning
This is a test helper that builds a synthetic module and execs a DECORATORS_CODE string constant into its namespace, a known wrapt test idiom for defining decorators in a fresh scope. The constant itself is not shown, but it is a local test fixture in a test suite, not a payload fetched or decoded from outside.
-
=likely benign Test helper that execs a decorator-definition constant into a synthetic module for classmethod tests.Reasoning
Same test-fixture pattern: a ModuleType is created and DECORATORS_CODE, a constant defined in the test, is exec'd into it to build decorators for classmethod tests. No external source or obfuscation is visible.
-
=likely benign Test helper that execs a decorator-definition constant into a synthetic module for staticmethod tests.Reasoning
Same test-fixture idiom of exec'ing a local DECORATORS_CODE constant into a ModuleType to test staticmethod decorators. Consistent with the wrapt test suite and not a dropper.
-
=likely benign Test helper that execs a decorator-definition constant to test instance methods.Reasoning
Test fixture exec'ing the local DECORATORS_CODE constant into a fresh ModuleType namespace to define decorators for instance method tests. No network, decoding, or external input is involved.
-
=likely benign Test helper that execs a decorator-definition constant to test nested functions.Reasoning
Test fixture using exec on a local DECORATORS_CODE string in a ModuleType, to build decorators for nested-function tests. This is a standard way to isolate decorator definitions in a test.
-
=likely benign Test helper that execs an object-definition constant into a synthetic module for proxy tests.Reasoning
Test fixture that execs the local OBJECTS_CODE constant into a ModuleType to create test objects for object proxy tests. The pattern is self-contained and matches normal test scaffolding.
-
=likely benign Test helper that execs a decorator-definition constant to test outer classmethods.Reasoning
Test fixture execing the local DECORATORS_CODE constant into a ModuleType for outer classmethod tests. Nothing in the snippet suggests external retrieval or obfuscated payload handling.
-
=likely benign Test helper that execs a decorator-definition constant to test outer staticmethods.Reasoning
Test fixture execing the local DECORATORS_CODE constant into a ModuleType for outer staticmethod tests. This is consistent with test isolation of decorator definitions.
-
=likely benign Test helper that execs an object-definition constant to test type module attributes.Reasoning
Test fixture execing the local OBJECTS_CODE constant into a ModuleType to test type module attributes. Self-contained test scaffolding with no visible external source.
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.
&&