Back to skill

Security audit

Prompt-Router

Security checks for vulnerabilities and agentic risk

Overview

This router is not overtly malicious, but it can change agent-wide skill selection and auto-invoke or rewrite other skills with weak safeguards.

Install only if you want a global fast-path router and are comfortable reviewing its configuration. Do not enable automatic invocation for skills that write files, run commands, use browsers, authenticate, or contact external services unless you add an allowlist, higher thresholds, ambiguity checks, and explicit user confirmation. Avoid running the metadata repair scripts on your whole skills directory without backups and a diff review.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
INTEGRATION_PLAN.md:123
Finding

Agent Decision-Flow Hijacking Through Mandatory Router Integration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/integration.py:31
Finding

Untrusted Skill Metadata Can Trigger Automatic Skill Invocation at a Weak Threshold

Content
View full analysis
bool: return ( result.match is not None and result.confidence >= self.confidence_threshold ) ``` The integration configures that threshold as `0.25`: ```python _router = PromptRouter( skills_dir='C:/Users/User/.openclaw/workspace/skills', confidence_threshold=0.25, high_confidence_threshold=0.5, ) _router.load_skills() ``` The resulting decision is exposed as an invocation recommendation: ```python result = router.route(user_message) should_invoke = router.should_invoke_skill(result) return { "matched": result.match is not None, "skill_name": result.match['name'] if result.match else None, "skill_path": result.match.get('_path') if result.match else None, "confidence": result.confidence, "confidence_level": result.confidence_level, ...[truncated 2503 chars]
Remediation
View remediation
bool: return ( result.match is not None and result.confidence >= self.high_confidence_threshold ) ``` 5. Use the lower threshold only to provide suggestions or trigger semantic review. 6. Add ambiguity handling. Do not auto-invoke when the top candidates have similar scores. 7. Bind each allowlisted skill to approved capability categories and reject routing when the requested operation exceeds them. 8. Require confirmation for skills with side effects regardless of confidence. 9. Add adversarial tests for broad triggers, duplicate names, metadata manipulation, short trigger lists, and intentionally ambiguous prompts. 10. Avoid exposing filesystem paths to callers unless they are required and authorized. ]]>

T07 · Tool Hijacking and Spoofing

Warning
Location
generate_metadata.py:87
Finding

Maintenance Utilities Rewrite Other Installed Skills Without Safe Preservation or Transaction Controls

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (32)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document explicitly proposes automatic logging of raw user queries, routing decisions, and feedback without any mention of notice, consent, minimization, retention limits, or redaction. Because user prompts can contain secrets, personal data, or sensitive business information, storing them verbatim creates a real privacy and data-exposure risk if logs are accessed, shared, or reused for optimization.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The automatic logging design stores natural-language user queries directly, which is risky because free-form prompts often contain credentials, identifiers, health/financial details, or proprietary requests. This is especially dangerous in an agent-routing context because the system is designed to capture many prompts over time, turning incidental sensitive input into a searchable corpus.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill describes automated monitoring/listening across GitHub, Discord, and review platforms, but provides no boundaries for what content is collected, whether platform terms and user expectations are respected, or how collected data is stored and used. Automated aggregation of user-generated content can expose personal data and create privacy/compliance issues, especially when centralized with internal usage logs.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The hot-term discovery and auto-optimization flow analyzes and aggregates original user prompts to generate trigger updates and optimization proposals. Even if intended for model improvement, this increases exposure by reprocessing sensitive user input at scale and can leak private terms into reports, PRs, or downstream artifacts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document explicitly recommends broad trigger/keyword metadata for routing multiple skills, but does not define exclusion conditions, priority rules, or safety gating for ambiguous requests. In a prompt-router context, overly generic triggers can cause unintended skill activation, misrouting user input to the wrong capability, and bypassing more careful handling paths for sensitive actions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The troubleshooting guidance suggests fixing mismatches by adding or broadening triggers, including examples that can still remain generic, without emphasizing constraints or abuse resistance. This encourages operators to expand activation phrases in ways that increase accidental or adversarial routing, especially when combined with low confidence thresholds and automatic invocation behavior described elsewhere in the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The plan instructs the system to invoke a local Python script with the full user message before normal skill selection, but it provides no disclosure, trust boundary discussion, or safeguards around forwarding all prompts to that subprocess. Even though the script appears local, it expands the attack surface by introducing automatic code execution and broad message exposure to another component that may log, mishandle, or later be modified to exfiltrate data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documented trigger/keyword examples are broad generic terms such as 搜索, 查找, search, and find, with no scope, namespace, or disambiguation constraints. In a prompt-routing skill, this can cause overmatching and unintended invocation of this or other skills, potentially redirecting user requests away from safer or more appropriate handling paths.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document explicitly states that the skill will automatically collect user queries, match results, confidence scores, routing decisions, response times, and user feedback, but it provides no notice, consent flow, retention policy, redaction guidance, or access controls. In an agent skill context, user queries and feedback can easily contain sensitive personal, business, or credential-like data, so silent logging increases privacy and data exposure risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger list includes broad, generic terms such as “路由”, “匹配”, “技能”, and “自动调用”, which can overlap with normal user conversation and unrelated tasks. In a prompt-routing skill, overly permissive activation terms increase the chance of unintended invocation or misrouting, causing the wrong skill to handle user input and potentially exposing downstream capabilities unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest trigger list includes very broad, generic terms such as '路由', '匹配', '技能选择', and '自动调用', which are likely to appear in ordinary conversation and unrelated tasks. In a prompt-routing skill, this increases unintended activation risk and can steer requests into deterministic tool/skill execution paths that bypass richer intent disambiguation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly documents direct invocation of matched skills for higher-confidence results and includes command-oriented examples like opening browsers and executing commands, but it does not require user confirmation or warn about side effects. In this context, a false-positive route can immediately trigger sensitive actions, especially because the router is designed to avoid LLM review for speed and determinism.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file is natural-language documentation, and its content forces a specific language for readers and operators. Under the policy rule, a fixed language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file hard-codes trigger and keyword vocabularies in both Chinese and English for multiple skills, and the module/docstrings are written only in Chinese. This encodes a language/locale behavior choice in the skill maintenance logic without any indication that users can choose language preferences or that the locale constraint is intentionally justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring is written only in Chinese, and the script's user-facing messages are also Chinese-only. This creates a locale policy concern because the skill forces a specific language without offering user opt-in or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The console output strings shown to users are hardcoded in Chinese, including progress and completion messages. Because there is no opt-in, fallback language, or documented regional limitation, this is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language documentation and output strings entirely in Chinese, including the module docstring and recommendation messages. The file does not offer any language choice or indicate that the skill is intentionally region-specific, which violates the policy against forcing a specific language without user opt-in.

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 file contains core documentation and operational output entirely in Chinese, including the module docstring and later user-visible messages. For a general-purpose prompt router, this imposes a specific language/locale without opt-in, which matches the policy's language/locale violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code's user-facing natural-language documentation and labels are written exclusively in Chinese, including core behavior descriptions and printed output labels. That creates a language/locale constraint without any indication that users can choose another language or that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This Python file contains natural-language descriptions and user-facing output/comments exclusively in Chinese, such as the module docstring and multiple explanatory comments. Under the policy rule for language/locale, forcing a specific language without opt-in or documented regional justification is a violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language docstrings and printed status text exclusively in Chinese, which imposes a specific language on users and maintainers without any opt-in or stated regional scope. The policy explicitly flags language or locale constraints when the skill does not offer a user choice or justify the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The test runner prints headings, result labels, expectations, and performance messages only in Chinese. Because this is user-visible runtime output and no alternative language selection or justification is provided, it constitutes a natural-language policy violation under the language/locale rule.

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's docstring and printed status messages are written in Chinese, which imposes a specific language in the user-facing text without any opt-in or alternative. The policy requires flagging language or locale constraints when a skill forces a language without user choice or documented justification.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · test_parse.py (reported line 13)May include surrounding context.

python
router = PromptRouter()

# 测试解析 prompt-router 自己的 SKILL.md
skill_md_path = 'C:/Users/User/.openclaw/workspace/skills/prompt-router/SKILL.md'
content = open(skill_md_path, 'r', encoding='utf-8').read()

print("解析 prompt-router/SKILL.md:")

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · test_parse.py (reported line 28)May include surrounding context.

python
# 测试解析 multi-search-engine
print("解析 multi-search-engine/SKILL.md:")
print("=" * 60)
skill_md_path = 'C:/Users/User/.openclaw/workspace/skills/multi-search-engine/SKILL.md'
content = open(skill_md_path, 'r', encoding='utf-8').read()
meta = router._parse_skill_md(content)
print(f"name: {meta.get('name')}")