Back to skill

Security audit

Kart Io Picture Book Wizard

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed picture-book generation skill with local output behavior and no evidence of hidden credential access, exfiltration, or automatic persistence beyond generated files.

Install only if you want a Chinese/English children's picture-book workflow that may create local Markdown files under ./output/picture-books. Review generated child-directed content yourself, especially because the Python validator is less complete than the written safety policy, and avoid running the cleanup script unless you intentionally want it to remove the listed duplicate documentation files.

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
engine/rules.py:123
Finding

Incomplete Safety Validation and Unbounded Numeric Input Handling

Content
View full analysis
ValidationResult: """内容安全验证""" errors = [] # 禁止内容关键词 forbidden = ["暴力", "恐怖", "成人", "政治", "violence", "horror", "adult"] theme = params.theme or "" if any(word in theme.lower() for word in forbidden): errors.append(f"主题包含禁止内容: {params.theme}") return ValidationResult(valid=len(errors) == 0, errors=errors) ``` Related unchecked page override: ```python @classmethod def calculate_pages(cls, age: int, override: Optional[int] = None) -> int: """计算页数""" if override: return override config = cls.get_age_config(age) return config["default_pages"] ``` Related unchecked integer conversion and page parsing: ```python params = StoryParams( style=parts[0] if len(parts) > 0 else "storybook", scene=parts[1] if len(parts) > 1 else "meadow", age=int(parts[2]) if len(parts) > 2 else 5, ) ``` ```python for i, part in enumerate(parts[3:], start=3): if part.isdigit(): params.pages = int(part) ``` ### Technical Analysis The documented safety policy states that safety checks are mandatory and must reject numerous categories, including weapons, dangerous activities, political and religious material, commercial or branded material, substances, bullying, and inappropriate relationships. The executable validator does not implement that policy comprehensively. The validator has the following weaknesses: 1. It checks only seven literal substrings. 2. It examines only `params.theme`. 3. It does not inspect action or expression values passed to `assemble_prompt()`. 4. It does not validate supporting-character entries in ...[truncated 2790 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (69)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill generates bilingual children's picture books and related prompts/materials. However, the actual code performs filesystem cleanup by deleting predetermined markdown files in a skill directory. Its primary purpose is documentation maintenance, not content generation. This is a material mismatch in behavior and capability. No part of the code implements picture-book creation, style handling, age-driven content, scenes, or learning-domain generation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes content-generation functionality for bilingual children's picture books, including style systems, scenes, age-driven content, and learning domains. However, the actual code does not generate stories, prompts, images, or learning materials. Instead, it is an internal documentation-analysis utility that uses shell commands like find, wc, awk, sort, and basename to inspect Markdown files in the repository and print statistics. This is a materially different primary purpose from the declared user-facing picture-book generation capability, so the description does not accurately represent the supplied code chunk.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · engine/rules.py (reported line 309)May include surrounding context.

python
if signature not in prompt:
            WARN → f"缺少签名特征: {signature}"
            AUTO_ADD signature to prompt
    return prompt
```

#### 2.5 Error Messages

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/config/core/content-safety-validation.md (reported line 267)May include surrounding context.

if signature not in prompt: WARN → f"缺少签名特征: {signature}" AUTO_ADD signature to prompt return prompt

text

#### 2.5 Error Messages

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/config/merged/cclp.yaml (reported line 96)May include surrounding context.

yaml
\n   - Outerwear (if any): [specific + color]\n     Example: \"red windbreaker\
      \ jacket\"\n\n5. ACCESSORIES (固定特征 - FIXED FEATURES)\n   配饰固定特征\n   - Always\
      \ visible: [items that appear in every page]\n     Example: \"small blue backpack\
      \ with teddy bear keychain\"\n   - Sometimes visible: [items that may be held/set\
      \ down]\n     Example: \"water bottle in hand or in backpack side pocket\"\n\
      \   - Signature items: [unique identifiers]\n     Example: \"rainbow friendship\
      \ bracelet on left wrist\"\n\n6. BODY TYPE (固定特征 - FIXED FEATURES)\n   体型固定特征\n\

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/config/merged/cclp.yaml (reported line 1422)May include surrounding context.

yaml
\n   - Outerwear (if any): [specific + color]\n     Example: \"red windbreaker\
      \ jacket\"\n\n5. ACCESSORIES (固定特征 - FIXED FEATURES)\n   配饰固定特征\n   - Always\
      \ visible: [items that appear in every page]\n     Example: \"small blue backpack\
      \ with teddy bear keychain\"\n   - Sometimes visible: [items that may be held/set\
      \ down]\n     Example: \"water bottle in hand or in backpack side pocket\"\n\
      \   - Signature items: [unique identifiers]\n     Example: \"rainbow friendship\
      \ bracelet on left wrist\"\n\n6. BODY TYPE (固定特征 - FIXED FEATURES)\n   体型固定特征\n\

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/config/merged/cclp.yaml (reported line 3375)May include surrounding context.

yaml
2. Add CONSISTENCY ENFORCEMENT command templates

    3. Update examples with compressed prompts'
  'Phase 2: Update SKILL.md Workflow (Immediate)': '1. Replace old CCLP workflow with
    4.0 enhanced version

    2. Enforce prompt compression to 280-300 words max

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/guides/design.md (reported line 174)May include surrounding context.

md
**Example**:
- Adding a new emotion: Add entry to `story-soul.md`, system auto-integrates
- Adding a new style: Add entry to `styles.md`, update SKILL.md list
- Adding a new theme: Add to `story-soul.md` with compatibility rules
- No changes needed to templates, character, or rendering configs

Self-Modification

High
Category
Rogue Agent
Confidence
95% confidence
Finding

The guide explicitly instructs modifications to SKILL.md, which is the skill's orchestration surface and therefore security-sensitive. In an agentic environment, documentation that normalizes self-modification of control files can enable configuration drift, prompt-surface tampering, or insertion of unsafe logic if these instructions are followed automatically or without review.

Content

Scanner excerpt · references/guides/extending.md (reported line 170)May include surrounding context.

md
Add this table to `references/config/scenes.md` in the Scene Compatibility section.

### Step 4: Update SKILL.md

Open `SKILL.md` and update the styles list in the appropriate category:

Self-Modification

High
Category
Rogue Agent
Confidence
95% confidence
Finding

This finding again encourages updating SKILL.md as part of normal extension work. Because SKILL.md likely governs behavior, permissions, and prompt assembly, treating it as a routine extension target increases the chance that future untrusted or semi-trusted content changes alter agent behavior beyond intended scope.

Content

Scanner excerpt · references/guides/extending.md (reported line 308)May include surrounding context.

Add this to the compatibility table in references/config/scenes.md.

Step 3: Update SKILL.md

markdown
**Available Scenes**:

Self-Modification

High
Category
Rogue Agent
Confidence
96% confidence
Finding

The relationship workflow section directs maintainers to update SKILL.md workflow logic, expanding the attack surface from content to orchestration. If such guidance is consumed by automation or copied into change flows without scrutiny, it could lead to unsafe execution paths, overbroad behavior changes, or hidden policy bypasses.

Content

Scanner excerpt · references/guides/extending.md (reported line 1102)May include surrounding context.

  1. [Principle 3]
text

### Step 4: Update SKILL.md Workflow

Add relationship type handling to SKILL.md:

Self-Modification

High
Category
Rogue Agent
Confidence
96% confidence
Finding

This instruction tells maintainers to modify SKILL.md workflow to generate trilingual content, again coupling feature extension with direct controller changes. That pattern is dangerous because it encourages edits to a sensitive behavior-defining file for routine features, making accidental or malicious prompt-surface manipulation more likely.

Content

Scanner excerpt · references/guides/extending.md (reported line 1328)May include surrounding context.

md
### Step 3: Update Workflow

Modify SKILL.md to generate trilingual content in step 3, ensuring soul elements are properly translated.

---

Self-Modification

High
Category
Rogue Agent
Confidence
95% confidence
Finding

The example extension scenario instructs updating SKILL.md to add a new scene, reinforcing a repeated self-modification pattern. In context, the danger is cumulative: repeated normalization of controller-file edits lowers safeguards around a high-trust file and can enable persistent unsafe behavior if an attacker gets similar instructions into extension materials.

Content

Scanner excerpt · references/guides/extending.md (reported line 1577)May include surrounding context.

md
4. **Document soul affinity**: Calm, wonder emotions; nature, creativity themes
5. **Test style compatibility**: Watercolor (⭐⭐⭐), Clay (⭐⭐⭐), Ink (⭐⭐)
6. **Create `clay-garden-calm-3pages.md`** demonstrating garden with calm emotion
7. **Update SKILL.md**: Add garden to nature scenes list

**Result**: Users can use `/picture-book-wizard watercolor garden 5 emotion:calm theme:nature`

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises bilingual Chinese/English output as a default behavior without indicating that the user can choose a single language or opt out. This can override user preferences, create unnecessary disclosure of language or cultural assumptions, and reduce usability in contexts where only one language is desired.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow explicitly requires story text to be generated in Chinese first and English second, forcing a language order regardless of user intent. While not a classic security exploit, this is a true policy/quality vulnerability because it can cause unauthorized or undesired output shaping and makes the skill less compliant with user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

文档在生成组件中规定“故事文本: 双语(中文优先,英文)”,这构成了默认强制的语言/locale 偏好,但未说明用户可选择其他语言顺序或选择退出。根据语言/地区策略,强制特定语言而无用户 opt-in 属于自然语言政策风险。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill instructs the agent to save generated content to a local output path without any explicit user notice, confirmation, or disclosure of persistence behavior. Silent file writes can surprise users, expose sensitive prompts or generated content to later access, and create unintended data retention risks, even if the content domain is benign children’s books.

Content

No source excerpt is available for this finding.

Ssd 1

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The prompt explicitly tells the image model to produce images with 'no watermark', 'no logos', 'no branding', and similar attribution-suppression language. In context, this can be used to remove or evade provenance, branding, or ownership markers in generated images, which raises policy, IP, and misuse concerns beyond normal picture-book generation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description is broadly scoped to 'create picture book stories, prompts, or learning materials,' which overlaps with many common creative and educational requests and could cause the agent to invoke this skill in situations beyond its intended niche. Overbroad triggering increases the chance that untrusted skill instructions influence unrelated conversations, expanding the attack surface even when the skill appears non-malicious.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file states that every picture book page must follow a format containing Chinese text and English translation, making the language requirement mandatory. This is a natural-language locale policy concern because it forces a specific language combination rather than offering a user-selectable language option or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template explicitly instructs the agent to create directories and write markdown files under a local output path, which expands behavior from content formatting into filesystem modification. In an agent environment, unintended file writes can overwrite existing data, create persistence artifacts, or be abused if filenames or paths are later influenced by untrusted input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This Python config file contains natural-language descriptions and labels that explicitly center a Chinese-only configuration context (for example, the module docstring and many locale-specific labels), but there is no indication that users can opt into another language or locale. Under the stated policy, forcing a specific language/locale without user choice is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The output formatter hardcodes Chinese-first labels and content fields such as '第...页', '故事', '拼音', and '学习要点', and the data model itself assumes Chinese-specific fields. This reflects a language policy constraint embedded in the skill without any visible user choice or opt-in mechanism in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document specifies an educational level of "HSK 1-2," which is a Chinese-language proficiency standard, and elsewhere centers output around Chinese text and character learning. For a general forms guide, this creates a locale/language constraint that is not explicitly framed as optional user choice or justified as a region-specific skill requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document states that every page always teaches one Chinese character and the output format requires Chinese text, pinyin, and bilingual Chinese/English sections. This imposes a specific language/locale behavior as a default requirement, and the file does not indicate user opt-in or an alternative language choice.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.