Back to skill

Security audit

Python Matplotlib Chinese Font

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward matplotlib Chinese-font helper with some documentation and code-quality issues, but no evidence of hidden persistence, exfiltration, or unsafe authority.

Install only if you need Chinese text support in matplotlib. Verify the external font download source and license, and prefer the template file over references/plot_utils.py until the syntax/legacy-code issue is fixed.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The title and description explicitly position the skill as a Chinese-only solution, and the document consistently presents instructions solely in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is documented and justified as region-specific.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

bash
# 创建字体目录
mkdir -p fonts

# 下载 BabelStoneHan 字体(约 50MB)
curl -L -o fonts/BabelStoneHan.ttf "https://www.babelstone.co.uk/Fonts/Download/BabelStoneHan.ttf"

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

bash
# 创建字体目录
mkdir -p fonts

# 下载 BabelStoneHan 字体(约 50MB)
curl -L -o fonts/BabelStoneHan.ttf "https://www.babelstone.co.uk/Fonts/Download/BabelStoneHan.ttf"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This Python file contains user-facing natural-language comments and docstrings entirely in Chinese, including the module description and usage guidance, with no indication that the skill supports multiple languages or that Chinese is a required locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The section beginning at L175 presents itself as explanatory compatibility notes following the function definition, but lines L182-L197 contain indented code such as creating FontProperties, setting rcParams, printing success/failure, and calling setup_chinese_font(). This contradicts the surrounding documentation structure and the earlier function body ending at L172, making the documentation's claimed code layout misleading relative to what is shown.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

After return font_manager.FontProperties() at L134, the file contains an indented docstring fragment and old implementation code claiming bool: 是否成功配置 and returning True/False. This inline documentation and dead code contradict the active function above, which returns FontProperties objects instead of booleans.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

setup_matplotlib treats setup_chinese_font as if it returns a boolean success value, using if not setup_chinese_font(...) at L183. But the active implementation of setup_chinese_font documents and returns a FontProperties object at L60-L61 and L124/L134, so the surrounding code's intent and API expectations diverge from the actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This Python file contains natural-language instructions and function naming that explicitly target Chinese-language font setup only. Under the policy rule for language or locale constraints, a forced language-specific behavior should either offer user choice or clearly justify the locale-specific scope.

Content

No source excerpt is available for this finding.