Back to skill

Security audit

Doc Ocr Skills

Security checks for vulnerabilities and agentic risk

Overview

This OCR skill appears purpose-aligned, but its installation path asks users to execute mutable remote code and an unauthenticated native binary that is not included for review.

Review this skill carefully before installing. Prefer building from reviewed source or using a release with published checksums/signatures, avoid the curl | bash command, do not run the installer with elevated privileges, and use local OCR engines for sensitive documents unless you are comfortable sending the selected files to Gemini. If you use Gemini, protect and rotate the API key because the documented config stores it in plaintext.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
README.md:28
Finding

Remote installation script is streamed directly into Bash

Content
View full analysis
Remediation
View remediation
/scripts/install.sh ``` 3. Publish an expected SHA-256 digest through a separately authenticated release channel and require verification before execution: ```bash echo " install.sh" | sha256sum --check - ``` 4. Cryptographically sign release scripts and document signature verification using a pinned maintainer key or Sigstore. 5. Pin installation URLs to an immutable release tag and commit rather than `main`. 6. Encourage users to inspect the downloaded script before invoking it explicitly with `bash install.sh`. 7. Do not recommend running the installer with `sudo` or from a privileged account. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install.sh:28
Finding

Installer downloads and enables an unauthenticated native executable

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:20
Finding

Installation instructions use unpinned third-party dependencies

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
README.md:54
Finding

Gemini API key is written to plaintext configuration without enforced permissions

Content
View full analysis
~/.ocr/config << EOF # Google Gemini API Key gemini_api_key=your_gemini_key_here EOF ``` The Skill provides the equivalent configuration procedure: ```bash mkdir -p ~/.ocr cat > ~/.ocr/config << EOF # Google Gemini API Key gemini_api_key=your_gemini_key EOF ``` ### Technical Analysis The instructions store a long-lived API credential in a plaintext file. They do not set restrictive permissions on either `~/.ocr` or `~/.ocr/config`; resulting permissions depend on the user's current umask and any pre-existing directory permissions. On systems with an unusually permissive umask or shared-home configuration, other local principals or processes may be able to read the credential. The risk is compounded because the unaudited downloaded OCR executable is expected to read this file. Plaintext local storage may be operationally necessary when a tool lacks credential-store integration, but the instructions should explicitly enforce owner-only access. ### Attack Path 1. A user follows the documented configuration command under a permissive umask or in a home directory with insufficient access restrictions. 2. `~/.ocr/config` is created with permissions that allow an unintended local principal or process to read it. 3. That principal reads the `gemini_api_key` value. 4. The exposed key is used to submit API requests, consume quota, incur costs, or access any API capabilities assigned to it. ### Impact Assessment The primary impact is disclosure and unauthorized use of the Gemini API key. The attacker obtains the permissions and quota granted to that credential, but this finding alone does not establish operating-system privilege escalation. Potential consequences include unauthorized ...[truncated 117 chars]
Remediation
View remediation
"$HOME/.ocr/config" <<'EOF' gemini_api_key=your_gemini_key_here EOF chmod 600 "$HOME/.ocr/config" ``` 3. Prefer an operating-system credential store or secret manager rather than a plaintext file. 4. Support reading the key from a protected environment or file-descriptor-based secret supplied only to the OCR process. 5. Ensure the application never logs the key or includes it in error output. 6. Document key rotation and immediate revocation procedures. 7. Scope the API key to only the required Gemini service, with quotas and billing alerts where supported. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (15)

Chaining Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

Piping remote content straight into bash is dangerous because it chains retrieval and execution with no opportunity for validation. In the context of a CLI installation flow, this materially increases the chance of immediate arbitrary code execution from a compromised upstream source.

Content

Scanner excerpt · README.md (reported line 31)May include surrounding context.

Use our convenient install script to download the latest pre-compiled binary for your system:

bash
curl -sSL https://raw.githubusercontent.com/scottkiss/doc-ocr-skills/main/scripts/install.sh | bash

Note: The script installs the docr binary into a docr directory relative to where it's run. Add it to your PATH for global access.

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

Piping curl output directly into bash removes the user's opportunity to review the downloaded script and amplifies supply-chain risk. In the context of an install command, this can lead to immediate arbitrary code execution with the user's privileges if the remote content is tampered with.

Content

Scanner excerpt · README_CN.md (reported line 31)May include surrounding context.

使用我们的安装脚本下载适用于您系统的最新预编译二进制文件:

bash
curl -sSL https://raw.githubusercontent.com/scottkiss/doc-ocr-skills/main/scripts/install.sh | bash

注意:脚本会将 docr 二进制文件安装到运行目录下的 docr 文件夹中。建议将其添加到 PATH 以便全局访问。

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The feature list promotes Gemini support but does not clearly warn that using the Gemini engine sends document contents to a third-party cloud service. For an OCR tool that may process sensitive PDFs and images, this omission can lead users to unintentionally transmit confidential material off-device.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The README recommends npx skills add scottkiss/doc-ocr-skills without pinning a specific package version or immutable reference. This can cause users to fetch whatever package/version is current at execution time, increasing supply-chain risk if the package is compromised or a breaking/malicious release is published.

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 · README.md (reported line 55)May include surrounding context.

  • PaddleOCR: pip install paddleocr paddlepaddle

API Configuration (For Gemini)

To use the Gemini engine, create a configuration file at ~/.ocr/config:

bash
mkdir -p ~/.ocr

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The feature list advertises Gemini support but does not clearly warn that using the Gemini engine sends document contents to a third-party cloud service for processing. For an OCR tool that may handle sensitive PDFs or images, this omission can cause users to disclose confidential data unintentionally.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

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 · README_CN.md (reported line 58)May include surrounding context.

要使用 Gemini 引擎,请在 ~/.ocr/config 创建配置文件:

bash
mkdir -p ~/.ocr
cat > ~/.ocr/config << EOF
# Google Gemini API Key
gemini_api_key=您的_gemini_密钥

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill explicitly instructs users to run shell commands and an installer script, but the manifest does not declare any tool scope such as permissions or allowed-tools. This weakens reviewability and containment because consumers cannot easily tell that shell execution and binary download are required before using the skill.

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 18)May include surrounding context.

API Key Configuration

Create the config file:

bash
mkdir -p ~/.ocr

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The Gemini engine sends document contents to a cloud service, but the skill does not provide a clear privacy or data-transmission warning near usage instructions. Users may unintentionally upload sensitive PDFs or images to an external provider, creating confidentiality and compliance risk.

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 99)May include surrounding context.

md
| Error | Solution |
|-------|----------|
| `config file not found` | Create `~/.ocr/config` with API keys |
| `gemini_api_key not found` | Add `gemini_api_key=VALUE` to config |
| `file not found` | Verify the document file path |
| API timeout | Retry; large files may need longer |

External Script Fetching

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The README instructs users to fetch and execute a remote script directly with curl ... | bash, which prevents inspection before execution and creates a straightforward supply-chain execution path. If the GitHub account, repository, branch, or network path is compromised, arbitrary code will run on the user's machine.

Content

Scanner excerpt · README.md (reported line 31)May include surrounding context.

Use our convenient install script to download the latest pre-compiled binary for your system:

bash
curl -sSL https://raw.githubusercontent.com/scottkiss/doc-ocr-skills/main/scripts/install.sh | bash

Note: The script installs the docr binary into a docr directory relative to where it's run. Add it to your PATH for global access.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

该 README 全文以中文编写,未在正文中说明语言可由用户选择,也未提示这是面向特定中文受众的区域化文档。虽然 L006 链接到英文版本,但当前文档本身未提供用户可选语言或明确的本地化范围说明。

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The README instructs users to fetch and execute a remote shell script directly from the network. If the GitHub account, repository, branch, or delivery path is compromised, users may immediately run attacker-controlled code on their system without inspection.

Content

Scanner excerpt · README_CN.md (reported line 31)May include surrounding context.

使用我们的安装脚本下载适用于您系统的最新预编译二进制文件:

bash
curl -sSL https://raw.githubusercontent.com/scottkiss/doc-ocr-skills/main/scripts/install.sh | bash

注意:脚本会将 docr 二进制文件安装到运行目录下的 docr 文件夹中。建议将其添加到 PATH 以便全局访问。