Back to skill

Security audit

free-ocr-zc

Security checks for vulnerabilities and agentic risk

Overview

This OCR skill is mostly purpose-aligned, but it needs review because it can send local images and an API key to a configurable remote endpoint.

Review this skill before installing. Only use it with images you are comfortable sending to OpenRouter or another configured provider, avoid sensitive documents unless approved, keep the API key scoped and limited, and do not allow untrusted users or wrappers to set OCR_BASE_URL.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
ocr.py:21
Finding

Unrestricted API Endpoint Override Can Expose Credentials and Local Images

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:10
Finding

Unpinned Third-Party Dependencies Create a Non-Reproducible Supply-Chain Risk

Content
View full analysis
Remediation
View remediation
``` 3. Generate and enforce cryptographic hashes, for example with a locked requirements file and: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Record transitive dependencies in a lock file and update them through a controlled review process. 5. Install from the official package index or a trusted internal mirror using explicit index configuration. 6. Run dependency vulnerability and provenance checks during release preparation. 7. Install dependencies in an isolated virtual environment as an unprivileged user rather than in a system-wide or administrator-owned Python environment. 8. Document a repeatable update process that reviews release notes, integrity information, and security advisories before changing pinned versions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill documentation describes OCR functionality that sends user-supplied prompts and image content to OpenRouter, but it does not clearly warn users that their data leaves the local environment and is transmitted to a third-party API. This can cause unintended disclosure of sensitive images, documents, or embedded secrets, especially because the skill also supports local file paths that users may assume are processed locally.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script attempts to read an API key from a hardcoded secrets path under the Administrator profile, which reaches into local sensitive storage unrelated to user input. In an agent-skill context, this is dangerous because it expands the skill’s access to local credentials and may enable unauthorized use of secrets or normalize secret harvesting behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code transmits either an image URL or full base64-encoded local image contents to a third-party remote API without any explicit user warning or consent flow. This can leak sensitive documents, screenshots, IDs, or other private image data, and the risk is heightened because the tool also performs non-OCR analysis beyond what its name implies.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file name, CLI help, and prompt variable describe the tool as OCR-oriented, but the code explicitly performs an additional first step to 'describe the image' using a detailed scene-description prompt before OCR. This is not merely omitted detail in comments: the inline comments at L97 and L102 separate two distinct behaviors, showing the script does broader image analysis than OCR alone.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script sends user-supplied image data to a third-party OCR service at the configured external API endpoint without any explicit consent prompt, warning, or data-handling notice. If the image contains sensitive information such as IDs, financial records, medical data, or proprietary documents, this causes unintended disclosure to an external processor and may violate privacy, policy, or compliance requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script transmits either a user-supplied image URL or the full contents of a local image file to an external OCR service without any explicit consent prompt, warning, or data-handling disclosure. This can expose sensitive images or embedded personal/confidential information to a third-party provider, especially because local files are base64-encoded and sent off-host automatically.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill hardcodes Chinese natural-language defaults such as the OCR prompt and example output text, which implies a specific language/locale preference without user opt-in or explanation. This can conflict with language/locale policy expectations when a skill is otherwise presented as general-purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script hardcodes Chinese-language default prompts and instructions such as OCR提取图片所有文字 and 请详细描述这张图片的内容... with no opt-in or language selection. This can violate language/locale policy when a skill implicitly forces a specific language for all users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The script accesses sensitive credentials by reading an API key from a fixed local secrets path and then from an environment variable. There is no comment or user-facing notice in the executable flow explaining that credentials will be loaded from these sources, which falls under undisclosed access to sensitive environment variables or credentials.

Content

No source excerpt is available for this finding.