Back to skill

Security audit

claw-text-and-pics

Security checks for vulnerabilities and agentic risk

Overview

This skill is a straightforward OCR helper that uploads user-selected documents to Mistral and can optionally send extracted images to Telegram, with no hidden persistence or automatic sharing found.

Install only if you are comfortable sending selected documents to Mistral for OCR. Use --send only when you intentionally want extracted images uploaded to Telegram, and avoid confidential, regulated, or third-party documents unless you have permission.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (14)

Tainted flow: 'req' from os.environ.get (line 171, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · ocr.py (reported line 78)May include surrounding context.

python
)

    try:
        with urllib.request.urlopen(req, timeout=30) as resp:
            result = _json.loads(resp.read())
        if result.get("ok"):
            print(f"Sent: {image_path}")

Tainted flow: 'req' from os.environ.get (line 171, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · ocr.py (reported line 181)May include surrounding context.

python
)

    try:
        with urllib.request.urlopen(req) as resp:
            result = json.loads(resp.read())
    except urllib.error.HTTPError as e:
        print(f"API error {e.code}: {e.read().decode()}", file=sys.stderr)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose focuses on OCR via Mistral, but the skill also supports sending extracted images to Telegram, which is a separate exfiltration path not reflected in the primary description or permissions. This mismatch can cause users or orchestrators to approve the skill for document reading while overlooking that sensitive document contents may be transmitted to an additional third-party service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README shows URL input usage without clearly warning that the referenced remote document content will be fetched and sent to Mistral's OCR API, a third-party service. Because this skill is specifically designed to process documents that often contain sensitive information, users may unknowingly upload private files or contents from internal links to an external provider.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README promotes sending extracted document images to Telegram but does not warn that potentially sensitive document contents will be transmitted to a third-party messaging platform outside the local agent environment. In the context of OCR on receipts, invoices, contracts, and handwritten notes, this creates a realistic risk of unintentional disclosure of personal, financial, or confidential business information.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill uses sensitive capabilities including environment-variable access, local file reads, network access, and shell execution, but does not declare a tool scope or permissions boundary. That omission reduces transparency and weakens policy enforcement, making it easier for an agent or user to invoke the skill without understanding that documents and secrets may be accessed and transmitted externally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description and usage guidance do not clearly warn that document contents may be uploaded to Mistral for OCR and optionally forwarded to Telegram. For receipts, contracts, invoices, and handwritten notes, that omission is significant because these inputs commonly contain personal, financial, or confidential information.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

text

This skill reads `~/.openclaw/.env` as a fallback for credentials.
Ensure the file has restricted permissions: `chmod 600 ~/.openclaw/.env`

## Requirements
- Python 3.11+

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code reads Telegram credentials from environment variables and can send extracted document images to Telegram, but that behavior is not justified by the stated OCR-only purpose. In a document-processing context, this creates a meaningful risk of unintended disclosure of sensitive images derived from invoices, contracts, or personal records.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · ocr.py (reported line 33)May include surrounding context.

python
from pathlib import Path

API_KEY = os.environ.get("MISTRAL_API_KEY", "")
API_URL = "https://api.mistral.ai/v1/ocr"


def encode_file(path: str) -> str:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description presents OCR extraction, but the code also includes a secondary capability to transmit extracted images to Telegram. That expands the data-handling scope from local processing plus OCR API use into optional redistribution of document-derived content to another third party, which can surprise users and increase confidentiality risk for receipts, contracts, or IDs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The Telegram API endpoint enables outbound transmission of extracted images to a service unrelated to the skill’s stated OCR purpose. In the context of processing sensitive scanned documents, adding a second external sink materially increases the chance of unintended disclosure or misuse.

Content

Scanner excerpt · ocr.py (reported line 49)May include surrounding context.

python
"""Send image as Telegram photo via Bot API (stdlib only)."""
    import json as _json

    url = f"https://api.telegram.org/bot{bot_token}/sendPhoto"
    boundary = "----ClawDocScanBoundary"

    ogg_path = Path(image_path)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code base64-encodes local images or PDFs and sends the full document contents to the external Mistral OCR API. Because this skill targets potentially sensitive documents such as receipts, invoices, contracts, and handwritten notes, failing to provide a clear warning about third-party transmission increases privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

When --send is used, extracted images derived from the source document are transmitted to Telegram without an explicit warning at the moment of sending about third-party disclosure. Given the skill’s focus on scanned documents, this can expose sensitive embedded content outside the original OCR workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.