T09 · Insecure Skill Coding Practices
- Location
scripts/install_skill.py:16- Finding
Unvalidated installation name permits directory escape and recursive deletion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s audit workflow is mostly disclosed, but its installer can overwrite or delete directories outside the intended OpenClaw skills folder if given a crafted install name.
Review before installing. Do not run scripts/install_skill.py with an untrusted --name value, and avoid --force until the installer validates that the destination stays inside the selected skills directory. If you use the skill, keep payment approval in your wallet policy and verify the x402 price, network, and payTo before any paid call.
scripts/install_skill.py:16Unvalidated installation name permits directory escape and recursive deletion
scripts/verify_package.py:30Package integrity verification accepts unlisted files that are later installed
The skill advertises broad auditing of arbitrary agent/API origins, OpenAPI/MCP readiness, and install blockers, but the visible content hard-codes a single backend and directs the agent to rely on that hosted service for readiness decisions. This can mislead operators about what evidence is being gathered and may cause trust, payment, or integration decisions to be based on a narrower or opaque backend assessment than the description suggests.
The skill advertises broad auditing of arbitrary agent/API origins, OpenAPI/MCP readiness, and install blockers, but the visible content hard-codes a single backend and directs the agent to rely on that hosted service for readiness decisions. This can mislead operators about what evidence is being gathered and may cause trust, payment, or integration decisions to be based on a narrower or opaque backend assessment than the description suggests.
The skill advertises broad auditing of arbitrary agent/API origins, OpenAPI/MCP readiness, and install blockers, but the visible content hard-codes a single backend and directs the agent to rely on that hosted service for readiness decisions. This can mislead operators about what evidence is being gathered and may cause trust, payment, or integration decisions to be based on a narrower or opaque backend assessment than the description suggests.
The skill advertises broad auditing of arbitrary agent/API origins, OpenAPI/MCP readiness, and install blockers, but the visible content hard-codes a single backend and directs the agent to rely on that hosted service for readiness decisions. This can mislead operators about what evidence is being gathered and may cause trust, payment, or integration decisions to be based on a narrower or opaque backend assessment than the description suggests.
The manifest describes an auditing skill that evaluates external agent/API origins before integration. This file deletes existing directories, copies the package into a skills directory, creates target directories, and writes a lock file, which are package installation behaviors not justified by the stated auditing purpose.
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
"version": checksums.get("version", "1.0.0"),
"installed_at": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
"checksums_file": "checksums.json",
"pinning": "Do not auto-update this skill. Reinstall only after reviewing a new ClawMart version and re-running scripts/verify_package.py.",
}
(dest / ".clawmart-lock.json").write_text(json.dumps(lock, indent=2) + "\n")
The skill is described as auditing an origin for readiness and install blockers, implying analysis of a target service or API. The implemented behavior instead installs the skill into a local OpenClaw directory and optionally runs a backend verifier after installation, which is semantically different from auditing an origin before integration.
Without declared permissions the skill's intent is opaque and cannot be validated.
The installer executes a bundled verifier program from the package being installed, which means untrusted package content gets code execution during installation. For an audit-oriented skill, this expands capability beyond passive analysis and creates a supply-chain trust problem if the package or verifier is modified.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
verifier = package_dir / "scripts" / "verify_package.py"
if not verifier.exists():
raise SystemExit("missing scripts/verify_package.py; refusing install without package integrity check")
return subprocess.call([sys.executable, str(verifier)])
def write_lock(dest: pathlib.Path):
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
verifier = package_dir / "scripts" / "verify_package.py"
if not verifier.exists():
raise SystemExit("missing scripts/verify_package.py; refusing install without package integrity check")
return subprocess.call([sys.executable, str(verifier)])
def write_lock(dest: pathlib.Path):
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
def main():
parser = argparse.ArgumentParser(description="Print safe curl examples for this ClawMart package.")
parser.add_argument("--name", help="Only print one example by name.")
parser.add_argument("--paid", action="store_true", help="Also show where to place a payment header. Do not paste private keys here.")
args = parser.parse_args()
This JSON manifest-style file enumerates package metadata and bundled files but provides no trigger phrases, activation conditions, or exclusion criteria. For manifest files, missing specificity on when the skill should activate can lead downstream systems to infer overly broad invocation behavior.
The argument parser description says this script prints safe curl examples for a 'ClawMart package', which contradicts the surrounding skill context of auditing agent/API origins for well-known discovery, x402 pricing, OpenAPI/MCP readiness, and install blockers. This appears to be copied documentation from another project and misstates the script's intent.