Back to skill

Security audit

笔痕

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate novel-illustration prompt skill, but it needs Review because it can scan a whole project and write reusable character data without clear limits.

Install only in novel-writing projects where broad project search is acceptable. Before use, explicitly provide the chapter and reference paths, ask the agent not to scan unrelated directories, and require confirmation plus a specific output file before any project write-back.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:150
Finding

Unbounded Project-Wide File Discovery and Unspecified Persistent Writes

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:5-10, SKILL.md:150-158, and SKILL.md:270
Vulnerability Type: Excessive filesystem access and insufficiently constrained project modification
Risk Level: Medium

Evidence

The skill grants broad filesystem discovery, read, and write capabilities:

yaml
allowed-tools:
  - Read
  - Write
  - Glob
  - Grep
  - Task

The following is an English translation of the relevant instructions at lines 150-158:

text
Step 1: Load novel context

Search the project directory and independently determine which files contain
character descriptions, style references, or historical illustration records.
Read them and build character profiles.

Step 2: Character consistency analysis

Extract the visual characteristics of each character from the files that were
read. If descriptions conflict, use the earliest illustration record.

If no character definition file exists, extract a first impression from the
chapter text and write the character traits into the project for later reuse.

The instruction at line 270 further expands project-wide discovery:

text
Search existing illustration records to avoid generating the same scene again.
If regeneration is necessary, mark it as a remake and explain the reason.

Technical Analysis

The skill's legitimate purpose is to generate illustration prompts from novel chapters and associated character references. However, it instructs the agent to search the entire project and independently decide which files may be relevant. No permitted directory list, file extension allowlist, maximum traversal depth, sensitive-file exclusion policy, or user approval boundary is defined.

Determining relevance may itself require reading candidate files. Consequently, unrelated source code, configuration files, private notes, environment files, credentials, or other sensitive project content could enter the agent context before being rejected as irrelevant.

The skill a ...[truncated 2885 chars]

Remediation
View remediation

Remediation Suggestions

  1. Restrict discovery to explicitly approved directories, such as:

    text
    chapters/
    characters/
    illustrations/
    
  2. Define an allowlist of expected file types, such as Markdown, plain text, and a documented JSON schema.

  3. Explicitly exclude sensitive and unrelated paths, including:

    text
    .env
    .git/
    .ssh/
    credentials/
    secrets/
    node_modules/
    build/
    dist/
    hidden files
    private keys
    source-code and infrastructure directories not selected by the user
    
  4. If approved directories are unavailable, ask the user to identify the chapter and reference files instead of searching the whole project.

  5. Limit writes to a dedicated path, such as illustrations/character-profiles.json, and document its schema.

  6. Require a preview and explicit user confirmation before creating or modifying persistent project files.

  7. Use create-only or atomic-update behavior. Do not overwrite an existing file unless the user explicitly approves the exact destination and change.

  8. Validate the canonical destination path before writing, reject path traversal, and avoid following symbolic links outside the approved project subtree.

  9. Minimize loaded content by extracting only necessary character and style fields rather than retaining complete unrelated files in context.

  10. Remove Task from allowed-tools unless a specific requirement is documented. If it is necessary, constrain delegated tasks to the same approved read and write boundaries.

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

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list is very broad and consists of generic creative terms like '插图' and '配图' without activation boundaries or negative examples. This can cause the skill to auto-activate in unrelated contexts and then read project files or generate/write outputs unexpectedly, increasing the chance of unintended data access or modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states that if no character definition exists, it may generate character traits from chapter text and write them back into the project for future reuse, but this side effect is not disclosed up front in the skill description. Undisclosed write behavior is dangerous because users may invoke what appears to be a prompt-generation skill and unintentionally alter repository contents with inferred, possibly inaccurate data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.