Back to skill

Security audit

Imperial Orchestrator

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent model router/executor, but it needs review because it can use local API credentials with configurable endpoints and stores conversation state locally with weak path controls.

Review before installing. Use this only with provider configurations you trust, prefer workspace-scoped installation, require HTTPS for remote providers, avoid custom or plaintext baseUrl values, limit exposed API-key environment variables, and avoid --session for sensitive conversations until session IDs and file permissions are hardened.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/model_validator.py:57
Finding

Provider credentials and prompt data can be transmitted to arbitrary or plaintext endpoints

Content
View full analysis
Optional[str]: """Resolve the API base URL from provider configuration.""" base = provider_data.get("baseUrl") or provider_data.get("base_url") or "" if base: return base.rstrip("/") ``` ```python # scripts/model_validator.py:88-121 def resolve_api_key(provider_key: str, provider_data: Dict[str, Any]) -> Optional[str]: """Resolve the API key from provider configuration.""" import os key = provider_data.get("apiKey") or provider_data.get("api_key") or "" if key and not key.startswith("${"): return key if key.startswith("${") and key.endswith("}"): env_var = key[2:-1] return os.environ.get(env_var) if key.startswith("$"): return os.environ.get(key[1:]) key_lower = provider_key.lower() env_candidates = [ f"{provider_key.upper()}_API_KEY", f"{provider_key.upper()}_KEY", f"{key_lower.upper().replace('-', '_')}_API_KEY", ] if "openai" in key_lower: env_candidates.insert(0, "OPENAI_API_KEY") if "anthropic" in key_lower: env_candidates.insert(0, "ANTHROPIC_API_KEY") if "deepseek" in key_lower: env_candidates.insert(0, "DEEPSEEK_API_KEY") for env in env_candidates: val = os.environ.get(env) if val: return val return None ``` ```python # scripts/model_validator.py:196-225 def probe_model_openai(base_url: str, model_id: str, api_key: Optional[str], timeout: int) -> Tuple[str, Optional[str], float]: url = _build_endpoint(base_url, "openai-completions") payload = json.dum ...[truncated 5701 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/orchestrator.py:55
Finding

Unsanitized session identifiers allow path traversal and insecure conversation persistence

Content
View full analysis
None: if self.session_file.exists(): self._data = load_json(self.session_file) else: self._data = { "session_id": self.session_id, "created_at": now_ts(), "messages": [], "total_cost_usd": 0, "total_input_tokens": 0, "total_output_tokens": 0, "turns": 0, } def save(self) -> None: self.session_dir.mkdir(parents=True, exist_ok=True) save_json(self.session_file, self._data) ``` ```python # scripts/orchestrator.py:81-99 def add_turn( self, user_msg: str, assistant_msg: str, model: str, cost: float, input_tokens: int, output_tokens: int, ) -> None: self._data["messages"].append({"role": "user", "content": user_msg}) self._data["messages"].append({"role": "assistant", "content": assistant_msg}) self._data["total_cost_usd"] = round( self._data.get("total_cost_usd", 0) + cost, 6 ) self._data["total_input_tokens"] = ( self._data.get("total_input_tokens", 0) + input_tokens ) self._data["total_output_tokens"] = ( self._data.get("total_output_tokens", 0) + output_tokens ) self._data["turns"] = self._data.get("turns", 0) + 1 self._data["last_model"] = model self._data["last_active"] = now_ts() ``` ```python # scripts/lib.py:33-34 def save_json(path: Path, data: Dict[str, Any]) -> None: path.wri ...[truncated 3320 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (40)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This description mismatch is more security-relevant because the skill explicitly documents active model validation with real API calls against provider endpoints while presenting itself mainly as a router. That can cause users to run it expecting passive routing logic, when in fact it may perform credential-backed network probing and stateful health checks, exposing tokens, metadata, or provider usage unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This description mismatch is more security-relevant because the skill explicitly documents active model validation with real API calls against provider endpoints while presenting itself mainly as a router. That can cause users to run it expecting passive routing logic, when in fact it may perform credential-backed network probing and stateful health checks, exposing tokens, metadata, or provider usage unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This description mismatch is more security-relevant because the skill explicitly documents active model validation with real API calls against provider endpoints while presenting itself mainly as a router. That can cause users to run it expecting passive routing logic, when in fact it may perform credential-backed network probing and stateful health checks, exposing tokens, metadata, or provider usage unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This description mismatch is more security-relevant because the skill explicitly documents active model validation with real API calls against provider endpoints while presenting itself mainly as a router. That can cause users to run it expecting passive routing logic, when in fact it may perform credential-backed network probing and stateful health checks, exposing tokens, metadata, or provider usage unexpectedly.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This description mismatch is more security-relevant because the skill explicitly documents active model validation with real API calls against provider endpoints while presenting itself mainly as a router. That can cause users to run it expecting passive routing logic, when in fact it may perform credential-backed network probing and stateful health checks, exposing tokens, metadata, or provider usage unexpectedly.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
- Skills are AgentSkills-compatible folders centered on `SKILL.md` with YAML frontmatter.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · config/agent_prompts.yaml (reported line 224)May include surrounding context.

yaml
## 你绝不能做的

      - ❌ 不要执行破坏性命令(rm -rf /、drop database)除非用户三次确认
      - ❌ 不要假设用户有 root 权限——先问
      - ❌ 不要在生产环境直接测试——给 staging 方案
      - ❌ 不要忽略 SSL/TLS——2026 年了,所有流量必须加密

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · config/agent_prompts.yaml (reported line 224)May include surrounding context.

yaml
## 你绝不能做的

      - ❌ 不要执行破坏性命令(rm -rf /、drop database)除非用户三次确认
      - ❌ 不要假设用户有 root 权限——先问
      - ❌ 不要在生产环境直接测试——给 staging 方案
      - ❌ 不要忽略 SSL/TLS——2026 年了,所有流量必须加密

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · config/agent_prompts.yaml (reported line 224)May include surrounding context.

yaml
## 你绝不能做的

      - ❌ 不要执行破坏性命令(rm -rf /、drop database)除非用户三次确认
      - ❌ 不要假设用户有 root 权限——先问
      - ❌ 不要在生产环境直接测试——给 staging 方案
      - ❌ 不要忽略 SSL/TLS——2026 年了,所有流量必须加密

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill advertises and documents shell execution, file reads/writes, and network/API probing workflows but does not declare an explicit tool scope such as permissions or allowed-tools. In a skill-loading environment, that creates an authorization ambiguity where operators may invoke a skill with broader capabilities than intended, increasing the chance of unintended command execution, filesystem access, or outbound requests using local credentials.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains major operational sections, role definitions, and workflow annotations in Chinese alongside English, which can force a language/locale on users who may not understand it. The policy allows locale constraints only when they are explicitly justified or when users are given a choice, neither of which is stated here.

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 defines all role prompts in Chinese and states that the selected system prompt is injected into the agent, which creates a strong default-language constraint across the system. Because most roles do not explicitly preserve user language choice, this can violate language/locale policy by forcing Chinese output without clear 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

The router fallback format hardcodes a Chinese downgrade banner, which can override user language preference during degraded operation. In a routing/orchestration skill, this is more dangerous than a cosmetic issue because fallback responses happen under failure conditions, when clarity is most important and the user may misunderstand safety, operational, or legal guidance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The emergency fallback prompt hardcodes Chinese markers, headings, and example output, making language override highly likely in the exact scenario where expert models are unavailable. Because this role is the final resilience path, forced language switching can degrade comprehension, cause incorrect execution of instructions, and undermine user trust across safety-critical domains like ops, legal, or security.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This manifest is written to define agent roles and behavior, and the role metadata, titles, purposes, and strategy descriptions are all specified exclusively in Chinese. That creates an implicit language/locale constraint for the skill without any indication that users can choose another language or that the restriction is justified as a region-specific tool.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The title and surrounding documentation specify the benchmark task set entirely in Chinese, which indicates a fixed language context. Under the policy rule, forcing a specific language without an explicit user choice or documented regional justification 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
94% confidence
Finding

The prompt explicitly instructs translation into Chinese, and other tasks in the file are likewise authored for Chinese responses, but the file does not state that this benchmark is region-specific or optional by locale. This can violate language/locale policy when a skill constrains output language without opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
80% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · config/benchmark_tasks.yaml (reported line 179)May include surrounding context.

yaml
- "wg genkey / wg pubkey"
          - "ip forwarding 开启"
          - "iptables MASQUERADE"
          - "systemctl enable wg-quick@wg0"

  security:
    display_name: "安全审计"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This manifest-like i18n configuration defines multiple supported languages but sets default_language: zh with no indication that users can choose or override the locale. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

The natural-language comments and rule guidance are written only in Chinese, and the routing keywords heavily embed Chinese-specific phrasing alongside English terms. This may indicate an implicit language preference without documenting user choice or locale justification, which can conflict with language/locale policy expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This YAML routing manifest uses very broad activation keywords such as "deploy", "linux", and especially "server" to trigger the ops-infra route. These terms overlap with common technical discussion and, without explicit scope limits or negative examples, may cause the skill to activate for unrelated requests.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The coding-debug rule includes generic triggers like "fix", "api", and the Chinese phrase "写一个" ("write one"), which are broad enough to appear in many ordinary requests. Because the manifest does not define trigger boundaries or negative examples for these phrases, they may lead to accidental invocation of the coding route.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly advertises real API calls, model probing, and execution behavior, but it does not warn users that prompts, task content, and configuration-derived metadata may be sent to third-party model providers during validation or routing workflows. In a multi-provider orchestration skill, this omission can cause users to expose sensitive prompts, internal code, or provider/account details under the assumption that the tooling is local-only or low-risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README explicitly advertises real API calls, model discovery, validation, and routing against user OpenClaw configuration, but it does not clearly warn that prompts, task text, model metadata, and possibly configuration-derived identifiers may be transmitted to external providers during normal use. In a multi-provider orchestration skill, that omission can cause users to send sensitive content off-host without informed consent, especially because the examples encourage immediate execution.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · examples/install.md (reported line 6)May include surrounding context.

Install into one workspace

bash
mkdir -p ./skills
cp -R imperial-orchestrator-skill ./skills/imperial-orchestrator

Static analysis

No suspicious patterns detected.