Back to skill

Security audit

Tesseract OCR文字识别

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local OCR helper whose file access and optional output writing match its stated purpose, though it appears to have implementation bugs.

Install only if you are comfortable running a local Python/Tesseract OCR helper on images you choose. Expect to provide local image paths and possibly an output path, and be aware the current code may need fixes before it works reliably because of import and missing-dependency bugs.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

整体上,代码的主功能与声明基本一致:它是一个基于 Tesseract 的图片 OCR 技能,并提供 text、structured、question_answer 三种输出形式,这一点与描述高度吻合,也没有发现额外敏感或未声明的资源访问、网络通信、数据外传或无关触发器。之所以判定为 mismatch,是因为声明对语言能力作了较具体的承诺——仅支持中文、英文、中英混合三种模式——而代码并没有实现这种三选项能力约束或映射逻辑,只是把 language 参数原样传给 pytesseract,因此实现与描述存在细粒度不一致。另外,代码中后半段重复定义同名函数并调用未导入的 os,会影响实际运行,说明该技能实现质量与声明中的完整功能存在偏差。该不一致属于描述与实现能力边界不完全一致,而非恶意越权行为。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description and feature list are written as supporting only Chinese (Simplified), English, or mixed Chinese-English modes, and the overall documentation is presented in Chinese without any opt-in or locale choice. Under the policy, forcing a specific language/locale without user opt-in is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function signature hard-codes the default OCR language as "chi_sim+eng", which imposes a specific locale/language behavior automatically. The policy allows locale constraints only when the user is given a choice or the constraint is clearly justified, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The main function pulls language from params but falls back to "chi_sim+eng" when none is provided, again enforcing a language choice implicitly. This is a natural-language locale policy issue because users are not offered an explicit language selection before the skill applies a specific default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The second definition of extract_text_with_tesseract again sets the default language to "chi_sim+eng", reinforcing the same locale-specific behavior across the skill. Because the file provides no opt-in or justification, this remains a policy violation rather than an implementation detail.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The module docstring states the skill is specifically for processing screenshots of traditional Chinese medicine textbooks in Chinese. This is a natural-language locale/domain constraint presented as a fixed specialization, but the file does not explain a user opt-in mechanism or a clear policy/compliance justification for forcing that language/context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The manifest description is presented only in Chinese and specifies a narrow Chinese-domain use case for traditional Chinese medicine textbook screenshots. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in, and no alternative language/locale choice is described here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest description narrows language support to three modes, suggesting a constrained OCR interface. In code, the language parameter is passed directly to pytesseract.image_to_string without validation, so any installed Tesseract language combination could be used instead of just the declared three modes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The docstring describes only OCR text extraction, while the function also transforms OCR output into structured and question_answer formats. This is not merely omitted detail in the surrounding module context; the function documentation understates and misrepresents the actual intent of the function's output modes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring says the skill is specifically for processing screenshots of traditional Chinese medicine teaching materials, and the CLI description says 'for TCM Materials'. In practice, the code imposes no such restriction and forwards any user-supplied image path to the OCR engine, so the documentation describes a narrower intent than the implemented behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.