Back to skill

Security audit

Create Interesting Skills

Security checks for vulnerabilities and agentic risk

Overview

This skill is a persistent skill factory that searches the web, writes new skills into the active local skills directory, and immediately runs them without a clear review or sandbox step.

Install only if you are comfortable with a skill that can create and install other persistent skills. Before using it, require a draft-only phase, inspect the full generated SKILL.md, remove overly broad triggers, and approve deployment and demonstration separately.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:14
Finding

Untrusted Web Content Can Be Converted into Executable Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 14-31, 89-115, and 128-130
Vulnerability Type: Indirect prompt injection through generated and deployed Skill instructions
Risk Level: High

Complete Code Snippet

markdown
根据用户的需求(随机 or 指定主题),搜索以下来源寻找创意:

**搜索策略(优先级顺序):**

1. **国内平台**(用 `搜狗` skill 或 `web_search`)
   - V2EX:搜索 `"要是有个工具" OR "有没有AI" OR "希望有个程序"` 
   - 知乎:搜索 `"奇特的AI用法" OR "有趣的自动化" OR "希望AI能"`
   - 小红书/微博:搜索 `"要是AI能帮我" OR "整活工具"`

2. **国际平台**(用 `EdgeBrowser` skill 或 `web_fetch`)
   - Reddit r/ChatGPT、r/artificial、r/MachineLearning
   - Hacker News(搜 `"I wish there was a tool"` `"someone should build"`)
   - Twitter/X(搜 `"wish AI could" OR "someone make a bot that"`)

**搜索时重点关注这类表达:**
- "要是有个工具能…就好了"
- "有没有人做过…"
- "我希望 AI 能帮我…"
- "I wish there was a bot/tool/script that..."
- "someone should make an AI that..."
markdown
#### SKILL.md 模板

```markdown
---
name: <skill-name>
description: <触发描述,包含触发词和使用场景,要稍微"pushy"一点,让模型知道该什么时候用>
---

# <Skill 名称> <emoji>

## 背景/来源
<这个 skill 的创意来源,保留有趣的网友原话或灵感>

## 功能说明
<这个 skill 做什么>

## 使用方式
<用户怎么触发,需要提供什么输入>

## 执行步骤
<详细的步骤说明,告诉 AI 怎么一步步完成任务>

## 输出格式
<期望的输出格式>

## 注意事项
<边界情况、限制、特殊处理>
text

```markdown
1. 将 SKILL.md 写入 `/projects/.openclaw/skills/<skill-name>/SKILL.md`
2. 向用户确认 Skill 已创建,说明触发词
3. **马上演示一次**:直接用这个新 skill 跑一个示例,让用户看到效果

Technical Analysis

The Skill directs the agent to retrieve ideas from public, attacker-controlled websites and preserve source material when producing a new SKILL.md. That generated file includes an execution-steps section that tells an agent how to act.

The workflow then writes the generated document into the active Skill directory and immediately invokes it. No instruction requires the agent to:

  • Treat retrieved material solely as untrusted quoted data.
  • Detect or discard embedded instructions and tool directives.
  • Prevent source text from entering executable instruction sections.
  • Validate generated frontmatter and Markdown again ...[truncated 2472 chars]
Remediation
View remediation

Remediation Suggestions

  1. Establish an explicit trust boundary

    • State that all search results, fetched pages, quoted posts, metadata, and linked content are untrusted data.
    • Prohibit following instructions found within retrieved content.
    • Use external content only to summarize the underlying idea.
  2. Separate source material from executable instructions

    • Do not copy source text into the Skill's description, execution steps, tool instructions, or other instruction-bearing sections.
    • If attribution is needed, include only a short, escaped paraphrase in a clearly labeled non-executable provenance section.
    • Remove commands, URLs requesting execution, encoded content, role directives, and phrases that attempt to override existing instructions.
  3. Generate from a strict allowlisted schema

    • Validate the Skill name, frontmatter, headings, and field lengths.
    • Reject extra frontmatter keys, unexpected Markdown constructs, hidden text, HTML, external includes, and instruction-like source quotations.
    • Permit only a predefined set of low-risk operations appropriate to the selected idea.
  4. Apply least privilege

    • Disable exec, message, unrestricted filesystem access, and sensitive network operations by default for generated Skills.
    • Require a separate, explicit user authorization for each high-impact capability.
    • Restrict writes to a dedicated staging directory until review is complete.
  5. Require review before deployment

    • Present the complete generated SKILL.md, its requested tools, filesystem paths, network destinations, and intended actions to the user.
    • Require explicit approval before writing it into the active Skill directory.
    • Re-run validation after approval to prevent content changes between review and installation.
  6. Sandbox demonstrations

    • Remove automatic execution immediately after deployment.
    • Run demonstrations in an isolated environment with synthetic input ...[truncated 520 chars]
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 (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger description is very broad, with many casual phrases and scenarios that can cause the skill to activate when the user is only brainstorming or chatting. Because this skill can search the web, generate files, deploy to the local skills directory, and later influence future agent behavior, unintended invocation materially increases the attack surface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The top-level description markets the skill as finding ideas and converting them into usable skills, but it does not clearly warn that this includes writing into the local skills directory and effectively installing new agent capabilities. Users may invoke it without understanding that it causes persistent system changes rather than just producing suggestions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill's triggers, instructions, examples, and user-facing dialogue are entirely specified in Chinese, including prescribed phrases for activation and response style. There is no indication that users may choose another language or that the skill is intentionally limited to a Chinese-only locale for a documented reason.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Instructing generated skills to use 'pushy' trigger descriptions encourages downstream skills to self-activate too aggressively, compounding routing and prompt-injection risks across the skill ecosystem. This is especially dangerous here because the factory skill mass-produces new skills, so one unsafe design pattern can be replicated into many installed artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow directs the agent to immediately write SKILL.md, confirm creation, and then auto-run the newly created skill, all without an explicit safety gate. This creates a high-risk chain where untrusted web-derived content is transformed into executable agent instructions and then invoked immediately, enabling prompt-injection propagation and persistent compromise of future behavior.

Content

No source excerpt is available for this finding.