PyPI / zope.interface / 8.7

zope.interface 8.7

Source
https://github.com/zopefoundation/zope.interface
Artifact scanned
zope_interface-8.7.tar.gz (sdist · 260.1 KB · SHA-256 0b47b62e8d0d…)
Compared with
zope_interface-8.6.tar.gz (2 signals introduced since)
Files
88 scanned, 10 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 25 info
Scan time
14.9 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 25 of 25 warn and critical signals; 25 demoted to info.
Disclude version
4.3.0
Scanned (UTC)
2026-10-23 11:48

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review dynamic-execution .manylinux-install.sh:52:9 new in this release

    command name is a variable (`$PYBIN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

           [[ "${PYBIN}" == *"cp315/"* ]]  ; then
            "${PYBIN}/pip" install -e /io/
            "${PYBIN}/pip" wheel /io/ -w wheelhouse/
            if [ `uname -m` == 'aarch64' ]; then
    likely benign LLM, confidence 0.85 Build helper invokes pip via a variable-selected Python interpreter path.
    Reasoning

    Script runs pip/tox from a PYBIN variable set by the manylinux build environment; this is a standard pattern in the pypa manylinux helper scripts. The variable is a caller-controlled interpreter path, not an obfuscated payload.

  2. info warn → info by review dynamic-execution .manylinux-install.sh:53:9 new in this release

    command name is a variable (`$PYBIN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

            "${PYBIN}/pip" install -e /io/
            "${PYBIN}/pip" wheel /io/ -w wheelhouse/
            if [ `uname -m` == 'aarch64' ]; then
              cd /io/
    likely benign LLM, confidence 0.85 Editable install and wheel build through the selected interpreter's pip.
    Reasoning

    Same PYBIN-based pip invocations for editable install and wheel building inside a manylinux container; expected for multi-interpreter builds.

  3. info warn → info by review dynamic-execution .manylinux-install.sh:56:11

    command name is a variable (`$PYBIN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

              cd /io/
              ${PYBIN}/pip install tox
              TOXENV=$(tox_env_map "${PYBIN}")
              ${PYBIN}/tox -e ${TOXENV}
    likely benign LLM, confidence 0.85 Installs and runs tox for test environment selected by a mapping function.
    Reasoning

    Installs tox and runs it with an environment name derived from a helper function; routine test orchestration in a build script.

  4. info warn → info by review dynamic-execution .manylinux-install.sh:58:11

    command name is a variable (`$PYBIN`) not set in this file — the caller or environment decides what runs (ast pass, confidence 0.70)

              TOXENV=$(tox_env_map "${PYBIN}")
              ${PYBIN}/tox -e ${TOXENV}
              cd ..
            fi
    likely benign LLM, confidence 0.85 Runs tox test environment in the build container.
    Reasoning

    Runs tox with the environment computed earlier; no decoding or remote fetching visible. Ordinary CI test step.

  5. info warn → info by review frame-introspection src/zope/interface/_compat.py:120:22

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        name = name or py_impl.__name__
        globs = globs or sys._getframe(1).f_globals
    
        def find_impl():
    likely benign LLM, confidence 0.90 Uses caller frame globals to resolve implementation names in zope.interface compatibility code.
    Reasoning

    sys._getframe(1).f_globals is a well-known idiom in zope.interface for defining classes in the caller's module namespace; it is legitimate framework code.

  6. info warn → info by review dynamic-execution src/zope/interface/common/tests/test_builtins.py:49:33

    `open(__file__)` — file reads its own source, common pattern for extracting payloads hidden in comments (ast pass, confidence 0.85)

        CONSTRUCTORS = {
            builtins.IFile: lambda: open(__file__)
        }
    likely benign LLM, confidence 0.85 Test constructor opens the test module itself as a file object.
    Reasoning

    Opening __file__ in a test to provide a file-like object for IFile conformance testing is benign; no payload extraction or decoding occurs.

  7. info warn → info by review frame-introspection src/zope/interface/common/tests/test_collections.py:101:17

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

    def _get_FrameLocalsProxy():
        return type(sys._getframe().f_locals)
    likely benign LLM, confidence 0.90 Test helper obtains the frame locals proxy type for conformance checks.
    Reasoning

    Retrieves the type of frame locals to test FrameLocalsProxy conformance; a test helper with no malicious behavior.

  8. info warn → info by review frame-introspection src/zope/interface/common/tests/test_collections.py:133:44

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            def FrameLocalsProxy_constructor():
                return _get_FrameLocalsProxy()(sys._getframe())
            FrameLocalsProxy = _get_FrameLocalsProxy()
            CONSTRUCTORS[FrameLocalsProxy] = FrameLocalsProxy_constructor
    likely benign LLM, confidence 0.90 Test constructs a FrameLocalsProxy from the current frame.
    Reasoning

    Passes current frame to a FrameLocalsProxy constructor in a test; benign introspection for test coverage of a builtin type.

  9. info warn → info by review frame-introspection src/zope/interface/declarations.py:1039:13

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        """
        frame = sys._getframe(1)  # pylint:disable=protected-access
        locals = frame.f_locals   # pylint:disable=redefined-builtin
    likely benign LLM, confidence 0.92 Reads caller frame locals for class advice in zope.interface declarations.
    Reasoning

    Caller-frame locals access is the documented mechanism of zope.interface's implementer-style class advice helpers; standard framework behavior.

  10. info warn → info by review frame-introspection src/zope/interface/interface.py:51:16

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

    def invariant(call):
        f_locals = sys._getframe(1).f_locals
        tags = f_locals.setdefault(TAGGED_DATA, {})
        invariants = tags.setdefault('invariants', [])
    likely benign LLM, confidence 0.92 Invariant decorator attaches data to the defining class namespace via caller frame.
    Reasoning

    Caller-frame locals store tagged data for the invariant decorator; this is the documented zope.interface definition-time mechanism.

  11. info warn → info by review frame-introspection src/zope/interface/interface.py:60:16

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        """Attaches a tagged value to an interface at definition time."""
        f_locals = sys._getframe(1).f_locals
        tagged_values = f_locals.setdefault(TAGGED_DATA, {})
        tagged_values[key] = value
    likely benign LLM, confidence 0.92 Tagged value helper writes to the caller's class namespace.
    Reasoning

    Same definition-time tagged-value mechanism via caller frame locals; legitimate framework design.

  12. info warn → info by review frame-introspection src/zope/interface/interface.py:641:22

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # could be raised.
            __module__ = sys._getframe(1).f_globals['__name__']
            # Get the C optimized __module__ accessor and give it
            # to the new class.
    likely benign LLM, confidence 0.92 Sets __module__ of an interface from the caller's globals.
    Reasoning

    Reads caller module __name__ to set __module__ on new interface classes; standard framework practice.

  13. info warn → info by review frame-introspection src/zope/interface/interface.py:686:16

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        """
        f_locals = sys._getframe(1).f_locals
        methods = f_locals.setdefault(INTERFACE_METHODS, {})
        methods[func.__name__] = func
    likely benign LLM, confidence 0.92 Method decorator registers functions into the interface namespace via caller frame.
    Reasoning

    Caller-frame locals used to collect interface methods at definition time; documented zope.interface behavior.

  14. info warn → info by review frame-introspection src/zope/interface/interface.py:767:34

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

                        # a class, but of course it does it in C. :-/
                        __module__ = sys._getframe(1).f_globals['__name__']
                    except (AttributeError, KeyError):  # pragma: no cover
                        pass
    likely benign LLM, confidence 0.92 Assigns __module__ from caller globals during class creation.
    Reasoning

    Sets __module__ from caller globals inside a try block for class creation; ordinary framework code.

  15. info warn → info by review frame-introspection src/zope/interface/tests/advisory_testing.py:26:40

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

        __metaclass__ = type
        classLevelFrameInfo = getFrameInfo(sys._getframe())
    likely benign LLM, confidence 0.95 Test fixture calling sys._getframe to exercise getFrameInfo.
    Reasoning

    sys._getframe is used to test frame-introspection helpers for zope.interface advice; this is a test fixture, not malicious.

  16. info warn → info by review frame-introspection src/zope/interface/tests/advisory_testing.py:29:37

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

    
    moduleLevelFrameInfo = getFrameInfo(sys._getframe())
    likely benign LLM, confidence 0.95 Module-level sys._getframe call in a zope.interface advice test fixture.
    Reasoning

    Same test fixture pattern at module level, testing frame info retrieval in a legitimate library test suite.

  17. info critical → info by review frame-introspection src/zope/interface/tests/test_advice.py:55:58

    `sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

            from zope.interface.advice import getFrameInfo
            kind, module, f_locals, f_globals = getFrameInfo(sys._getframe())
            self.assertEqual(kind, "function call")
    likely benign LLM, confidence 0.93 Unit test checking getFrameInfo results using sys._getframe.
    Reasoning

    The critical severity comes from co-occurrence with exec/eval elsewhere in the file, but the snippet is a unit test asserting frame info from getFrameInfo; a well-known legitimate library test.

  18. info critical → info by review frame-introspection src/zope/interface/tests/test_advice.py:58:17

    `sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)

    
            frame = sys._getframe()
            self.assertEqual(f_locals, frame.f_locals)
            self.assertEqual(f_locals, locals())
    likely benign LLM, confidence 0.93 Test comparing frame locals obtained via sys._getframe.
    Reasoning

    Test asserts frame locals match expected values; no anti-analysis behavior, just introspection testing within the zope.interface test suite.

  19. info warn → info by review dynamic-execution src/zope/interface/tests/test_advice.py:69:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            _locals = {}
            exec(_FUNKY_EXEC, _globals, _locals)
            self.assertEqual(_locals['kind'], "exec")
            self.assertIs(_locals['f_locals'], _locals)
    likely benign LLM, confidence 0.92 Test executes a fixed test string via exec to verify advice frame detection.
    Reasoning

    exec runs a module-level constant _FUNKY_EXEC with controlled globals and locals to test advice behavior under exec; a deliberate test of the library's frame handling, not an attack.

  20. info warn → info by review decoder-import-with-exec src/zope/interface/tests/test_declarations.py:59:17

    file imports decoder module(s) pickle and calls `exec`/`eval`/`compile` — multi-stage payload shape (ast pass, confidence 0.80)

                try:
                    exec(code, globs, locs)
                except TypeError:
                    return False
    likely benign LLM, confidence 0.90 Test helper executing compiled test code to check TypeError behavior.
    Reasoning

    The try block runs exec on a code object within a test helper checking whether a class-level construct raises TypeError; the pickle import is incidental in a zope test suite, not a payload loader.

  21. info warn → info by review dynamic-execution src/zope/interface/tests/test_declarations.py:59:17

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

                try:
                    exec(code, globs, locs)
                except TypeError:
                    return False
    likely benign LLM, confidence 0.90 Test helper exec of test code object in declarations tests.
    Reasoning

    Same exec helper in the zope.interface declarations test; exec of a test-provided code object for behavior checking, no payload or network activity.

  22. info warn → info by review dynamic-execution src/zope/interface/tests/test_declarations.py:2051:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            ])
            exec(CODE, globs, locs)
            foo = locs['foo']
            self.assertRaises(TypeError, foo)
    likely benign LLM, confidence 0.92 Test executes a fixed CODE string to verify module-scope declaration behavior.
    Reasoning

    exec of a fixed module-level CODE string with dict namespaces to define test functions; standard technique for testing module-scope behavior.

  23. info warn → info by review dynamic-execution src/zope/interface/tests/test_declarations.py:2066:13

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            with self.assertRaises(TypeError):
                exec(CODE, globs, locs)
    
        def test_called_once_from_module_scope(self):
    likely benign LLM, confidence 0.92 Test executes fixed CODE inside assertRaises to check TypeError.
    Reasoning

    Same fixed-CODE exec inside assertRaises in a zope.interface test, validating a TypeError for module-scope usage.

  24. info warn → info by review dynamic-execution src/zope/interface/tests/test_declarations.py:2076:9

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            ])
            exec(CODE, globs)
            spec = globs['__provides__']
            self.assertEqual(list(spec), [IFoo])
    likely benign LLM, confidence 0.92 Test execs fixed CODE to inspect __provides__ spec from module scope.
    Reasoning

    Fixed CODE string exec'd into a globals dict to check __provides__ handling; a typical test pattern in this library.

  25. info warn → info by review dynamic-execution src/zope/interface/tests/test_declarations.py:2091:13

    `exec` called on a non-literal expression (ast pass, confidence 0.70)

            with self.assertRaises(TypeError):
                exec(CODE, globs)
    likely benign LLM, confidence 0.92 Test execs fixed CODE expecting TypeError in module-scope declaration checks.
    Reasoning

    Fixed CODE exec within assertRaises in the same declarations test module; benign test scaffolding.

Reproduce This Scan

Run disclude locally to verify. These commands scan the published file; the "new in this release" marks come from comparing it with the previous release's file, which they don't repeat. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.3.0
curl -fsSL -o zope_interface-8.7.tar.gz https://files.pythonhosted.org/packages/de/ff/a1f0021a26033da0df223fd05a7455d6d2881b67daf2c6dc897b4fe0a427/zope_interface-8.7.tar.gz
printf '%s  %s\n' 0b47b62e8d0d99b24bcdd32f4f2120425e5019c3bee2ad69a0e1d75737487a96 zope_interface-8.7.tar.gz | shasum -a 256 -c -
mkdir pkg && tar -xzf zope_interface-8.7.tar.gz -C pkg --strip-components 1
disclude scan --untrusted --severity info pkg