Back to skill

Security audit

Agent Store

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real purchasing workflow, but it combines wallet payments, weakly validated payment challenges, and persistent model-configuration changes in ways users should review carefully before installing.

Only install this after reviewing the exact purchase and provider setup behavior. A safer version should require explicit confirmation before wallet unlock, approval, signing, payment submission, log-file creation, runtime config edits, verification requests, or active-model changes, and should validate payment amount, token, recipient, chain, spender, RPC URL, and provider endpoint against trusted allowlists.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/store.py:958
Finding

Untrusted x402 Challenge Can Control Financial Authorization Parameters

Content
View full analysis
str: extra = requirement.get("extra") if isinstance(extra, dict): name = str(extra.get("name") or "").lower() if name in KNOWN_PAYMENT_ASSETS_BY_NAME: return KNOWN_PAYMENT_ASSETS_BY_NAME[name] asset_address = str(requirement.get("asset") or "").lower() if asset_address in KNOWN_PAYMENT_ASSETS_BY_ADDRESS: return KNOWN_PAYMENT_ASSETS_BY_ADDRESS[asset_address] raise PurchaseError("x402 payment requirement uses an unsupported asset") ``` ```python def build_payment_signature_header( *, logger: StepLogger, payment_required: dict[str, Any], wallet: WalletSession, ) -> tuple[str, str]: requirement, payment_asset = choose_x402_requirement(payment_required) eip2612_extension = resolve_payment_extension( payment_required, "eip2612GasSponsoring", ) if eip2612_extension is None: ensure_permit2_allowance( logger=logger, wallet=wallet, requirement=requirement, ) typed_data, permit2_authorization = build_permit2_typed_data( requirement=requirement, wallet_address=wallet.address, ) signature_result = run_wallet_command( [ "sign-typed-data", "--token", wallet.token, "--data", json.dumps(typed_data, separators=(",", ":")), ], ) signature = str(signature_result.get("signature") or "") if not signature: raise PurchaseError("awp-wallet did not return an x402 payment signature") payment_payload = { "accepted": requirement, "payload": { "permit2Authorization": permit2_autho ...[truncated 5245 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/store.py:114
Finding

Arbitrary Log Path Allows Truncation of Writable Files

Content
View full analysis
None: self._log_path = log_path self._log_path.parent.mkdir(parents=True, exist_ok=True) self._log_path.write_text("", encoding="utf8") ``` ```python log_path = Path(argv[2]).expanduser() logger = StepLogger(log_path) ``` The same unvalidated path is also used to derive a persistent sidecar: ```python def attempt_path(self) -> Path: return Path(f"{self._log_path}.attempt.json") ``` ```python def persist_attempt_state(attempt_path: Path, state: dict[str, Any]) -> None: attempt_path.write_text( json.dumps(state, separators=(",", ":"), sort_keys=True), encoding="utf8", ) ``` ### Technical Analysis The documentation states that `log_file` should be inside the workspace’s logs folder, but the implementation does not enforce this restriction. The supplied path is expanded and then passed directly to `Path.write_text("")`, which truncates an existing file before the purchase begins. There is no canonical-path containment check, file-type check, symlink rejection, exclusive creation, or restriction to a dedicated log directory. Absolute paths and traversal paths are therefore accepted. If the process can write to the target, an existing file can be erased. The attempt-state path inherits the same issue. The script can create or overwrite a file named by appending `.attempt.json` to an attacker-influenced path. ### Attack Path 1. An attacker or untrusted invocation supplies a sensitive writable path as the `log_file` argument, such as an application configuration or workspace file. 2. Alternatively, the attacker places a symbolic link at the selected log path pointing to a sensitive writable target. 3. `StepLogger.__init__()` ca ...[truncated 922 chars]
Remediation
View remediation
.attempt.json`. 7. Run the Skill under a minimally privileged OS account with write access limited to its dedicated logs and state directories. ]]>

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:88
Finding

Remote Delivery Response Can Redirect the Agent’s Active Model and Future Session

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (10)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
- `X402_BASE_RPC_URL` defaults to `https://mainnet.base.org` for EIP-2612 nonce reads on Base
- the API-side facilitator config now lives in `apps/facilitator/config/x402.config.json` with the facilitator signer key in `apps/facilitator/config/x402.secrets.env`; committed examples live next to them
- the bundled Python client bypasses proxies automatically for loopback `API_HOST` and loopback x402 RPC endpoints
- [`awp-wallet`](https://github.com/awp-core/awp-wallet) must be installed and on `PATH`
- `awp-wallet allowances` must be available for Permit2-only assets

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

After purchasing an API key, the skill instructs the agent to modify runtime configuration, replace provider models, switch the active model, and send a verification request. Those persistence and execution changes exceed the stated purpose of a purchasing skill and could redirect future agent traffic, exfiltrate prompts, or silently alter system behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script automatically initializes/unlocks a wallet, queries a remote catalog, requests payment requirements, approves token allowances, signs typed data, and submits payment-related headers, all without any explicit confirmation gate in the code. In the context of a purchasing skill, that is highly dangerous because a user invocation could trigger real financial commitments, token approvals, and externally visible transactions beyond what the user specifically reviewed.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares executable behavior that can read environment data, modify files, access the network, and invoke shell commands, but it does not declare any tool scope or permissions boundary. That mismatch makes the skill harder to review and allows high-risk actions to occur under a deceptively simple purchase-oriented manifest.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Including a generic trigger like get makes accidental invocation much more likely because it appears in many unrelated user requests. In a skill that can initiate purchases and alter configuration, overly broad matching materially increases the chance of unintended high-impact actions.

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 is for buying API keys or API credits, but the documented entrypoint also accepts vps_instance. This hidden capability expands the skill's operational scope beyond what a user or reviewer would expect, increasing the risk of unintended purchases or resource provisioning.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill directs the agent to edit local runtime configuration and perform an outbound verification request without explicit up-front warning or consent. Hidden state changes and network activity are dangerous because they can persist beyond the transaction and connect the agent to a newly supplied endpoint controlled by the purchase result.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata says it is for buying API keys or API credits, but the code also allows purchasing vps_instance. This scope expansion is dangerous because it enables a more powerful and potentially abuse-prone resource than the declared user-facing purpose, undermining trust and informed consent around what the skill may procure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The script creates, overwrites, and deletes local log and attempt-state files automatically, including purchase flow metadata such as wallet address, product identifiers, and idempotency state. While not directly enabling remote code execution, this creates unannounced local side effects and may expose sensitive operational data on disk in environments where users do not expect persistent purchase artifacts.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/store.py (reported line 354)May include surrounding context.

python
def run_wallet_command(arguments: list[str]) -> dict[str, Any]:
    try:
        completed = subprocess.run(
            ["awp-wallet", *arguments],
            capture_output=True,
            check=False,