Back to skill

Security audit

Ccy Ocr Local

Security checks for vulnerabilities and agentic risk

Overview

This is a local OCR and chart-recognition skill with expected local file processing and no evidence of hidden upload, persistence, or destructive behavior.

Install dependencies in a virtual environment and prefer pinned, reviewed versions. Only run batch OCR on directories you intend to process, and redact or avoid adding sensitive screenshots to evaluation or training folders unless you have explicit permission.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (1)

T08 · Insecure Dependencies

Warning
Location
README.md:114
Finding

Unpinned Third-Party Dependency Installation

Content
View full analysis

Vulnerability Details

File Location: README.md:114
Additional Location: CLAWHUB.md:112
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Medium

Vulnerable Code:

bash
pip install opencv-python numpy pytesseract

Technical Analysis

The installation instructions retrieve mutable package versions from the user's configured Python package index. No exact versions, cryptographic hashes, lockfile, or trusted index are specified. Consequently, the code that users install may differ from the code reviewed during this audit.

Python package installation can execute package build or installation logic with the privileges of the invoking user. A compromised upstream release, dependency-confusion condition, malicious index configuration, or unexpected future package release could therefore introduce arbitrary code or silently change OCR behavior.

The audited package names appear consistent with the declared OCR functionality, and no evidence shows that the project intentionally references a malicious or typosquatted package. This finding concerns insufficient supply-chain controls rather than a confirmed malicious dependency.

Attack Path

  1. A user follows the documented installation command.
  2. pip resolves the latest available package versions from the user's configured package indexes.
  3. An attacker compromises an upstream distribution or causes a malicious distribution to be preferred through index manipulation or dependency confusion.
  4. pip downloads and installs that unaudited distribution.
  5. Malicious build or installation code executes with the user's privileges, or malicious runtime code executes when the OCR scripts import the package.

Impact Assessment

Successful exploitation could execute arbitrary code with the privileges of the user running pip or the OCR application. This could expose files accessible to that account, alter OCR results, modify application data, or install addition ...[truncated 131 chars]

Remediation
View remediation

Remediation Suggestions

  1. Define reviewed, exact dependency versions in a requirements or lock file, for example:
text
opencv-python==REVIEWED_VERSION
numpy==REVIEWED_VERSION
pytesseract==REVIEWED_VERSION
  1. Generate and verify cryptographic hashes for all packages and transitive dependencies, then install with:
bash
python -m pip install --require-hashes -r requirements.txt
  1. Document and enforce an approved package index rather than relying on arbitrary user-level pip configuration.

  2. Prefer installation inside a dedicated virtual environment under a non-privileged account.

  3. Add automated dependency vulnerability and provenance checks to the release process.

  4. Keep README.md and CLAWHUB.md synchronized so both direct users to the same locked installation procedure.

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 (130)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明强调的是“本地离线 OCR / 图表识别”技能,核心能力应包括从图片中自动识别文本和图表数据。实际代码仅创建标注目录并为输入图片写出包含空字段的 JSON 标注模板(图表类型列表、元素框坐标、文本内容占位),其主要用途是数据集标注准备,而不是对图片执行识别或提取。虽然代码是本地运行、未调用外部 API,这一点与声明部分一致,但技能的主要目的和能力与声明明显不符,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是面向最终使用的本地离线识别能力:处理截图、扫描件、表格/图表图片并提取中英文文本与图表数据。但给出的代码块仅是一个“数据收集脚本”,主要创建目录并把若干数据集说明信息写入 JSON 文件。代码没有读取用户图片、没有调用 OCR 或图表解析库、没有做任何图像处理、文本识别、表格识别或图表数据抽取。虽然代码中提到公开数据集 URL 和内部数据集,但仅保存元数据,没有实现与声明相符的核心功能。因此该代码与声明的主要目的存在明显不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

该代码块与声明用途存在明显不一致。声明描述的是一个可对本地图片进行离线 OCR 与图表识别的技能,但实际代码只是部署准备脚本:定义若干 Tesseract/OpenCV 模型名称和路径,创建目录,并把模型信息保存为 JSON。它没有实现任何输入图片处理、调用 OCR 引擎、解析图表、提取文本/数据等核心能力。虽然代码提到 Tesseract 和 OpenCV,可能属于该技能的配套组件,但就此代码块本身而言,其行为与声明的主要功能 materially different,应判定为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明的核心用途是离线 OCR 与图表识别,对本机图片内容进行实际识别和提取;而代码的核心行为是评估若干预定义模型,且评估过程还是模拟的(time.sleep 和固定指标),没有加载图片、没有执行 OCR、没有进行图表解析,也没有提供用户输入图片处理流程。虽然代码名称和注释提到 Tesseract/OpenCV,与声明领域相关,但其主要功能与声明的最终用户能力明显不同,因此属于实质性描述不符。代码仅进行本地文件写入,没有发现外部 API 调用,这一点与“不上传文件”不冲突。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明强调的是“本地 OCR / 图表识别”能力,即从现有图片中离线提取文字和图表数据。但该代码仅使用随机数和固定模板构造图表/表格对象,保存为 JSON 文件,属于数据集生成/样本生成功能。代码中没有任何图像加载、OCR 引擎调用、文本识别、图表解析或文件上传行为。虽然其结果与图表数据有关,但主要用途与声明的识别型技能明显不同,因此构成实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个面向终端功能的本地 OCR / 图表识别技能,但该代码片段的实际用途是“推理优化脚本”:为 Tesseract 和 OpenCV 相关模型写入 multithread、batch_size、cache_size、timeout 等参数,并生成汇总 JSON 文件。代码没有读取图片、没有进行文字识别、没有提取图表数据,也没有体现截图/扫描件/表格处理流程。虽然它与 OCR/图表识别领域相关,可能属于该技能的辅助构建/运维脚本,但就该代码片段本身而言,其主要行为与声明的核心功能存在明显不一致,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个面向终端使用的本地离线 OCR/图表识别技能,核心行为应是读取本机图片并执行文字/图表内容提取。实际代码没有读取图片、没有调用 OCR 引擎、没有运行 OpenCV 识别流程、没有输出识别结果,也没有任何截图/文档/扫描件处理逻辑。它仅构造一些预设优化参数,并将其写入 JSON 文件,属于模型配置/训练准备或调优辅助脚本。虽然代码是本地执行且未显示调用外部 API,这一点与声明部分一致,但其主要用途与声明的技能能力明显不符,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

声明的核心能力是对图片进行离线 OCR 和图表识别/数据提取;但提供的代码块只是一个速度优化脚本。它创建 data/speed 目录,为多个 Tesseract/OpenCV 模型生成包含线程数、批处理、缓存、超时、GPU 加速等参数的 JSON 文件,并输出汇总文件 all_speed.json。代码没有读取图片、执行 OCR、解析图表、提取文本或图表数据,也没有体现截图/文档图片处理流程。虽然它与 OCR/图表识别生态相关,可能属于辅助运维或配置工具,但其实际主要目的与声明的终端用户功能明显不一致,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的核心能力是离线图像 OCR 和图表内容提取,但提供的代码块只是一个稳定性优化脚本:创建目录、构造参数字典、将 JSON 配置写入磁盘,并汇总多个模型的配置。代码没有读取或分析图片,没有调用 Tesseract/OpenCV 进行识别,也没有实现文本或图表数据提取。虽然代码提到 Tesseract 和 OpenCV,和声明领域相关,但其实际主用途与声明的最终用户功能明显不一致,因此应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个面向用户的本地 OCR / 图表识别能力,重点在对截图、扫描件、表格/图表图片进行离线识别与提取。实际代码则是一个内部工具脚本:生成若干 Tesseract 配置,保存到 data/config,调用本地 tesseract 对字符串样例做测试,并将结果保存到 data/results/optimized_configs.json。代码没有读取任何图片、没有进行图像预处理、没有输出 OCR 结果给用户,也没有图表解析逻辑。因此其主要目的与声明不符。虽然它仍与 OCR 生态相关,且未显示联网,但核心行为是“配置优化测试”而不是“本地图片 OCR / 图表识别”,应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个面向最终使用的离线 OCR/图表识别技能,核心能力应是对本地图片做识别和数据提取。实际代码块的核心目的却是“训练阶段”工具:它从 data/synthetic/all_synthetic_data.json 读取合成数据,构造 digit/axis/legend/title 训练文本,生成 .box 文件,并通过 subprocess.run 调用 tesseract 命令训练模型,最后把模型信息写入 data/models。虽然这仍与 OCR 领域相关,且是本地执行、不涉及外部 API,但其主要行为与声明的运行时识别功能明显不同,属于 materially different primary purpose,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个面向终端功能的本地 OCR / 图表识别技能,核心能力应包括对图片进行离线文字识别和图表数据提取。实际代码只是一个 Tesseract 参数调优脚本:定义若干针对 digit/axis/legend/title 的参数模板,写入本地 JSON 文件,并生成命令行配置字符串。代码没有读取图片、没有调用 Tesseract 执行识别、没有解析文档/扫描件/表格/图表,也没有任何 OCR 输出结果。因此其主要行为与声明的主要用途存在实质性不一致。虽然代码是 OCR 相关的支持性配置脚本,且确实是本地执行、未使用外部 API,但就该代码块本身而言,它不实现声明中的核心能力,应判定为不匹配。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `scripts/local_ocr.py`:通用离线 OCR CLI

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing instructions and usage details exclusively in Chinese, and does not indicate that the skill is region-specific or that users may choose another language. Under the policy for natural-language violations, forcing a specific language without user opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is written entirely in Chinese, including operational instructions and status text, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, a skill that effectively forces a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all instructions and operational guidance only in Chinese, and it does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific context. 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.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The roadmap explicitly includes user-provided chart screenshots as training data but does not mention consent, minimization, retention limits, anonymization, or segregation of sensitive content. In an OCR skill, screenshots can easily contain personal, financial, medical, or business-confidential information, so reusing them for training without privacy controls creates a real data-governance and leakage risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

Natural-language policy violations apply to all file types, including markdown. Lines L26-L27 explicitly mention Chinese colon characters in the training scope, which suggests a locale-specific design choice; the document does not indicate user opt-in, multilingual support, or a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The entire roadmap is written in Chinese and ends with a direct user-facing prompt in Chinese, without indicating that language selection is optional or region-specific. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill documentation describes commands that read environment variables, invoke local shell commands, and perform local file reads/writes, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap: an agent may grant broader-than-necessary local access when executing this skill, increasing the chance of unintended filesystem or process interaction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description is written as a requirement/support statement centered on Chinese and English OCR, and the rest of the document consistently instructs use in Chinese without any opt-in or alternative locale guidance. This creates a natural-language locale policy concern because the skill is presented in a single language context rather than offering user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This JSON contains multiple natural-language descriptions and labels only in Chinese, such as dataset descriptions and type names. Under the policy, forcing a specific language without user opt-in or a documented justification can be a locale-policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

技能清单描述强调的是对本机图片进行离线 OCR 和图表数据提取,即从现有图片中识别内容;而该文件实现的是数据集标注流程,并在本地创建 labeled 目录、生成多份标注结果 JSON 及汇总文件。这不是识别提取的直接实现细节,而是额外的数据生产/标注能力,和清单宣称的终端用户用途不一致。

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

annotate_all 会对输入图片批量生成类型、元素、文本三类标注,并保存总汇总文件,体现的是人工/半自动数据集构建能力。对于一个声明为本地 OCR / 图表识别的技能,这种数据标注流水线并不是完成识别任务所必需的直接能力,也未在描述中说明。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says the skill performs local OCR and chart/text extraction on local images without external APIs. This module's documented purpose and implemented behavior are data curation tasks for training/evaluation datasets, which is materially different from end-user OCR/chart recognition functionality.

Content

No source excerpt is available for this finding.