Back to skill

Security audit

Bookworm

Security checks for vulnerabilities and agentic risk

Overview

Bookworm is a disclosed local note and reading-log CLI, but users should treat saved entries and exports as plain-text personal data.

Install only if you are comfortable with Bookworm saving whatever you enter as unencrypted files under ~/.local/share/bookworm and creating plain-text exports there. Avoid logging secrets, credentials, or highly sensitive personal details, and be careful opening CSV exports in spreadsheet software if entries could contain formulas.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:67
Finding

Unsafe JSON and CSV Export Serialization

Content
View full analysis
> "$out" ``` ```bash while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" ``` ### Technical Analysis User-controlled log values are inserted directly into JSON and CSV output without format-appropriate escaping. For JSON exports, quotation marks, backslashes, control characters, or embedded line breaks in `$val` are not escaped. A crafted value can therefore terminate the intended JSON string, inject additional properties or objects, or make the generated document syntactically invalid. For CSV exports, fields are not enclosed in quotes and embedded quotation marks, commas, carriage returns, or line feeds are not escaped according to RFC 4180. In addition, a value beginning with a spreadsheet formula indicator such as `=`, `+`, `-`, or `@` may be interpreted as a formula when the exported file is opened with spreadsheet software. Shell command injection is not present in these lines because the variables are quoted and are passed as data to `printf` or `echo`. The vulnerability occurs when a downstream JSON parser or spreadsheet interprets the exported content. ### Attack Path 1. An attacker supplies or convinces a user to record a crafted entry, for example one containing JSON delimiters or a spreadsheet formula. 2. The entry command writes that value unchanged into a local log file. 3. The user runs `bookworm export json` or `bookworm export csv`. 4. The export function inserts the crafted value into the output without escaping. 5. For JSON, the resulting file is malformed or its intended structure is altered. 6. For CSV, opening the file in formula-enabled spreadsheet software may evaluate the attacker-controll ...[truncated 698 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:6
Finding

Personal Log and Export Files Inherit Potentially Permissive Filesystem Permissions

Content
View full analysis
> "$DATA_DIR/add.log" local total=$(wc -l < "$DATA_DIR/add.log") echo " [Bookworm] add: $input" ``` Equivalent append operations are used by the other entry commands, while export files are also created under the same directory. ### Technical Analysis The script does not establish a restrictive `umask` or explicitly set permissions on its data directory, log files, history file, and generated exports. Their effective permissions consequently depend on the invoking process's umask and any pre-existing filesystem objects. Under a typical restrictive environment this may not expose data. Under a permissive umask, however, newly created files can be readable by other local users. Existing directories or files with unsafe permissions also remain uncorrected. The stored content may include reading history, plans, reminders, priorities, reviews, and other personal notes. This conflicts with the documentation's privacy-oriented expectation that the data remains private and local. ### Attack Path 1. The tool is run on a multi-user system under a permissive umask, or the data directory already has broad permissions. 2. `mkdir`, shell redirection, and export operations create data objects without explicit restrictive modes. 3. A separate local account enumerates the user's `~/.local/share/bookworm` directory if traversal permissions permit it. 4. That account reads broadly accessible logs or export files. 5. Personal notes, reminders, plans, and activity history are disclosed. This path requires local access and filesystem permission ...[truncated 601 chars]
Remediation
View remediation
/dev/null || true ``` 4. Avoid following attacker-controlled symbolic links where the execution environment may be shared or the directory is not already trusted. 5. Validate that `$HOME` is set to the intended user's home directory before writing data. 6. Add a status or initialization check that warns about and, with user consent, repairs unsafe permissions on existing data. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description presents the skill as a reading log and habit analysis tool focused on books, reading goals, streaks, and genre preferences. The code, however, is a generic shell-based note/logging utility branded as 'Bookworm' but functioning as a broad productivity tracker. Its commands simply append arbitrary text to category-specific local log files and provide generic stats, export, search, recent activity, and status views. There is no book schema, no reading-specific data model, no genre analysis, and no computed streak logic beyond storing freeform 'streak' entries. The primary behavior is materially broader and different from the declared reading-focused purpose, so this is a mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The command surface and help text expose a generic productivity/task-tracking tool rather than the reading-focused behavior declared in the manifest. This mismatch is dangerous because users or higher-level agents may trust the manifest and send sensitive reading-related data into a tool that actually supports arbitrary note logging and broader personal activity tracking, expanding collection beyond expected scope.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The core handlers accept arbitrary free-form input across generic categories and persist it to disk, enabling the skill to function as a general-purpose personal logger rather than a book tracker. In an agent setting, this creates a data-scope violation: unrelated sensitive information could be stored locally under the false expectation that the skill only manages reading records.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest description limits the skill to books, reading habits, reading streaks, goals, and genre analysis. However, the file's own documentation describes Bookworm as a toolkit for "organizing your work and reading habits" and supports generic commands for tasks, notes, plans, reminders, priorities, archives, timelines, and reports, which materially exceeds the reading-specific scope.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says the skill is for logging books, tracking reading habits, reviewing reading streaks, maintaining goals, and analyzing genre preferences. But the documented commands and examples explicitly include generic work/task usage such as logging tasks and notes, organizing work habits, and prioritizing items like "Must finish Design Patterns by Friday," which contradicts the narrower stated intent.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline documentation identifies the tool as a generic productivity utility, which directly conflicts with the declared reading-focused skill purpose. Contradictory self-description is a security concern in agent ecosystems because it indicates undeclared capability scope and increases the chance of deceptive or unintended data handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script persistently stores raw user inputs in local log files under the home directory without notice, consent flow, retention limits, or access controls. Because inputs are arbitrary free text, users may unintentionally store sensitive personal information, creating privacy and local data-exposure risk, especially on shared systems or backed-up endpoints.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The user-facing help presents the program as a 'productivity toolkit' with generic commands, contradicting the manifest's book-tracking description. This can mislead users and orchestrating agents about what the skill really does, making overcollection and misuse of personal data more likely in practice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The export feature aggregates all logged activity into json/csv/txt files on disk without warning about sensitivity or downstream handling. Exported consolidated files are easier to copy, exfiltrate, or accidentally share than the original per-log records, increasing privacy impact if they contain personal notes or habits.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill encourages users to log freeform personal content and states that all data is stored locally in plain-text files, but it does not prominently warn that sensitive information may be persisted unencrypted on disk. In a habit-tracking context, entries can easily include personal schedules, goals, reflections, and other private data that could be exposed to other local users, backups, or malware.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.