PyPI / zope.interface / 8.7
zope.interface 8.7
- Source
- https://github.com/zopefoundation/zope.interface
- Tag scanned
8.7- Compared with
8.6(0 signals introduced since)- Files
- 80 scanned, 8 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 21 info
- Scan time
- 15.1 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 21 of 21 warn and critical signals; 21 demoted to info.
- Disclude version
- 4.1.0
- Scanned (UTC)
- 2026-10-22 08:42
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
= or = or .likely benign Retrieves caller's globals via frame introspection in a library helper.Reasoning
sys._getframe(1).f_globals is a standard idiom in zope.interface to find the calling module's globals for class/interface definitions. Legitimate.
-
=likely benign Test constructor opens the test module itself to satisfy an IFile interface check.Reasoning
open(__file__) in a test lambda just opens the file as an IFile example for interface conformance testing. No payload extraction or dynamic execution is evident.
-
info
warn→ info by reviewframe-introspectionsrc/zope/interface/common/tests/test_collections.py:101:17returnlikely benign Test helper gets the type of a frame's f_locals for conformance testing.Reasoning
Retrieves the frame locals proxy type to test interface registration for FrameLocalsProxy. Test code for a known CPython type.
-
info
warn→ info by reviewframe-introspectionsrc/zope/interface/common/tests/test_collections.py:133:44return = =likely benign Test constructor builds a FrameLocalsProxy from the current frame.Reasoning
Constructs a FrameLocalsProxy from the current frame inside a test registry. Benign test scaffolding.
-
""" frame = sys._getframe(1) # pylint:disable=protected-access locals = frame.f_locals # pylint:disable=redefined-builtinlikely benign Reads caller's locals to implement interface declaration advice.Reasoning
Caller-frame locals access is the documented mechanism for class advice in zope.interface (implementedBy/classImplements style APIs). Legitimate framework behavior.
-
= . = =likely benign Reads the class-body frame locals to register invariants.Reasoning
Frame locals are used to attach invariant metadata at class-body definition time, a known zope.interface design. Not malicious.
-
"""Attaches a tagged value to an interface at definition time.""" = . = =likely benign Stores tagged values into the calling class-body namespace.Reasoning
Same class-body frame-locals technique to store tagged values at definition time. Legitimate framework code.
-
# could be raised. = . # Get the C optimized __module__ accessor and give it # to the new class.likely benign Copies the caller module name into the new interface's __module__.Reasoning
Reads the caller's __name__ to set __module__ for a new interface class. Standard metaclass-style behavior.
-
""" f_locals = sys._getframe(1).f_locals methods = f_locals.setdefault(INTERFACE_METHODS, {}) methods[func.__name__] = funclikely benign Registers interface methods in the calling class-body namespace.Reasoning
Class-body frame locals used to record interface methods at definition time. Legitimate framework design.
-
# a class, but of course it does it in C. :-/ = . # pragma: no cover passlikely benign Sets __module__ from the caller's globals with a fallback on error.Reasoning
Same caller __name__ lookup for __module__ with exception handling. Benign framework code.
-
= =likely benign Test fixture records class-level frame info for advisory tests.Reasoning
Test fixture capturing frame info at class level to verify advice behavior. Benign test code.
-
=likely benign Test fixture records module-level frame info for advisory tests.Reasoning
Module-level counterpart of the same advisory test fixture. Benign.
-
, , , =likely benign Test passes the current frame to getFrameInfo to verify frame classification.Reasoning
The critical severity stems only from the file also using exec/eval, which here is test code checking advice frame info. Sys._getframe use is the tested API, not anti-analysis.
-
=likely benign Test compares frame locals to locals() to validate advice semantics.Reasoning
Compares frame locals with locals() in a unit test of advice behavior. The critical flag is driven by co-located exec in a test file, not by evasive logic.
-
=likely benign Test executes a fixed test string to verify exec frame reporting.Reasoning
exec of a module-level constant string (_FUNKY_EXEC) with explicit globals/locals dicts in a test checking exec-based frame kind. Non-literal but controlled, benign test scaffolding.
-
info
warn→ info by reviewdecoder-import-with-execsrc/zope/interface/tests/test_declarations.py:59:17return Falselikely benign A test helper that execs test-supplied code strings, in a file that also imports pickle.Reasoning
The file is a test module for zope.interface. The exec is a helper that runs test-defined source strings inside a try/except TypeError, with no decoding or network step. The pickle import is ordinary test support. The decoder-plus-exec shape is a heuristic match, not a payload chain.
-
return Falselikely benign exec on a code variable inside a zope.interface test helper.Reasoning
exec is applied to a variable holding code under test in a zope.interface test helper. The code comes from the test module itself, not from untrusted input or an encoded blob.
-
]) =likely benign Executes a test-defined CODE constant to verify class-advice behavior.Reasoning
CODE is a module-level test constant defining a class with __provides__ and advice behavior. exec runs it to check that TypeError is raised, and locs is then read back. This is standard testing of class-scope advice.
-
likely benign Negative test that execs a CODE constant expecting a TypeError.
Reasoning
Inside assertRaises(TypeError), exec runs the test's CODE constant. It is a negative test for the advice mechanism and does not touch external input.
-
]) =likely benign Executes a test CODE constant and checks the resulting __provides__ spec.Reasoning
CODE is a test constant, exec runs it into globs, and the test asserts on the __provides__ result. It is ordinary test scaffolding for the library.
-
likely benign Negative test that execs a CODE constant under assertRaises.
Reasoning
Within assertRaises(TypeError), exec runs the test's CODE constant. This is a negative test of class-scope advice usage and has no malicious shape.
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.
&&