Back to skill

Security audit

Ai Plan Generator

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a document and task-plan generator, but it has unsafe file-writing scope and can carry untrusted analysis text into AI-executable plans.

Review before installing. Use it only with trusted input files, run it in a constrained workspace, validate projectName values, and manually review generated AI execution plans before giving them to tool-enabled agents.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
src/process-file-manager.js:25
Finding

Path Traversal Enables Arbitrary File Writes Outside the Intended Workspace

Content
View full analysis
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
src/ai_plan_generator_v2.py:251
Finding

Untrusted Analysis Content Is Embedded into Downstream AI Agent Instructions

Content
View full analysis
List[str]: """Extract business rules from analysis content (language-agnostic)""" rules = [] # Look for common business rule patterns lines = analysis_content.split('\n') for line in lines: if any(keyword in line.lower() for keyword in ['必须', '应该', '需要', 'required', 'must', 'should']): if len(line.strip()) > 10: # Avoid very short lines # Extract only the business logic, not technical implementation clean_rule = self._clean_business_rule(line.strip()) if clean_rule: rules.append(clean_rule) # Limit to top 5 most relevant rules return rules[:5] if rules else ["No specific business rules identified"] ``` ```python # src/ai_plan_generator_v2.py:436-438 md_content.append("- **业务规则**:") for rule in task["context"]["business_rules"]: md_content.append(f" - {rule}") ``` The sanitization routine does not remove agent-directed instructions: ```python def _clean_business_rule(self, rule_text: str) -> str: """Clean business rule text to remove technical implementation details""" cleaned = rule_text cleaned = cleaned.replace('$_SESSION', 'user session') cleaned = cleaned.replace('validate_admin', 'ad ...[truncated 3114 chars]
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Even if the skill only manages file locations and writes reports, that is still materially different from pure document generation and introduces filesystem side effects. Undisclosed directory creation and file writing can overwrite artifacts, leak project structure, or be abused in automation pipelines that trust the stated purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code and comments encode a policy that security fixes are lowest priority and not for immediate execution. In a task-generation skill, this is dangerous because it directly shapes downstream execution plans and may cause known vulnerabilities to remain unaddressed while additional functionality is built on top of them.

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 · src/ai_plan_generator_v2.py (reported line 268)May include surrounding context.

python
rules.append(clean_rule)
                    
        # Limit to top 5 most relevant rules
        return rules[:5] if rules else ["No specific business rules identified"]
        
    def _clean_business_rule(self, rule_text: str) -> str:
        """Clean business rule text to remove technical implementation details"""

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The generated output explicitly instructs consumers to handle security remediation last, normalizing delayed fixes even when vulnerabilities may be severe. In an automated planning context, this can systematically deprioritize urgent security work and increase the window of exposure for known issues.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
76% confidence
Finding

The skill advertises behavior that creates and manages files/directories, yet it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent environment, undeclared file read/write capability weakens least-privilege controls and can allow the skill to access or modify workspace content in ways users and orchestrators may not expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

An overly broad invocation description makes it easier for an orchestrator or user to apply the skill in contexts far beyond its safe operating assumptions. In combination with undeclared file access and behavior mismatches, this increases the chance the skill will be invoked on sensitive repositories or documents and perform unintended reads/writes.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill silently ingests an external security audit and folds the results into its generated plan, even though its stated role is plan generation from analysis artifacts. That behavior introduces undeclared capability and can cause sensitive audit findings to be propagated to outputs or downstream agents unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code reads a hard-coded file from /Users/admin/.openclaw/workspace instead of limiting itself to the user-supplied analysis directory. This expands the skill's trust boundary, creates hidden data dependencies, and can leak unrelated local security-audit content into generated outputs without the caller's knowledge.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This JavaScript file contains user-facing natural-language descriptions and generated document content in Chinese, including the top-level skill description and downstream section text. Under the stated policy, forcing a language/locale without opt-in is a natural-language policy violation unless the skill explicitly offers a language choice or documents a justified locale restriction, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Multiple methods return hardcoded Chinese strings for business objectives, scope, constraints, deliverables, risks, and the final assembled document. Because these are the primary user-visible outputs and there is no alternative language path or opt-in, the skill violates the language/locale policy for all users outside that locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JavaScript file contains user-facing and instructional natural language almost entirely in Chinese, including class comments, generated titles, descriptions, and validation standards. Because there is no indication that the skill is region-specific or that users can opt into another language, this creates a language/locale policy concern under the rule for forced language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JavaScript file contains natural-language descriptions and generated report text exclusively in Chinese, including class documentation and user-facing analysis messages. That imposes a specific language/locale on users and downstream consumers without any documented opt-in or alternative locale support.

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-level description is written entirely in Chinese and states the component generates context documents, but it does not offer any language selection or explain that the skill is intended only for a Chinese-language environment. This creates a natural-language locale policy concern because the skill appears to assume a fixed language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generator hardcodes what appear to be concrete secrets and credentials in integration specifications, including values like secret123 and client secrets. Even if these are placeholders, emitting credential-shaped values in generated artifacts normalizes insecure secret handling, risks accidental deployment with default credentials, and can leak sensitive configuration into source control or downstream systems.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code embeds Chinese-only natural-language descriptions and console messages for general-purpose commands, which imposes a specific language on users without opt-in. The policy explicitly disallows forced language or locale unless the tool offers a choice or is clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill generates campaign, task, and context documents from minimal input, implying the provided input drives the generated output. In the generate-context command, the code reads campaignFile but does not parse or use its contents; instead it constructs a fixed campaignInfo object with example values, so the generated context documents do not actually reflect the supplied input.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file's natural-language descriptions are entirely in Chinese, including the top-level module comment and method docstrings, with no indication that language selection is optional or region-specific. Under the policy for natural-language content, forcing a specific language without user opt-in is a locale/language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file’s natural-language descriptions and generated task/document labels are written exclusively in Chinese, indicating an implicit language constraint. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation because the skill does not document any language choice or region-specific justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The inline comment says Phase 3 security fixes are 'as inventory, not for immediate execution,' suggesting reference-only output. However, the generated tasks are stored alongside executable phases and exported under 'ai_execution_plan' in JSON, which presents them as part of the execution plan rather than merely informational inventory.

Content

No source excerpt is available for this finding.