PyPI / matplotlib / 3.11.2
matplotlib 3.11.2
- Source
- https://github.com/matplotlib/matplotlib
- Tag scanned
v3.11.2- Compared with
v3.11.1(0 signals introduced since)- Files
- 1662 scanned, 2826 skipped (binary, oversized, or unrecognised)
- Signals
- 0 critical · 0 warn · 35 info
- Scan time
- 23.6 s
- LLM review
- Reviewed by claude-haiku-5-5 (Anthropic): 30 of 30 warn and critical signals; 30 demoted to info.
- Disclude version
- 4.0.0
- Scanned (UTC)
- 2026-10-14 18:46
Signals
Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.
-
likely benign Long inheritance-diagram directive listing matplotlib class names in API docs.
Reasoning
A very long line in an RST doc containing a list of class names for an inheritance-diagram directive. Typical of generated or auto-listed documentation; no malicious content.
-
likely benign Sphinx configuration probing optional dependencies via __import__ in a try/except.
Reasoning
Sphinx conf checking for optional modules by importing names in a loop, catching ImportError and recording missing ones. The dynamic __import__ is on a module name from a known list, a common pattern for detecting missing optional dependencies. Still a non-literal import, so a small doubt remains.
-
info
warn→ info by reviewunicode-homoglyphdoc/release/prev_whats_new/dflt_style_changes.rst:707:25dismissed Unicode demo list of bar labels in a release-notes doc.Reasoning
Greek alpha used as a label string in a documentation example showing Unicode text labels for plots. It appears inside a list of deliberately diverse Unicode demo strings, so the homoglyph flag is a false positive in prose/example code.
-
info
warn→ info by reviewunicode-homoglyphdoc/release/prev_whats_new/dflt_style_changes.rst:717:37dismissed Russian-language plot title in a release-notes example.Reasoning
Cyrillic text 'со смайликами' is a Russian title string in a documentation example demonstrating Unicode rendering. Intentional localized text, not an identifier-spoofing attack.
-
-
info
warn→ info by reviewdynamic-format-stringextern/agg24-svn/src/ctrl/agg_slider_ctrl.cpp:165:17char buf; ; m_text.; }likely benign Vendored AGG slider control using sprintf with a stored format string.Reasoning
This is the vendored AGG library's slider control, which calls sprintf with a format string member. The format is a developer-set label, not attacker input, but the pattern is a genuine format-string risk in the upstream library. Not obfuscation or malicious intent.
-
info
warn→ info by reviewdynamic-executiongalleries/examples/ticks/date_formatters_locators.py:32:36likely benign Gallery example evaluating locator expression strings for date tick formatting.Reasoning
Example script that evaluates a user-specified locator string from a demo configuration list. eval here is used on developer-authored example strings for matplotlib locators; it is a demo pattern, not a dropper or hidden payload.
-
info
warn→ info by reviewdynamic-executiongalleries/examples/ticks/date_formatters_locators.py:35:38likely benign Gallery example evaluating formatter expression strings for date ticks.Reasoning
Same example file; eval on formatter string from the developer's demo list to show tick formatter options. Benign teaching code.
-
""" ydata = eval(expression, {'np': np}, {'t': t}) l.set_ydata(ydata) ax.relim()likely benign Textbox widget example evaluating a typed expression to plot data.Reasoning
Widget example that evaluates a user-typed math expression with restricted globals ({'np': np}) to plot a function. Interactive demo; the eval is a known and intentional part of the example, not hidden malicious behavior, though eval on user input is risky in general.
-
= -
info
warn→ info by reviewdynamic-executiongalleries/users_explain/figure/interactive_guide.rst:443:12dismissed Documentation snippet illustrating eval in an interactive guide.Reasoning
Prose documentation showing an eval call inside a markup code block illustrating an interactive REPL loop. The eval is on a string literal context in docs, not executed code.
-
=likely benign Deprecation helper walking frames to find the caller's stacklevel.Reasoning
Matplotlib's API helper uses sys._getframe to walk the call stack and determine the caller's stacklevel for deprecation warnings. Standard, legitimate introspection.
-
likely benign Axes code using inspect.stack to name the caller in a kwarg error.
Reasoning
Uses inspect.stack()[1].function to report the calling function name in a keyword-argument error. Ordinary error-message construction.
-
varlikely benign Minified vendored ResizeObserver polyfill in the web backend.Reasoning
Minified vendored JavaScript (ResizeObserver polyfill from jsxtools) on a single long line. Minification explains the length; the visible code is a standard polyfill with no suspicious network or exec behavior in the snippet.
-
=likely benign Collects keyword parameter values from locals() in matplotlib's layout engine.Reasoning
Reading locals() by parameter name inside a method that forwards keyword arguments is a common Python idiom; the names come from the function's own __kwdefaults__, so this is ordinary introspection, not obfuscation.
-
=likely benign Assigns parameter values read from locals() into the engine's _params dict.Reasoning
Same locals()-by-name parameter forwarding as the sibling finding; it reads the function's own argument names with no external input.
-
=likely benign Repeats the locals()-by-name parameter collection in a second layout engine class.Reasoning
Duplicate of the same locals()-based parameter forwarding pattern in another constructor/method; benign.
-
=likely benign Copies locals()-derived parameter values into _params in the second layout engine class.Reasoning
Same benign locals() forwarding pattern; the keys are the function's own keyword names.
-
is , , 2 and 1 , : -
- - - -
- - """ from .transforms import Bbox -
. =likely benign Copies backend function signatures onto pyplot module-level wrappers via globals().Reasoning
Iterates a hardcoded list of backend function names and sets __signature__ on module globals; a known matplotlib pattern for exposing backend signatures, with no external data involved.
-
# check if it's valid Python as-is return Falselikely benign Checks whether a plot directive's code block is valid Python via compile().Reasoning
compile() on documentation source text purely to check syntax validity is a normal Sphinx directive check; it does not execute the code.
-
=likely benign Executes the configured plot_pre_code setup string in the plot directive namespace.Reasoning
exec of plot_pre_code from the Sphinx configuration is the documented way to run setup code for doc plots; this is intended build-time execution of the project's own docs code, not hidden malice.
-
likely benign Runs the documented plot code block with exec inside a namespace.
Reasoning
Executing user plot code from documentation sources is the purpose of the plot directive. It runs at docs build time, which is expected behavior for this tool, though it is arbitrary code execution by design.
-
likely benign Invokes a named plotting function from the directive option via exec on a constructed call string.
Reasoning
exec of function_name + '()' looks like a constructed string, but function_name comes from the directive's own parsed options and the call is a simple invocation of a plot function. Flagged critical by the signal, yet the context is the documented plot directive behavior.
-
info
warn→ info by reviewdecoder-decompress-payloadlib/matplotlib/tests/test_simplification.py:449:27= = =likely benign Decodes base64 test data into vertex arrays for a path simplification test.Reasoning
base64 decoding of an embedded test vertex array followed by numpy frombuffer is ordinary test fixture data handling; no decompression to executable code, just path vertices.
-
= =likely benign Evaluates a Bbox repr in a test to verify round-tripping.Reasoning
eval of repr(b) with a restricted namespace in a test that round-trips a Bbox; the input is the test's own object, a standard test idiom.
-
= assert ==likely benign Evaluates a Bbox string form in a test to build a dict for comparison.Reasoning
eval of str(b) in a test with a restricted namespace, operating on a locally created Bbox; benign test code.
-
= = assert ==likely benign Evaluates formatted Bbox attribute values in a test assertion.Reasoning
eval of a format string applied to test-local values in a test assertion; no external input, benign.
-
assert ==likely benign A test evaluates a formatted attribute string to check it round-trips to the expected value.Reasoning
The eval runs on a format string built from the test's own asdict values and fixed format specs, inside a unit test. It is a round-trip check, not attacker-controlled input, though eval is a poor pattern.
-
ifdismissed Local variable xo holds an x offset for an affine transform.Reasoning
The snippet is ordinary geometry code: reading offsets and applying an affine transform. The confusable match comes from short names like xo and a near-identical identifier, which is a naming heuristic false positive. Token-pass findings of this kind are noisy.
-
double xo = ; double yo = ; offset_trans.; trans *= agg::;dismissed Local variable yo holds a y offset for an affine transform.Reasoning
Same pattern as the xo finding: yo is the y offset used with offset_trans.transform, which is standard rendering code. The collision is a short-name heuristic artifact.
-
// Try loading from the main program namespace first. auto main_program = ; auto success = ; // We don't need to keep a reference open as the main program always exists.likely benign Opens the main program handle to look up already-loaded Tcl/Tk symbols.Reasoning
dlopen(nullptr, RTLD_LAZY) is the standard idiom for obtaining a handle to the main program's global symbols. It is used to find Tcl/Tk symbols already linked into the process, and the nullptr argument is not a path being attacker-controlled.
-
std::string path = py_path_b; auto tkinter_lib = ; iflikely benign Loads the Tcl/Tk shared library from a path resolved on the Python side.Reasoning
The path comes from py_path_b, a path supplied by the Python side that locates the tkinter shared library. Loading a library from a runtime-determined path is a legitimate need for this feature, and the code reports errors via dlerror. Risk exists only if the path is attacker-controlled, which the snippet does not suggest.
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.
&&