Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
U+200B ZERO WIDTH SPACE in source (raw pass, confidence 0.75)
Sylvain
S⟨U+200B⟩age Abdullah
Takayuki SHIMIZUKAWA
Taneli Hukkinen
likely benign
LLM, confidence 0.97
Zero-width space embedded in an author name in AUTHORS.txt.
Reasoning
A zero-width space inside a person's name in an authors list is a stray typographic artifact in a plain text document, not executable code; no security impact.
-
[markup prose] `eval` called on a dynamic (variable/substitution) expression (ast pass, confidence 0.90)
eval "`pip completion --bash`"
likely benign
LLM, confidence 0.90
Documentation example evaluating pip's bash completion output.
Reasoning
The eval is inside a reStructuredText doc example showing shell completion setup (eval of pip completion output), a standard documented pattern; it is prose, not executed code.
-
compression ratio 0.764 is >2σ above file mean 0.626 (raw pass, confidence 0.50)
> "I would like some security advisor, [like in npm](https://docs.npmjs.com/auditing-package-dependencies-for-security-vulnerabilities) - it works very well, when you install a package "there are security vulns. with this package - 1 low, 5 medium, 8 high. I haven't come across security issues with Python packages." **
-
`subprocess.check_call` called with `shell=True` and a literal command (ast pass, confidence 0.70)
try:
subprocess.check_call(f'{editor} "{fname}"', shell=True)
except FileNotFoundError as e:
if not e.filename:
likely benign
LLM, confidence 0.85
Launches the user's editor via shell command for pip config edit.
Reasoning
Runs the user's configured editor with shell=True, filename interpolated; this is a known pattern for launching editors and the input is user-controlled local config, so not malicious, though the shell quoting is weak.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
__import__(module)
except ImportError:
likely benign
LLM, confidence 0.93
Dynamic import attempt to detect a missing module for a hook.
Reasoning
Standard import-probing of an optional module name inside a try/except ImportError, used to record missing modules; legitimate.
-
U+200B ZERO WIDTH SPACE in source (in string/comment) (raw pass, confidence 0.45)
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
__import__(modulename, globals(), locals(), level=0)
except ImportError:
likely benign
LLM, confidence 0.95
Vendor import redirector importing modules by name.
Reasoning
Vendoring shim that imports vendored modules by name and silently tolerates ImportError; this is the well-known pip vendor redirection mechanism.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
if package not in sys.modules:
__import__(package)
module = sys.modules[package]
path = getattr(module, '__path__', None)
likely benign
LLM, confidence 0.95
Imports a package dynamically to resolve its resource path.
Reasoning
Imports a package by name to locate its __path__ for resource lookup, a normal distlib pattern.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
else:
mod = __import__(module_name)
if dotted_path is None:
result = mod
likely benign
LLM, confidence 0.95
Resolves a module name from a dotted path for entry points.
Reasoning
Standard resolver for dotted paths like 'module:attr' in distlib; the name comes from package metadata, normal behavior for entry point resolution.
-
identifier `ʼn` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)
None,
"ʼn",
"ŋ",
None,
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
None,
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
None,
"σ",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
None,
"κ",
"ρ",
"σ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"κ",
"ρ",
"σ",
None,
-
identifier `і` contains homoglyph candidates: і (0456)→i (in string/comment) (raw pass, confidence 0.35)
"ѕ",
"і",
"ї",
"ј",
-
identifier `а` contains homoglyph candidates: а (0430)→a (in string/comment) (raw pass, confidence 0.35)
"џ",
"а",
"б",
"в",
-
identifier `е` contains homoglyph candidates: е (0435)→e (in string/comment) (raw pass, confidence 0.35)
"д",
"е",
"ж",
"з",
-
identifier `о` contains homoglyph candidates: о (043E)→o (in string/comment) (raw pass, confidence 0.35)
"н",
"о",
"п",
"р",
-
identifier `р` contains homoglyph candidates: р (0440)→p (in string/comment) (raw pass, confidence 0.35)
"п",
"р",
"с",
"т",
-
identifier `с` contains homoglyph candidates: с (0441)→c (in string/comment) (raw pass, confidence 0.35)
"р",
"с",
"т",
"у",
-
identifier `у` contains homoglyph candidates: у (0443)→y (in string/comment) (raw pass, confidence 0.35)
"т",
"у",
"ф",
"х",
-
identifier `х` contains homoglyph candidates: х (0445)→x (in string/comment) (raw pass, confidence 0.35)
"ф",
"х",
"ц",
"ч",
-
identifier `о` contains homoglyph candidates: о (043E)→o (in string/comment) (raw pass, confidence 0.35)
"д",
"о",
"с",
"т",
-
identifier `с` contains homoglyph candidates: с (0441)→c (in string/comment) (raw pass, confidence 0.35)
"о",
"с",
"т",
"ъ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"γ",
"ρ",
"φ",
"χ",
-
identifier `aʾ` mixes scripts: Latin + Other (in string/comment) (raw pass, confidence 0.40)
None,
"aʾ",
"ṡ",
None,
-
identifier `kω` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)
"mw",
"kω",
"mω",
None,
-
identifier `mω` mixes scripts: Latin + Greek (in string/comment) (raw pass, confidence 0.40)
"kω",
"mω",
None,
"bq",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
None,
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"θ",
"σ",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"∇",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"σ",
"τ",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"θ",
"κ",
"φ",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"φ",
"ρ",
"π",
"α",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"π",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"θ",
"σ",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"∇",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"σ",
"τ",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"θ",
"κ",
"φ",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"φ",
"ρ",
"π",
"α",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"π",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"θ",
"σ",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"∇",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"σ",
"τ",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"θ",
"κ",
"φ",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"φ",
"ρ",
"π",
"α",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"π",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"θ",
"σ",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"∇",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"σ",
"τ",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"θ",
"κ",
"φ",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"φ",
"ρ",
"π",
"α",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"π",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"θ",
"σ",
-
identifier `α` contains homoglyph candidates: α (03B1)→a (in string/comment) (raw pass, confidence 0.35)
"∇",
"α",
"β",
"γ",
-
identifier `η` contains homoglyph candidates: η (03B7)→n (in string/comment) (raw pass, confidence 0.35)
"ζ",
"η",
"θ",
"ι",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"ι",
"κ",
"λ",
"μ",
-
identifier `ν` contains homoglyph candidates: ν (03BD)→v (in string/comment) (raw pass, confidence 0.35)
"μ",
"ν",
"ξ",
"ο",
-
identifier `ο` contains homoglyph candidates: ο (03BF)→o (in string/comment) (raw pass, confidence 0.35)
"ξ",
"ο",
"π",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"π",
"ρ",
"σ",
"τ",
-
identifier `κ` contains homoglyph candidates: κ (03BA)→k (in string/comment) (raw pass, confidence 0.35)
"θ",
"κ",
"φ",
"ρ",
-
identifier `ρ` contains homoglyph candidates: ρ (03C1)→p (in string/comment) (raw pass, confidence 0.35)
"φ",
"ρ",
"π",
"ϝ",
-
identifier `а` contains homoglyph candidates: а (0430)→a (in string/comment) (raw pass, confidence 0.35)
None,
"а",
"б",
"в",
-
identifier `е` contains homoglyph candidates: е (0435)→e (in string/comment) (raw pass, confidence 0.35)
"д",
"е",
"ж",
"з",
-
identifier `о` contains homoglyph candidates: о (043E)→o (in string/comment) (raw pass, confidence 0.35)
"м",
"о",
"п",
"р",
-
identifier `р` contains homoglyph candidates: р (0440)→p (in string/comment) (raw pass, confidence 0.35)
"п",
"р",
"с",
"т",
-
identifier `с` contains homoglyph candidates: с (0441)→c (in string/comment) (raw pass, confidence 0.35)
"р",
"с",
"т",
"у",
-
identifier `у` contains homoglyph candidates: у (0443)→y (in string/comment) (raw pass, confidence 0.35)
"т",
"у",
"ф",
"х",
-
identifier `х` contains homoglyph candidates: х (0445)→x (in string/comment) (raw pass, confidence 0.35)
"ф",
"х",
"ц",
"ч",
-
identifier `і` contains homoglyph candidates: і (0456)→i (in string/comment) (raw pass, confidence 0.35)
"ә",
"і",
"ј",
"ө",
-
identifier `а` contains homoglyph candidates: а (0430)→a (in string/comment) (raw pass, confidence 0.35)
"ӏ",
"а",
"б",
"в",
-
identifier `е` contains homoglyph candidates: е (0435)→e (in string/comment) (raw pass, confidence 0.35)
"д",
"е",
"ж",
"з",
-
identifier `о` contains homoglyph candidates: о (043E)→o (in string/comment) (raw pass, confidence 0.35)
"л",
"о",
"п",
"с",
-
identifier `с` contains homoglyph candidates: с (0441)→c (in string/comment) (raw pass, confidence 0.35)
"п",
"с",
"у",
"ф",
-
identifier `у` contains homoglyph candidates: у (0443)→y (in string/comment) (raw pass, confidence 0.35)
"с",
"у",
"ф",
"х",
-
identifier `х` contains homoglyph candidates: х (0445)→x (in string/comment) (raw pass, confidence 0.35)
"ф",
"х",
"ц",
"ч",
-
identifier `і` contains homoglyph candidates: і (0456)→i (in string/comment) (raw pass, confidence 0.35)
"ґ",
"і",
"ѕ",
"џ",
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
try:
compile(python_expression, "", "eval")
except SyntaxError:
message = f"Invalid license expression: {raw_license_expression!r}"
likely benign
LLM, confidence 0.85
Syntax-checks a license expression via compile without running it.
Reasoning
compile with mode 'eval' is used only to syntax-check a license expression and catch SyntaxError; it is not executed, so it is a validation pattern.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
except KeyError:
__import__(moduleOrReq)
module = sys.modules[moduleOrReq]
loader = getattr(module, '__loader__', None)
likely benign
LLM, confidence 0.93
Imports a module by name to obtain its loader in pkg_resources.
Reasoning
Imports a requested module name in pkg_resources to find its loader, a documented behavior of the library.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
ns = sys._getframe(1).f_globals
name = ns['__name__']
ns.clear()
likely benign
LLM, confidence 0.85
Accesses caller frame globals to run a distribution script.
Reasoning
Used in run_script to access the caller's globals for executing a distribution script, a legitimate setuptools pattern; the frame-introspection plus exit/exec co-occurrence is a heuristic match in a large legitimate module.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
source = _read_utf8_with_fallback(script_filename)
code = compile(source, script_filename, 'exec')
exec(code, namespace, namespace)
else:
likely benign
LLM, confidence 0.85
Compiles installed script source for execution in run_script.
Reasoning
Compiles a script file's source for run_script, executing installed console script code, which is the expected function of this API; source comes from installed distributions.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
code = compile(source, script_filename, 'exec')
exec(code, namespace, namespace)
else:
from linecache import cache
likely benign
LLM, confidence 0.85
Executes installed distribution script code via exec.
Reasoning
Executes the compiled script of an installed distribution as part of pkg_resources run_script; legitimate by design, not obfuscated.
-
`compile` called on a non-literal expression (ast pass, confidence 0.70)
)
script_code = compile(script_text, script_filename, 'exec')
exec(script_code, namespace, namespace)
likely benign
LLM, confidence 0.85
Compiles script text from distribution metadata for execution.
Reasoning
Same run_script pattern compiling script text from a distribution's metadata for execution; expected behavior of the library.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
script_code = compile(script_text, script_filename, 'exec')
exec(script_code, namespace, namespace)
def _has(self, path) -> bool:
likely benign
LLM, confidence 0.85
Executes distribution script text via exec in run_script.
Reasoning
Executes the compiled script text in run_script; legitimate functionality of pkg_resources, consistent with the surrounding code.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
if parent not in _namespace_packages:
__import__(parent)
try:
path = sys.modules[parent].__path__
likely benign
LLM, confidence 0.93
Imports a parent namespace package to read its __path__.
Reasoning
Imports the parent namespace package before reading its __path__, a standard namespace-package handling step in pkg_resources.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
likely benign
LLM, confidence 0.90
Dynamic __import__ of an entry point module name for plugin resolution.
Reasoning
EntryPoint.resolve imports a module by its configured name, a standard plugin-loading mechanism in setuptools/pkg_resources vendored in pip. Dynamic import of a configured module name is expected.
-
`sys._getframe` — call-stack frame introspection — file also calls `sys.exit`/`exec`/`eval` (anti-analysis shape) (ast pass, confidence 0.85)
while sys._getframe(level).f_globals is g:
level += 1
except ValueError:
likely benign
LLM, confidence 0.90
Frame walk to compute warning stacklevel in pkg_resources.
Reasoning
sys._getframe is used in a warnings helper to compute stacklevel by walking frames until leaving the module. This is a standard idiom for warning attribution, not anti-analysis behavior.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
mod = __import__(module_name, None, None, ['__all__'])
for formatter_name in mod.__all__:
cls = getattr(mod, formatter_name)
likely benign
LLM, confidence 0.92
Pygments dynamic import of a formatter module by name.
Reasoning
Pygments loads its own built-in formatter modules by name via __import__, a normal plugin loader pattern in a well-known vendored library.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with open(filename, 'rb') as f:
exec(f.read(), custom_namespace)
if formattername not in custom_namespace:
likely benign
LLM, confidence 0.85
Executes a user-specified custom formatter Python file.
Reasoning
Pygments exec's a user-supplied custom formatter file passed explicitly by the caller via the API. This is a documented feature, not hidden execution, though exec of file contents is powerful and warrants awareness.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
mod = __import__(module_name, None, None, ['__all__'])
for lexer_name in mod.__all__:
cls = getattr(mod, lexer_name)
likely benign
LLM, confidence 0.92
Pygments dynamic import of a lexer module by name.
Reasoning
Standard Pygments lexer plugin loading by module name in its own package.
-
`exec` called on a non-literal expression (ast pass, confidence 0.70)
with open(filename, 'rb') as f:
exec(f.read(), custom_namespace)
if lexername not in custom_namespace:
likely benign
LLM, confidence 0.85
Executes a user-specified custom lexer Python file.
Reasoning
Pygments executes a user-supplied custom lexer file explicitly provided by the caller, a documented feature.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
module = data[0]
mod = __import__(module, None, None, [classname])
self.filenames.add(mod.__file__)
cls = getattr(mod, classname)
likely benign
LLM, confidence 0.90
Dynamic import of a lexer class module named in Sphinx docs.
Reasoning
Sphinx extension imports lexer classes named in documentation directives; expected behavior for a documentation tool.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
module = data[0]
mod = __import__(module, None, None, [classname])
self.filenames.add(mod.__file__)
cls = getattr(mod, classname)
likely benign
LLM, confidence 0.90
Dynamic import of a lexer class module for Sphinx docs.
Reasoning
Same pattern as the other sphinxext import: resolving a documented lexer class by module name.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
try:
mod = __import__(mod, None, None, [cls])
except ImportError:
raise ClassNotFound(f"Could not find style module {mod!r}" +
likely benign
LLM, confidence 0.90
Pygments dynamic import of a style module by name.
Reasoning
Pygments loads a style module by name from its own package with a ClassNotFound fallback; standard plugin loading.
-
compression ratio 0.629 is >2σ above file mean 0.384 (raw pass, confidence 0.50)
Sc = '$\xa2-\xa5\u058f\u060b\u07fe-\u07ff\u09f2-\u09f3\u09fb\u0af1\u0bf9\u0e3f\u17db\u20a0-\u20bf\ua838\ufdfc\ufe69\uff04\uffe0-\uffe1\uffe5-\uffe6\U0001ecb0'
-
reach-by-name through `globals` (ast pass, confidence 0.60)
def combine(*args):
return ''.join(globals()[cat] for cat in args)
likely benign
LLM, confidence 0.90
Combines Unicode category constants by name via globals().
Reasoning
globals() lookup of Unicode category string constants generated in the same module; a plain data-table combiner with no payload behavior.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
newcats.remove(arg)
return ''.join(globals()[cat] for cat in newcats)
likely benign
LLM, confidence 0.90
Builds Unicode category ranges by name from module globals.
Reasoning
Same as the other unistring combiner: looks up Unicode range constants in module globals for regex character classes.
-
`open(__file__)` — file reads its own source, common pattern for extracting payloads hidden in comments (ast pass, confidence 0.85)
with open(__file__, encoding='utf-8') as fp:
content = fp.read()
likely benign
LLM, confidence 0.90
Reads its own file while regenerating Unicode tables.
Reasoning
This is a generator script section that reads its own source to rewrite the generated unistring data table when run as __main__; it is not extracting hidden payloads at import time.
-
`open(__file__)` — file reads its own source, common pattern for extracting payloads hidden in comments (ast pass, confidence 0.85)
with open(__file__, 'w', encoding='utf-8') as fp:
fp.write(header)
likely benign
LLM, confidence 0.90
Rewrites its own source file with regenerated Unicode data.
Reasoning
Writes a regenerated header into its own source file as part of a maintenance script for Unicode tables; not a payload dropper.
-
reach-by-name through `globals` (ast pass, confidence 0.60)
hook = globals()[hook_name]
hook_input = read_json(pjoin(control_dir, "input.json"))
likely benign
LLM, confidence 0.90
Dispatches a PEP 517 build hook by name from globals.
Reasoning
Looks up a build hook function by name from globals in the pyproject_hooks in-process runner; the name comes from the build backend's defined hook set, a standard dispatch pattern.
-
reach-by-name through `locals` (ast pass, confidence 0.60)
vendored_package = "pip._vendor." + package
locals()[package] = __import__(vendored_package)
likely benign
LLM, confidence 0.90
Aliases vendored packages into locals for backward-compatible imports.
Reasoning
Legacy shim that aliases vendored urllib3/chardet/idna modules into the requests.packages namespace so old imports keep working; a known, benign compatibility mechanism.
-
`__import__` called on a non-literal expression (ast pass, confidence 0.70)
vendored_package = "pip._vendor." + package
locals()[package] = __import__(vendored_package)
likely benign
LLM, confidence 0.93
Vendored requests compatibility shim that dynamically imports pip-vendored submodules.
Reasoning
This is the standard vendored-requests shim that aliases vendored urllib3/chardet/idna modules under the requests.packages namespace. The dynamic __import__ is over a fixed prefix plus a package name from a hardcoded list, so it is legitimate vendoring code, not an attack.
-
`inspect.stack` — call-stack frame introspection (ast pass, confidence 0.70)
frame_info = inspect.stack()[offset]
return frame_info.filename, frame_info.lineno, frame_info.frame.f_locals
likely benign
LLM, confidence 0.90
Fallback call-stack introspection in rich console to find caller filename and line.
Reasoning
Rich uses inspect.stack() as a fallback to locate the caller's frame for logging/printing metadata. This is ordinary library behavior with no exfiltration or hidden execution in the snippet.
-
`builtins._ = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
assert console is not None
builtins._ = None console.print(
(
likely benign
LLM, confidence 0.90
Temporarily sets builtins._ to emulate the REPL last-value convention during pretty printing.
Reasoning
Rich's pretty printer temporarily sets builtins._ to None and then to the value, mirroring the interactive REPL's last-result convention for pretty-printing. It is a known, intentional pattern in rich, though it does mutate a global builtin; it is not malicious.
-
`builtins._ = ...` — patches a built-in for every importer of this module (ast pass, confidence 0.95)
)
builtins._ = value
try:
likely benign
LLM, confidence 0.90
Sets builtins._ to the pretty-printed value to mirror REPL last-result behavior.
Reasoning
Same pattern as the companion finding: rich's pretty.py sets builtins._ to the printed value so that the REPL's '_' convention works. Legitimate library behavior, though a global side effect worth noting.
-
file imports decoder module(s) zlib and calls `.decompress()` — embedded payload decompressed at runtime (ast pass, confidence 0.75)
self._unfed_data = b""
self._obj = zlib.decompressobj()
def decompress(self, data: bytes, max_length: int = -1) -> bytes:
likely benign
LLM, confidence 0.85
Streaming HTTP content decoder in urllib3 using zlib decompressobj for response bodies.
Reasoning
urllib3 uses zlib.decompressobj to decode HTTP gzip/deflate content-encoding responses. The 'embedded payload' framing is a false positive from the decompress call; this is standard HTTP response decoding.
-
identifier `ˈpjœr` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)
sys.stdout.buffer.write(
"* Björk Guðmundsdóttir [ˈpjœr̥k ˈkvʏðmʏntsˌtoʊhtɪr]".encode()
)
else:
-
identifier `ˈkvʏðmʏntsˌtoʊhtɪr` mixes scripts: Other + Latin (in string/comment) (raw pass, confidence 0.40)
sys.stdout.buffer.write(
"* Björk Guðmundsdóttir [ˈpjœr̥k ˈkvʏðmʏntsˌtoʊhtɪr]".encode()
)
else:
-
`subprocess.Popen` with `shell=True` and a non-literal command — runtime-determined shell invocation (ast pass, confidence 0.85)
cmd = command.format(option)
proc = subprocess.Popen(
cmd,
shell=True,
likely benign
LLM, confidence 0.80
Functional test helper invoking a formatted command via subprocess with shell=True.
Reasoning
This is a test helper running a pip command string formatted with an option, with shell=True. The command is built from test-controlled literals, so there is no untrusted input. It is a test-harness pattern, though shell=True with formatting is poor hygiene.
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.