coverage 7.17.0
- Source
- https://github.com/coveragepy/coveragepy
- Artifact scanned
coverage-7.17.0-py3-none-any.whl- Compared with
coverage-7.16.2-py3-none-any.whl(2 signals introduced since)- Files
- 53 scanned, 8 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 18 info
- Scan time
- 18.3 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 18 of 18 warn and critical signals; 18 demoted to info.
- Disclude version
- 4.3.0
- Scanned (UTC)
- 2026-10-23 04:30
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
=likely benign Reads the calling frame's self attribute for coverage's debug output.Reasoning
Coverage's debug facility reads the caller's self object for diagnostic output. This is developer-facing debugging, not malicious.
-
# don't know what's going on, and just leave it alone. = ... = =dismissed Looks up the top-level script file so coverage run can set up sys.path.Reasoning
This reads the top-level script path so coverage run can resolve sys.path correctly. The critical rating comes from the file also calling exec and sys.exit, which here is the normal shape of a script runner that executes the user's program. No payload or concealment is present.
-
import sys; exec('import os\n\nif os.getenv("COVERAGE_PROCESS_START") or os.getenv("COVERAGE_PROCESS_CONFIG"):\n try:\n import coverage\n except:\n pass\n else:\n coverage.process_startup(slug="pth")')likely benign A .pth startup line from the coverage.py package that conditionally starts coverage measurement based on environment variables.Reasoning
This matches coverage.py's standard startup hook. It runs only when COVERAGE_PROCESS_START or COVERAGE_PROCESS_CONFIG is set, imports coverage inside a try/except, and calls process_startup. The exec-of-a-string wrapper is unusual, but the behaviour is the documented coverage subprocess-measurement mechanism. The system prompt treats coverage as legitimate, so this is most likely benign, with some doubt because the .pth executes code at every interpreter start.
-
assert is not None = =likely benign Compiles source text into a code object inside coverage.py's bytecode utilities.Reasoning
This is coverage.py's bytecode helper compiling source text it has been given, with dont_inherit=True. Compiling a non-literal is the normal job of a code-analysis library, and nothing here hides or fetches code.
-
# Remove ourselves as the trace function. # Install the real tracer. : | None =likely benign Clears and reinstalls the Python trace function inside coverage's collector.Reasoning
sys.settrace(None) removes coverage's own trace function before installing the real tracer. This is routine coverage collector control flow, not stack introspection for evasion.
-
: =likely benign Collects a call-stack listing for coverage's debug output.Reasoning
Coverage's debug code collects a trimmed call stack for diagnostics. Walking the stack for debug output is ordinary behaviour.
-
# pylint: disable=try-except-raise # The user called sys.exit(). Just pass it along to the upperlikely benign Runs the user's target program in a fresh module namespace inside coverage's execfile helper.Reasoning
This is coverage run executing the user's target program in a module namespace and passing SystemExit through. The marshal import is for running .pyc files. The shape is expected for a program runner.
-
# pylint: disable=try-except-raise # The user called sys.exit(). Just pass it along to the upperlikely benign Executes the user's program code within coverage's execfile helper.Reasoning
The same exec call, flagged a second time as a non-literal exec. Executing the user's code is the purpose of coverage run, so this is a legitimate runner pattern.
-
= returnlikely benign Compiles the target program's source text in coverage's execfile helper.Reasoning
Compiles the source of the user's program for coverage run. This is expected for a script runner and carries no concealment.
-
# The rest of the file is the code object we want. = assertlikely benign Loads a compiled .pyc file's code object so coverage can run it.Reasoning
marshal.load reads a .pyc file that the user asked coverage to run, and the code is checked as a CodeType. This is the standard way to run compiled modules. It loads a local file the user named, not a remote or hidden payload.
-
return True, # pylint: disable=eval-used :likely benign Evaluates the constant names True, False, None or __debug__ while parsing code.Reasoning
eval is applied only to the names True, False, None or __debug__, which are constants. This is a safe constant-folding step for the AST parser, not arbitrary evaluation.
-
= =likely benign Imports a configured coverage plugin module by name.Reasoning
This imports a plugin module whose name comes from the coverage configuration file, which is the designed plugin-loading mechanism. The critical rating reflects the non-literal import, not any sign of a payload. The user has to configure the plugin explicitly.
-
= , , , =likely benign Briefly disables the trace function during coverage's tracer bookkeeping.Reasoning
This temporarily disables the trace function while coverage's tracer does its bookkeeping, then re-enables it. It is routine tracer control flow.
-
returnlikely benign Installs the cached bound-method trace function for coverage's Python tracer.Reasoning
This installs coverage's cached bound-method trace function, which is the core of how the Python tracer works. It is legitimate.
-
) = = =likely benign Decompresses a bundled zlib blob into an SQL script that initializes coverage's SQLite database.Reasoning
The snippet decompresses a zlib blob whose first byte is skipped, then decodes it as UTF-8 text and hands it to a per-thread SqliteDb. This matches coverage.py's in-memory SQLite handling, where a compressed SQL script is loaded into a database. The payload is bundled source data, not a remote or hidden dropper, and nothing in the snippet executes it as code or reaches the network. The residual doubt is that the decompressed script's use is not visible in the snippet.
-
= = . # type: ignore[union-attr]likely benign Calls inspect.currentframe() to get the caller frame for coverage's sys.monitoring tracing.Reasoning
inspect.currentframe() is used to find the caller's frame for coverage's sys.monitoring tracer, where frame introspection is required to attribute execution to source lines. The pattern is routine in profilers and coverage tools and has no hidden behavior.
-
= . # type: ignore[union-attr] # pragma: debugging # @panopticon adds a frame.likely benign Reads the back frame via inspect.currentframe().f_back to attribute coverage data correctly.Reasoning
This is a second currentframe() call that walks back one frame, with a comment referencing a debugging helper and a debug-only log branch. It is ordinary tracer frame attribution in a coverage library, not evasion or exfiltration.
-
: = returnlikely benign Executes Python source generated from a template to render coverage report output.Reasoning
Templite is a small template engine that compiles template text into Python source and execs it to render output. The exec runs on code generated from the template by the library itself, and the template is developer-supplied content for report rendering. This is a known design pattern, not an attack, though exec on generated code is worth noting.
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.
|