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
- 14.7 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 21 of 21 warn and critical signals; 21 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-15 19:42
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
= or = or .likely benign Uses sys._getframe to read the caller's globals in zope.interface compatibility code.Reasoning
sys._getframe(1).f_globals is a standard idiom in zope.interface to find the caller's module globals for class/interface definition; no obfuscation or malicious behavior.
-
=likely benign Test constructor that opens the test module itself to satisfy an IFile interface check.Reasoning
A test lambda opening its own source file as a stand-in for an IFile constructor; a test fixture, not payload extraction. The message's payload claim is generic and not supported by the snippet.
-
info
warn→ info by reviewframe-introspectionsrc/zope/interface/common/tests/test_collections.py:101:17returnlikely benign Test helper fetching the frame locals proxy type via sys._getframe.Reasoning
Helper retrieving the type of frame.f_locals to test FrameLocalsProxy behavior; legitimate test code for a CPython type.
-
info
warn→ info by reviewframe-introspectionsrc/zope/interface/common/tests/test_collections.py:133:44return = =likely benign Test constructor building a FrameLocalsProxy from the current frame.Reasoning
Test constructor passing the current frame into the FrameLocalsProxy type to exercise the registry; benign test scaffolding.
-
""" frame = sys._getframe(1) # pylint:disable=protected-access locals = frame.f_locals # pylint:disable=redefined-builtinlikely benign Reads caller frame locals to implement class-level declaration helpers.Reasoning
Caller-frame locals access is the documented mechanism used by implementer-style declarations in zope.interface; standard library introspection for a framework.
-
= . = =likely benign Reads the caller's class-body locals to register interface invariants.Reasoning
The invariant decorator-style helper reads the calling class body's locals to attach tagged data, a known zope.interface design; no malicious intent.
-
"""Attaches a tagged value to an interface at definition time.""" = . = =likely benign Attaches tagged values to an interface by writing into the caller's class-body locals.Reasoning
Same caller-locals pattern used to attach tagged values at interface definition time; legitimate framework code.
-
# could be raised. = . # Get the C optimized __module__ accessor and give it # to the new class.likely benign Sets __module__ on a new interface class from the caller's global name.Reasoning
Reads the caller's __name__ to set __module__ for a new class, a standard way to fix module attribution; benign.
-
""" f_locals = sys._getframe(1).f_locals methods = f_locals.setdefault(INTERFACE_METHODS, {}) methods[func.__name__] = funclikely benign Registers interface methods by writing into the caller's class-body locals.Reasoning
Caller-locals access to register interface methods during class body execution; standard zope.interface mechanism.
-
# a class, but of course it does it in C. :-/ = . # pragma: no cover passlikely benign Sets __module__ from the caller's globals with a defensive fallback.Reasoning
Retrieves caller's __name__ inside a try/except as a fallback for __module__ assignment; benign.
-
= =likely benign Test fixture capturing class-level frame info for advice tests.Reasoning
Test fixture capturing frame info at class level to verify advice behavior; benign test code.
-
=likely benign Test fixture capturing module-level frame info for advice tests.Reasoning
Module-level frame info capture in a test fixture for advice testing; benign.
-
, , , =likely benign Test asserting frame info for a function call via sys._getframe.Reasoning
The critical severity comes only from the file also containing exec/eval, which here is used to test advice frame kinds. The snippet is a plain frame-info assertion in a test; the anti-analysis shape is a context artifact, not evidence of evasion.
-
=likely benign Test comparing sys._getframe locals with locals() for correctness.Reasoning
Test comparing frame locals to locals() to verify frame introspection; the critical flag reflects co-location with exec in the test file, not malicious behavior.
-
=likely benign Test executing a fixed code string via exec to check advice frame kind.Reasoning
exec on a module constant _FUNKY_EXEC with explicit globals and locals dicts, used to test advice behavior under exec; a deliberate test of exec frame kind, not hidden payload execution.
-
info
warn→ info by reviewdecoder-import-with-execsrc/zope/interface/tests/test_declarations.py:59:17return Falselikely benign A test helper that execs a code string to check class-advice behaviour.Reasoning
The snippet is a try/except around exec(code, globs, locs) that returns False on TypeError, which matches zope.interface's class-advice check for module-scope definitions. The pickle import is a common test-suite pattern and does not show a decode-then-run chain. The exec target is a test fixture string, not attacker-controlled input.
-
return Falselikely benign Same test helper flagged again for exec on a non-literal expression.Reasoning
The same exec(code, globs, locs) call is flagged as a non-literal exec. In this test module the code comes from test fixtures, and the call sits inside a helper that checks whether a class-advice body is legal. Nothing in the snippet shows untrusted input reaching exec.
-
]) =likely benign Test executes a constant code string to verify advice raises TypeError.Reasoning
exec(CODE, globs, locs) runs a module-level CODE constant defined in the test, then checks that calling foo raises TypeError. This is a deliberate test of advice behaviour, not an injected payload.
-
likely benign Negative test that execs a fixed CODE string inside assertRaises.
Reasoning
Inside assertRaises(TypeError), exec(CODE, globs, locs) runs a fixed test string. The test expects the exec to fail, which is a regression check on the advice machinery.
-
]) =likely benign Test execs a constant snippet to inspect a module-level __provides__ spec.Reasoning
exec(CODE, globs) runs a fixed test CODE string, and the test then reads __provides__ from globs to check the declared interfaces. This is standard test scaffolding for module-scope provides declarations.
-
likely benign Negative test that execs a fixed CODE string expecting a TypeError.
Reasoning
Inside assertRaises(TypeError), exec(CODE, globs) runs a fixed test string. The expected failure confirms the implementation rejects that construct.
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.
&&