Back to skill

Security audit

电子书拆解成技能包

Security checks for vulnerabilities and agentic risk

Overview

The skill’s ebook processing and local skill installation match its stated purpose, with dependency changes and broad activation triggers worth reviewing.

Review generated instructions, optional scripts, and activation keywords before use. Generated skills and book references remain installed locally. Expect Python dependency installation, including an automatic fallback targeting WorkBuddy’s default environment; use a dedicated environment if you want isolation.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Generated skills activate on bare author names, concepts, or related keywords without requiring a book-specific request.

Medium
Category
Trigger Abuse
Confidence
94% confidence
Finding

The knowledge-skill template lists author names and core concepts as triggers and instructs activation whenever the user mentions them, even without requesting information from the book. The action template similarly includes unspecified related keywords (lines 223–224), and the index promises automatic activation from concept names alone (lines 317–318), allowing collisions with unrelated requests.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

5.2 Install Skills Locally

For each generated skill, create the directory under ~/.workbuddy/skills/:

bash
mkdir -p ~/.workbuddy/skills/{skill-name}/

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

For each generated skill, create the directory under ~/.workbuddy/skills/:

bash
mkdir -p ~/.workbuddy/skills/{skill-name}/

Write all files (SKILL.md + references/scripts/assets) to the skill directory.

Missing dependencies trigger an undisclosed package installation.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

A missing dependency silently triggers installation of unpinned packages and their transitive dependencies into a persistent Python environment, without explicit approval or hash verification. This creates a conditional supply-chain execution risk if a resolved package or configured package source is compromised; an EPUB text extractor should not unexpectedly introduce network access and environment changes.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/extract_epub.py (reported line 19)May include surrounding context.

python
except ImportError:
        import subprocess
        python = str(Path.home() / ".workbuddy/binaries/python/envs/default/bin/python3")
        subprocess.run([python, "-m", "pip", "install", "ebooklib", "beautifulsoup4", "-q"], check=True)
        from ebooklib import epub
        from bs4 import BeautifulSoup

Automatically installs a dependency into a Python environment without disclosing the installation.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

If pdfplumber is unavailable, the script automatically invokes pip against a hard-coded agent environment without explicit approval, version pinning, or artifact hash verification. This crosses from local PDF extraction into network-backed environment modification and creates a conditional supply-chain execution risk if the configured package source or a dependency is compromised; the code does not demonstrate an actual compromise.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/extract_pdf.py (reported line 16)May include surrounding context.

python
except ImportError:
        import subprocess, pathlib
        python = str(pathlib.Path.home() / ".workbuddy/binaries/python/envs/default/bin/python3")
        subprocess.run([python, "-m", "pip", "install", "pdfplumber", "-q"], check=True)
        import pdfplumber

    if not os.path.exists(input_path):

Static analysis

No suspicious patterns detected.