Back to skill

Security audit

txt file convert to epub

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a straightforward local TXT-to-EPUB converter with ordinary dependency and metadata cautions, not hidden or destructive behavior.

Install this in a virtual environment if possible, review or pin the two Python dependencies for reproducible installs, and specify --language if zh-CN is not appropriate for the EPUB you are creating.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned and Unverified Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: requirements.txt:1-2
Vulnerability Type: Supply-chain risk from open-ended dependency constraints
Risk Level: Medium

text
ebooklib>=0.18
chardet>=5.0

The associated installation instruction appears at SKILL.md:39-43:

bash
python3 -m pip install -r /Users/loid/.claude/skills/txt-to-epub/requirements.txt

Technical Analysis

Both dependencies use open-ended minimum-version constraints. Consequently, a future installation may retrieve versions that were not present during this audit. The project provides no lock file, package hashes, or other integrity controls to ensure that users install specifically reviewed artifacts.

Python package installation can execute package build hooks with the privileges of the user running pip. Runtime imports also execute dependency initialization code. Therefore, compromise of an eligible dependency release or its distribution path could introduce attacker-controlled code even though the project’s own conversion script contains no identified malicious behavior.

This finding represents a supply-chain exposure rather than evidence that the currently published ebooklib or chardet packages are malicious.

Attack Path

  1. An attacker compromises an eligible future release of ebooklib or chardet, an associated maintainer account, or the package-delivery path.
  2. The attacker publishes a version satisfying ebooklib>=0.18 or chardet>=5.0.
  3. A user follows the documented pip install -r requirements.txt instruction.
  4. The dependency resolver selects the compromised version because no exact version or artifact hash is enforced.
  5. Attacker-controlled code runs through package installation hooks or when scripts/txt_to_epub.py imports the dependency.

Impact Assessment

Successful exploitation would execute code with the privileges of the account performing installation or running the converter. Within that account’s access s ...[truncated 295 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace open-ended constraints with exact versions that have been reviewed and tested:
text
ebooklib==<reviewed-version>
chardet==<reviewed-version>
  1. Generate a hash-locked dependency file containing hashes for every permitted distribution artifact.
  2. Enforce integrity verification during installation:
bash
python3 -m pip install --require-hashes -r requirements.txt
  1. Install dependencies inside a dedicated virtual environment or other restricted environment rather than into a privileged or shared Python installation.
  2. Configure an explicit trusted package index or vetted internal mirror where appropriate.
  3. Use automated dependency scanning and a controlled update process to review new versions before changing the pins and hashes.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The CLI sets --language to zh-CN by default, which imposes a specific locale unless the user explicitly overrides it. The file does not document this as a region-specific tool or offer an interactive language choice, so it creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation states that the --language argument defaults to zh-CN, which can be interpreted as forcing a specific locale unless the user overrides it. This is a natural-language locale policy concern because the README does not explain why this locale is the default or explicitly frame it as user-selectable behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The documentation states --language defaults to zh-CN, which imposes a specific locale by default in natural-language behavior. The policy allows locale constraints when they are user-selected or clearly justified, but this README does not explain why zh-CN is the default or frame it as an opt-in choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown explicitly states that --language defaults to zh-CN. Under the policy rules, forcing a specific locale is a finding unless the skill offers a language choice by default or clearly documents why the locale restriction is necessary; this file does not justify the default locale.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency is specified with only a minimum version, which allows future major or minor releases to be installed without review. That can introduce breaking changes or a compromised/upstream-vulnerable release through the supply chain, reducing build reproducibility and making security posture less predictable.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
ebooklib>=0.18
chardet>=5.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
93% confidence
Finding

The dependency is not pinned to a specific reviewed version, so installs may resolve to different package versions over time. This increases supply-chain risk and can silently pull in vulnerable or incompatible releases.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
ebooklib>=0.18
chardet>=5.0