Back to skill

Security audit

AP2 Checkout (mock)

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent local mock checkout demo, but its recommended installer runs mutable code outside the reviewed artifact and can change OpenClaw setup.

Install only from a trusted, reviewed AP2 checkout. Avoid running the one-command `npx -y` installer unless you are comfortable with it modifying OpenClaw and starting local services; prefer verifying the AP2 commit and pinning the `mcporter` version first.

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
SKILL.md:9
Finding
Unpinned and Unaudited Package Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:9`, `SKILL.md:20-23`, and `scripts/post-install.sh:8-10` **Vulnerability Type**: Unpinned third-party dependency and execution of installer code outside the audited artifact **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:9`: ```yaml metadata: {"openclaw":{"emoji":"🛒","requires":{"bins":["mcporter","curl","uv","python3"]},"envVars":[{"name":"AP2_HOME","required":true,"description":"Absolute path to AP2 repository root (directory containing code/)."},{"name":"MCPORTER_CONFIG","required":false,"description":"Path to this skill mcporter.json after ClawHub install."}],"install":[{"id":"mcporter","kind":"node","package":"mcporter","bins":["mcporter"],"label":"Install mcporter CLI"}]}} ``` From `SKILL.md:20-23`: ```bash cd "$AP2_HOME" npx -y file:code/samples/python/scenarios/a2a/unified/clawhub/npm/ap2-agent-checkout install ``` The same command is recommended by `scripts/post-install.sh:8-10`: ```bash echo "Recommended (skill + openclaw + auto-start mock backend):" echo " cd \"\$AP2_HOME\" && npx -y file:code/samples/python/scenarios/a2a/unified/clawhub/npm/ap2-agent-checkout install" ``` ### Technical Analysis The skill declares the npm package `mcporter` without an exact version or integrity constraint. Consequently, installation can resolve to a future package release that was not part of this audit. The recommended setup also invokes `npx` with `-y`, automatically consenting to package execution. The package is loaded from an AP2 working tree outside this audited skill artifact. The implementation and any npm lifecycle scripts in that directory were therefore not available for inspection during this audit. Although the `file:` source is local rather than an external URL, its trustworthiness depends on the provenance and current state of the separate AP2 checkout. If that checkout is compromised, replaced, or modified after review, `npx` may execute attacker-controlled package ...[truncated 1530 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `mcporter` to an exact, reviewed version rather than using an unconstrained package name. 2. Use a lockfile and verify npm package integrity hashes during installation. 3. Pin the AP2 repository to a reviewed commit and verify its commit signature or checksum before executing package code from it. 4. Include or vendor the installer implementation within the auditable project so its behavior and lifecycle scripts can be reviewed. 5. Remove `-y` from the recommended `npx` command so users receive an explicit execution prompt. 6. Prefer `npm ci` with a committed lockfile over dynamically resolving dependencies. 7. Disable or strictly review npm lifecycle scripts where feasible, for example by initially installing with `--ignore-scripts`. 8. Document every file, configuration entry, and process that the installer modifies or starts. 9. Run installation under a dedicated, least-privileged account and avoid using administrator or root privileges. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Confidence
85% confidence
Finding
The skill is marked user-invocable and its description is broad enough to encourage autonomous checkout actions, but it does not clearly constrain when it may be invoked or what preconditions must be satisfied before initiating sensitive purchase flows. In a payment-related skill, ambiguous scope increases the chance of accidental activation, unsafe delegation, or use outside the intended mock/demo environment, especially since the document contains operational steps for approvals, mandates, and checkout completion.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The skill instructs users to run an install command via `npx -y file:... install`, which executes code from a local repository path without any integrity pinning, signature verification, or immutable version guarantee. In this context, the risk is elevated because the command is explicitly marketed as a one-command setup that also patches OpenClaw and starts backend services, so a tampered AP2 checkout or modified local repo could execute arbitrary code with the user's privileges.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The script prints a recommended install command using `npx -y file:... install`, which encourages execution of a package entrypoint without an explicit immutable version pin. If the referenced package path or surrounding repository state is changed unexpectedly, users may run altered installer code with their local privileges during setup.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The instruction requires explicit approval via fixed phrases 'yes / approve / 确认', which embeds a specific language/locale choice in the policy text. Because the file does not state that users may approve in their preferred language, this can conflict with language/locale flexibility requirements.

Static analysis

Detected: suspicious.install_untrusted_source

Install source points to URL shortener or raw IP.

Warn
Code
suspicious.install_untrusted_source
Location
mcporter.json:6