Back to skill

Security audit

skill-router

Security checks for vulnerabilities and agentic risk

Overview

This skill is an automatic router that can execute and chain other skills broadly, with insufficient scoping and approval boundaries for the authority it describes.

Review this carefully before installing. It is not proven malicious, but it should only be used in an environment where you trust every downstream skill it can route to, can approve or block every side effect, and are comfortable with event/log persistence. Avoid granting it access to credentials, repositories, social accounts, email, or system-recovery tools unless the router is constrained by an external policy layer.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:3
Finding
Mandatory Global Routing Hijacks Agent Goals and Automatically Expands Tasks<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 3 and 118–140 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: Critical ### Vulnerable Code ```yaml description: "Context-based skill auto-routing + federated skill composition. Analyzes user input to auto-select single or multiple skills and execute in order. First gateway for all requests. Use on every request to determine optimal skill combination." ``` ```text ## Execution Engine Protocol 1. Receive user input 2. Classify intent (single vs complex) 3. If single → execute skill immediately 4. If complex → compose skill chain a. Skills without dependencies execute in parallel (sessions_spawn) b. Skills with dependencies execute sequentially (pass previous results via events/) 5. Check auto-chain rules on each skill completion 6. Auto-trigger additional skills if needed (or request approval) 7. Synthesize final results and respond ``` ```text ## Auto-hook Registration When skill-router activates, for all skills: - pre-hook: Input validation + security check - post-hook: Generate events/ event + check chain rules - on-error: Error log + notification-hub ``` ### Technical Analysis The skill declares itself the first gateway for every request instead of limiting activation to explicit orchestration requests. Once loaded, it instructs the agent to classify all user input, immediately execute matching skills, compose multi-skill chains, and automatically trigger further skills. The proposed pre-hooks, post-hooks, and error hooks affect all skills rather than only the current explicitly authorized operation. This changes the agent's normal task-selection behavior and allows the router to expand a narrow user request into additional operations. Approval is mentioned only conditionally. General skill execution, event generation, notifications, recovery actions, learning actions, and decision-log modifications can occur without an explicit approval boundary ...[truncated 1131 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the statements that make the router the first gateway for all requests or require it to run on every request. 2. Activate orchestration only when the user explicitly requests skill routing or a multi-step workflow. 3. Generate a read-only execution plan that identifies every skill, argument, permission, data source, output, and external side effect before execution. 4. Require explicit approval for every additional skill introduced by routing or auto-chain evaluation. 5. Do not register global pre-hooks, post-hooks, or error hooks. Scope hooks to the current approved workflow and remove them when it finishes. 6. Disable automatic recovery, learning, notification, and decision-log changes unless separately authorized. 7. Enforce a capability policy outside the skill text so a skill cannot grant itself permission to execute other skills. 8. Bind execution to the user's original intent and reject chain expansion that is not necessary to fulfill that intent. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:14
Finding
Arbitrary Local Scripts Are Executed After Metadata-Only Inspection<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 14–45 **Vulnerability Type**: `T09: Insecure Skill Coding Practices` **Risk Level**: High ### Vulnerable Code ```text ### Execution Flow 1. Scan only skills/*/SKILL.md frontmatter (trigger matching) - Quick match with description + trigger fields - No full body reading → 83% token savings 2. Check run field of matched skill for script path - run: "./run.sh" → skills/{name}/run.sh - run: "./run.js" → skills/{name}/run.js 3. Direct script execution with exec WORKSPACE=$HOME/.openclaw/workspace \ EVENTS_DIR=$WORKSPACE/events \ MEMORY_DIR=$WORKSPACE/memory \ bash $WORKSPACE/skills/{name}/run.sh [args] 4. Agent processes stdout result - Parse if JSON - Pass through if text - Check stderr on error 5. Generate events based on events_out - Create events/{type}-{date}.json file - Subsequent skills consume via events_in 6. Check hooks → trigger subsequent skills - post: ["skill-a", "skill-b"] → auto-execute - on_error: ["notification-hub"] → notify on error ``` ```bash # Extract only frontmatter from all skills for skill in skills/*/SKILL.md; do yq eval '.name, .description, .trigger, .run' "$skill" done ``` ### Technical Analysis The execution protocol deliberately limits inspection to skill frontmatter and then launches a script identified by the matched skill. Frontmatter is not a security boundary: a malicious or compromised skill can advertise a benign name, description, and trigger while associating them with a harmful shell or JavaScript program. No trusted-skill allowlist, cryptographic integrity check, canonical-path validation, executable-content review, sandbox, or capability restriction is specified. The child process also receives the workspace, event directory, and memory directory locations, exposing agent state to any executed script. The example leaves handling of `{name}` and `[args]` unspecified. If an implementation builds ...[truncated 1448 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never execute scripts based solely on frontmatter or trigger metadata. 2. Maintain an explicit allowlist of trusted skill identifiers and approved executable hashes. 3. Verify package provenance and cryptographic integrity before registration and again before execution. 4. Resolve the executable to a canonical path and verify that it remains inside an approved immutable skill directory. 5. Reject symbolic-link escapes, parent-directory traversal, absolute paths, unexpected file types, and writable executable locations. 6. Invoke programs using fixed argument arrays rather than shell command construction. 7. Treat user-derived arguments as data and validate them against a strict per-skill schema. 8. Run skills in a sandbox with minimal filesystem mounts, no inherited secrets, restricted network access, resource limits, and a dedicated low-privilege identity. 9. Expose only the specific input files required by the task instead of passing general workspace, event, and memory directory locations. 10. Require approval that displays the exact executable, arguments, requested capabilities, and expected side effects. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:91
Finding
Broad Triggers Automatically Initiate State-Changing and External Workflows<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 91–111; `chains.md`, lines 78–91, 120–136, and 140–175 **Vulnerability Type**: `T05: Unauthorized Access and Privilege Escalation` **Risk Level**: Medium ### Vulnerable Code From `SKILL.md`: ```text ## Context-based Auto-chain Rules Skill A execution complete → analyze results → auto-determine next skill: **Auto-chain Rules (if → then)** - IF competitor-watch detects important change → THEN notification-hub(urgent) + include in daily-report - IF tokenmeter exceeds $500/month → THEN notification-hub(urgent) - IF code-review detects HIGH severity → THEN block commit + notification-hub - IF think-tank conclusion has "immediate execution" action → THEN auto-record in decision-log - IF cardnews generation complete → THEN confirm "post with insta-post?" (approval required) - IF self-eval detects repeated mistake → THEN trigger learning-engine - IF performance-tracker finds successful content → THEN suggest content-recycler - IF trend-radar detects hot trend → THEN auto-suggest seo-content-planner - IF mail detects important email → THEN notification-hub(important) - IF health-monitor detects anomaly → THEN attempt auto-recovery + notification-hub(urgent) ``` From `chains.md`: ```text ## 6. Idea→Action **Name**: idea-to-action **Trigger**: "review idea and execute", "brainstorm and do it now" **Description**: Review idea, establish execution plan, and execute immediately **Steps**: 1. **think-tank** (brainstorm mode) — Idea generation + feasibility review 2. **decision-log** — Record decisions (why this direction was chosen) 3. **skill-composer** — Auto-compose skill combination matching execution plan **Output**: Execution result + decision-log update ``` ```text ## 8. Safe Release **Name**: safe-release **Trigger**: "release", "deploy", "push to production" **Description**: Code review → Git commit → deployment checklist verification **Steps**: 1. **code-review** — Review code cha ...[truncated 3554 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace broad natural-language triggers with explicit, unambiguous workflow commands. 2. Default every matched chain to planning mode and display all steps before execution. 3. Separate read-only analysis from mutating, recovery, deployment, and external-communication capabilities. 4. Require explicit approval before each state-changing or external action, including event writes, decision-log updates, learning changes, recovery attempts, Git operations, email, social posting, and Discord messages. 5. Require renewed approval when an auto-chain proposes a skill not listed in the initially approved plan. 6. Define per-skill capability manifests covering filesystem paths, network destinations, credentials, tools, and allowed operations. 7. Enforce those manifests in the runtime rather than relying on descriptive text. 8. Remove the `"start today"` trigger for system and notification access. 9. Do not create scheduled tasks unless the user explicitly requests persistence and approves the exact schedule, command, and removal procedure. 10. Record an auditable authorization trail linking every executed step to the user's approved workflow. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (13)

Vague Triggers

High
Confidence
97% confidence
Finding
The instruction to use this router on every request gives a powerful orchestration skill universal reach over all user inputs. In context, this is more dangerous because the same file also defines auto-selection, chaining, and direct execution behavior, so broad triggering magnifies the chance of unintended tool invocation and privilege expansion.

Vague Triggers

High
Confidence
97% confidence
Finding
The 'review idea and execute' / 'brainstorm and do it now' trigger is especially risky because it combines broad natural-language matching with implied immediate execution. In a federated skill-composition system, this can escalate a casual brainstorming request into autonomous action selection and downstream execution without sufficiently bounded scope or approval.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill explicitly documents resolving a matched skill's `run` field and invoking the referenced shell or JS script with direct execution. In a router that is intended to run first and potentially dispatch across many skills, this creates a broad code-execution surface where any matched skill metadata can lead to execution of local scripts without a strong trust boundary, validation, or sandboxing.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Subsequent skills consume via events_in
   
6. Check hooks → trigger subsequent skills
   - post: ["skill-a", "skill-b"] → auto-execute
   - on_error: ["notification-hub"] → notify on error
```
Confidence
89% confidence
Finding
The auto-execute hook allows subsequent skills to be triggered autonomously after one skill completes, without a mandatory user confirmation boundary. In this router's context, that behavior compounds risk because chained skills may include external communication, code execution, deployment, or recovery actions, turning a single match into a multi-step autonomous workflow.

Vague Triggers

Medium
Confidence
94% confidence
Finding
Several trigger phrases are generic everyday terms such as "trends," "release," or broad content-creation wording, which can easily match benign conversation. In a router that can chain multiple downstream skills, ambiguous triggers increase accidental activation and can route normal dialogue into analysis, messaging, posting, or deployment workflows.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The document claims external actions always require approval, but earlier rules permit automatic notification and even auto-recovery behavior. This inconsistency is dangerous because operators may rely on a safety guarantee that the router does not actually enforce, leading to unreviewed outbound actions or state-changing operations.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases for the content pipeline are broad consumer-language phrases that could easily appear in ordinary conversation, causing unintended activation of a multi-step workflow that creates content and may progress toward publishing. In the context of a first-gateway auto-router, this increases the chance of accidental skill chaining and execution beyond the user's intended scope.

Vague Triggers

Medium
Confidence
90% confidence
Finding
Phrases like 'do market research' are ambiguous and may match benign requests, yet this chain initiates competitor crawling, report generation, and email sending. Because the router is intended for use on every request, an overbroad trigger can cause unintended data collection and outbound actions with limited user awareness.

Vague Triggers

Medium
Confidence
91% confidence
Finding
Generic triggers such as 'market research' and 'industry trends' are likely to overlap with ordinary discussion and can activate a broad data-collection workflow across multiple external sources. In this skill-router context, accidental invocation is more dangerous because it may launch parallel monitoring and scraping tasks automatically.

Vague Triggers

Medium
Confidence
91% confidence
Finding
Trigger phrases like 'release', 'deploy', and 'push to production' are highly generic for a chain that includes commit and push operations. Even with stated safeguards, accidental routing into a deployment-related workflow is dangerous in a gateway skill because it can initiate sensitive code-management actions based on ambiguous user wording.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The chain explicitly persists inter-skill data as JSON files in an events directory without any user-facing disclosure, retention policy, or sensitivity controls. In a router that processes broad user requests, this can silently store prompts, outputs, identifiers, or other sensitive operational data, increasing privacy and leakage risk across chained skills.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
The file uses English-only operational triggers and descriptions, while the signature includes Korean text, suggesting a mixed-locale environment. There is no statement offering users a language choice or clarifying that English-only triggers are required by design.

Vague Triggers

Low
Confidence
79% confidence
Finding
The phrase "start today" is common conversational language and could unintentionally match ordinary discussion rather than a system-status reporting chain. While a cron schedule is also listed, the natural-language trigger remains underspecified.

Static analysis

No suspicious patterns detected.