T01 · Skill Instruction Hijacking
- Location
scripts/utils/llm_client.py:166- Finding
Untrusted ebook content is passed directly to the privileged main agent
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This TXT ebook cleaner needs Review because it can search local files, upload book contents to cloud/public URLs, send text through a broad OpenClaw agent, and persist AI-learned rules without strong consent or scoping.
Install only if you are comfortable with the skill searching for TXT files, uploading ebook contents outside the device, using an OpenClaw LLM subagent, and saving learned cleanup rules that affect future files. Prefer an explicit local file path, fast/local-only processing, disabled auto_learn, and only process documents you have rights to modify.
scripts/utils/llm_client.py:166Untrusted ebook content is passed directly to the privileged main agent
scripts/ai_modules/mojibake_fixer.py:440Model-generated mojibake mappings are persisted and applied to future documents
scripts/ai_enhanced_cleaner.py:67The documented fast mode may continue to invoke AI processing
SKILL.md:84Local documents are unnecessarily uploaded to cloud storage through a URL workflow
scripts/ai_enhanced_cleaner.py:381Report path construction can overwrite the cleaned output file
SKILL.md:76Runtime dependencies are installed without version or integrity pinning
This finding is especially concerning because it describes a generic prompt-execution path via a local/external agent (openclaw agent) and subprocess invocation, which is far broader than ebook cleanup. That means the skill may act as a general agent wrapper with shell-mediated execution and external interaction, materially increasing risk of command abuse, unintended data exposure, and capability escalation beyond the declared purpose.
This finding is especially concerning because it describes a generic prompt-execution path via a local/external agent (openclaw agent) and subprocess invocation, which is far broader than ebook cleanup. That means the skill may act as a general agent wrapper with shell-mediated execution and external interaction, materially increasing risk of command abuse, unintended data exposure, and capability escalation beyond the declared purpose.
This finding is especially concerning because it describes a generic prompt-execution path via a local/external agent (openclaw agent) and subprocess invocation, which is far broader than ebook cleanup. That means the skill may act as a general agent wrapper with shell-mediated execution and external interaction, materially increasing risk of command abuse, unintended data exposure, and capability escalation beyond the declared purpose.
The workflow explicitly says files are uploaded to the cloud and processed with AI-enhanced components, but the description does not clearly warn users that ebook contents may leave the device and be sent to external services. This is a significant privacy and consent issue, especially for potentially copyrighted, personal, or sensitive text files, and the risk is amplified by the hidden LLM/agent behavior suggested by other findings.
This module launches an external CLI agent to process arbitrary prompts, giving the skill a broad execution and delegation capability that is not justified by the advertised TXT-cleaning purpose. In the context of a narrowly scoped ebook repair skill, spawning a general-purpose local agent expands the attack surface, may expose local data to another toolchain, and can enable unintended capabilities beyond simple text cleanup.
The design adds external LLM/API processing to a skill whose primary purpose is local TXT cleanup, creating a new data-exfiltration path for user-supplied book content. Because the document explicitly configures third-party providers and sends paragraphs, corrupted text, and chapter samples for analysis without strong scope limitation or privacy controls, sensitive or copyrighted content could be transmitted off-device unexpectedly.
The design describes sending text to external LLM APIs for ad detection, mojibake repair, and chapter analysis, but it does not provide a clear user warning or informed-consent step. In this skill context, users reasonably expect local text cleaning; omitting disclosure increases the risk of silent transmission of private, sensitive, or copyrighted material to third-party services.
This markdown file documents AI-enhanced behavior including LLM-based text analysis and 'high-confidence repairs automatically saved as new rules,' but it does not include any warning about potential privacy implications of sending text to an LLM or about persistent modification of rule data. Under the markdown-file criteria, behaviors that could affect user data or privacy should be disclosed to users.
The skill describes capabilities that require file access, shell execution, and network transfer, but it does not declare any explicit tool scope or permission boundaries. This creates a hidden-capability problem: reviewers and users cannot easily see what the skill is allowed to do, increasing the chance of over-privileged execution or unsafe invocation paths.
The trigger phrases are broad enough to match ordinary requests about cleaning or fixing text files, which can cause the skill to activate unexpectedly in contexts the user did not intend. Over-broad triggering becomes more dangerous here because the skill also appears to use file access, uploads, shell steps, and AI processing, so accidental activation can expose local content or initiate external processing without clear user intent.
This manifest/config file contains user-facing natural-language comments entirely in Chinese, including operational descriptions such as processing modes and feature explanations. Under the policy, forcing a specific language without opt-in or justification is a natural-language locale violation, and no alternative language or opt-in mechanism is documented here.
The skill is described as a local TXT cleaning/repair tool, but this configuration enables AI enhancement through an LLM subagent provider. That creates a capability mismatch: user book content may be transmitted to another model-backed component, introducing confidentiality and trust-boundary risks that are not obvious from the stated purpose.
Using an external/provider-backed LLM is not clearly necessary for the advertised TXT repair function, especially when handling potentially copyrighted or sensitive ebook text. If paragraphs are sent to a provider or subagent, users may unknowingly expose local file contents, and the added dependency expands the attack surface beyond simple text cleanup.
The trigger phrases are broad enough to match common requests like '去广告' or '修乱码' without requiring clear TXT/ebook context, which can cause the skill to activate outside its intended scope. In an agent environment, overbroad activation can lead to unintended file discovery or processing on the user's device, especially because the skill supports local file search workflows.
The skill permits ambiguous fuzzy requests like '清理一本txt' and instructs the agent to search the user's device for candidate files. This expands the skill from acting on a user-specified file to proactively enumerating local files, which increases privacy risk and creates opportunities for unintended activation from vague user language.
The script initializes an LLM client and routes book content through AI modules for ad detection, mojibake fixing, and chapter parsing. That means user-provided text may be transmitted to an external model provider, which is a meaningful data exposure/security behavior not obvious from a simple 'txt cleaner/repair' description.
The cleaning pipeline sends the full text through LLM-backed modules without any clear user-facing warning, consent gate, or privacy notice. Because ebooks and txt files may contain personal notes, proprietary material, or sensitive text, silent network transmission to a third-party provider creates a real confidentiality risk.
The _normalize_punctuation logic automatically converts ASCII punctuation to Chinese punctuation based on Chinese-character context, which imposes a specific locale convention on processed text. The file does not provide any user opt-in, toggle, or documented justification for this language-specific transformation.
The detector sends user book paragraphs to an external LLM service for ad classification, which introduces data exfiltration beyond simple local text cleanup. In this skill context, users are likely supplying full pirated or personal ebook content, so transmitting raw paragraphs off-device creates a real privacy and scope-expansion risk even if the feature is intended for functionality.
The batch prompt combines multiple untrusted paragraphs in one context, allowing one malicious sample to influence classification of other samples or the format of the whole response. In this skill, the input text is precisely the kind of messy, externally sourced content that may contain adversarial strings, making cross-item prompt contamination more likely.
The batch detection path performs network-backed LLM analysis on paragraph content without this being clearly necessary from the declared skill scope of text cleaning and repair. Because the skill processes ebook text at scale, this can expose substantial user-provided content to a third party and broadens the trust boundary.
This code sends paragraph content to an LLM but contains no visible user-facing warning, consent check, or policy gate near the transmission point. In a text-repair skill, silent remote submission is dangerous because users may reasonably expect local processing of their ebooks and not third-party inspection.
Single-paragraph detection also transmits raw paragraph text to the LLM, creating the same external data exposure risk as the batch path. Even though only one paragraph is sent at a time, sensitive or copyrighted text can still be disclosed without clear necessity or user awareness.
User-controlled paragraph text is inserted directly into the prompt, so a crafted paragraph can contain instruction-like content that attempts to override the ad-classification task or distort the JSON output. This is a real prompt-injection risk because the code trusts a general-purpose LLM to follow the surrounding instructions while processing adversarial text.
The single-paragraph LLM call has the same undisclosed transmission issue and can leak text content outside the local environment. Lack of transparency increases privacy and compliance risk, especially where uploaded books may contain personal annotations or copyrighted material.