Back to skill

Security audit

ICP Modeler

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its ICP and marketing purpose, but its premium content feature can load undeclared Python code from local or external paths.

The offline ICP/profile features are straightforward. Treat the premium --generate-content path cautiously: only use it in an environment where you trust the generate.py module being imported, limit exposed API keys, and review all mortgage, VA-loan, credit-repair, or real-estate ad copy for accuracy and legal/compliance requirements before publishing.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
icp_modeler.py:410
Finding
Dynamic Execution of an Undeclared External Python Module<![CDATA[ ## Vulnerability Details **File Location**: `icp_modeler.py`, lines 410–425 **Vulnerability Type**: Unsafe dynamic dependency loading from mutable search paths **Risk Level**: Medium ### Vulnerable Code ```python try: sys.path.insert(0, os.path.dirname(__file__)) from generate import complete except ImportError: # generate.py is in the openclaw-skills parent dir gen_path = os.path.join( os.path.dirname(__file__), "..", "..", "..", "tier1-implementations", "openclaw-skills" ) sys.path.insert(0, os.path.abspath(gen_path)) try: from generate import complete except ImportError: return "[generate.py not found — set LLM_BACKEND=haiku and ensure generate.py is in path]" ``` ### Technical Analysis The premium content-generation path imports a module named `generate` after modifying `sys.path`. The project does not include `generate.py`, and the module is not a declared or pinned package dependency. If the first import fails, the code adds a hard-coded directory outside the audited project to the beginning of Python's module search path and attempts the import again. Python executes module-level code immediately during import. Consequently, invoking `--generate-content` can execute arbitrary code contained in any attacker-controlled or compromised `generate.py` found at one of the searched locations. This creates a dependency substitution risk and prevents the premium execution path from being fully reviewed or reproduced using only the files in this project. The declared `anthropic` installation dependency does not provide this module, so it does not establish the origin or integrity of the code ultimately imported as `generate`. ### Attack Path 1. An attacker obtains write access to the skill directory or the external `tier1-implementations/openclaw-skills` directory referenced by the fallback. 2. The attacker creates or replaces `generate.py` with a module containing malicious top-leve ...[truncated 1137 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Package the content-generation backend inside the audited skill and use a package-relative import, rather than importing an unqualified module from modified search paths. 2. Remove the hard-coded fallback to a directory outside the project and avoid runtime `sys.path` modification. 3. If the backend must remain external, distribute it as a version-pinned dependency from a trusted package repository and lock its version and integrity hash. 4. Declare every required runtime component in the skill metadata so installation and review cover the complete execution path. 5. Verify the external component's origin and integrity before loading it, and ensure its installation directory is not writable by less-trusted users. 6. Run optional LLM integration with the minimum required filesystem, network, and environment access. Provide only the specific API credential needed for the operation. 7. Fail closed with a clear dependency error when the trusted backend is unavailable instead of searching mutable or unrelated directories. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill metadata and primary library suggest ICP profiling, but this function adds LLM-powered bespoke marketing-content generation. That expands the capability from analysis into content production, increasing the chance the skill is used to generate persuasive financial advertising or regulated claims without appropriate controls, review gates, or disclosure. In a mortgage/real-estate context, generated copy can easily become misleading or noncompliant.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The CLI exposes a generic '--generate-content' interface that accepts arbitrary requests, which is broader than narrowly modeling ICPs. Even though the prompt frames outputs around an ICP, this still grants an unrestricted marketing-copy generation feature that could be repurposed for misleading, manipulative, or noncompliant financial promotion. The risk is amplified because the domain is mortgage/credit advertising, where accuracy and regulatory compliance matter.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
LLM-generated marketing content is printed directly to the user without any warning that it may be inaccurate, misleading, or require legal/compliance review before publication. In the mortgage, VA-loan, and credit-repair space, outputs may include unsupported financial claims, outdated program details, fair-lending issues, or deceptive advertising language, making silent presentation particularly risky.

Static analysis

No suspicious patterns detected.