Back to skill

Security audit

电子书下载

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it advertises, but it automates ebook downloads from third-party file-sharing sources with unsafe command templates and insufficient user control.

Review this carefully before installing. Only use it for content you are authorized to download, require explicit confirmation before any download or extraction, and avoid using the provided shell/Python templates with raw book titles or remote URLs unless they are rewritten with validation, safe filenames, fixed output directories, and archive limits.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:82
Finding

Command and Code Injection Through Unsanitized Book Names and Download URLs

Content
View full analysis
" \ -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36" \ -H "Referer: https://z701.com/" \ --max-time 600 ``` ```python import zipfile, os outdir = '书名' os.makedirs(outdir, exist_ok=True) with zipfile.ZipFile('书名.zip', 'r') as z: for info in z.infolist(): try: name = info.filename.encode('cp437').decode('gbk') except: name = info.filename basename = os.path.basename(name) if not basename: continue ext = os.path.splitext(basename)[1].lower() if ext in ('.epub', '.azw3', '.mobi', '.pdf', '.txt'): outpath = os.path.join(outdir, basename) data = z.read(info.filename) with open(outpath, 'wb') as f: f.write(data) print(f'Extracted: {outpath} ({len(data)} bytes)') print('Done!') ``` ```bash rm 书名.zip ``` ### Technical Analysis The skill instructs the agent to substitute a user-provided book name and a remotely obtained download URL directly into executable shell and Python templates. It does not require validation, escaping, canonicalization, or shell-free process execution. Double quotes do not make arbitrary input safe when the input itself can contain a quote, command substitution, a newline, or other shell syntax. The cleanup command is even less constrained because its filename is unquoted. Similarly, inserting a book name into a single-quoted Python literal can terminate the literal and introduce attacker-controlled Python statements. The download URL is obtained from a third-party API response. If that source is compromised or returns a maliciously constructed value, direct textual interpolation into the `curl ...[truncated 1857 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is configured to trigger on very broad ebook-related phrases, including cases where the user only implies a desire to obtain a book. That creates a high risk of acting without clear user consent and, in this case, can initiate a workflow for acquiring copyrighted content from third-party file-sharing sites. The context makes this more dangerous because the skill is not merely informational: it performs web searching, link extraction, decryption steps, downloading, and local file writes.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description states it will download files to the user's computer and complete the full workflow automatically, but it does not require warning or confirmation before making system changes. This is dangerous because it can cause unintended disk writes, execution of follow-on extraction logic, and cleanup actions on the user's machine without informed consent. The surrounding context increases risk because the workflow targets untrusted third-party download sources and compressed archives.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documented steps include curl-based download, Python archive extraction, and removal of the zip file, yet they omit clear safety warnings about disk modifications and cleanup behavior. This is risky because users may not realize the skill will persist files locally, unpack content from untrusted archives, and delete artifacts automatically. In this skill's context, the danger is elevated by the use of third-party hosting and archive handling, though the issue is primarily unsafe automation rather than direct code execution.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.