Back to skill

Security audit

Decision Gate Verifier

Security checks for vulnerabilities and agentic risk

Overview

This skill is purpose-aligned but needs review because it can authorize real USDC payments using server-supplied terms without local validation or confirmation.

Install only if you are comfortable giving this skill a wallet private key for a wallet funded with Base USDC. Use a dedicated low-balance wallet, verify the API/RPC endpoints, and avoid automated use until the client validates fixed payment terms and requires explicit confirmation before signing.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
client.py:256
Finding

Unvalidated Server-Directed Payment Authorization

Content
View full analysis

Vulnerability Details

File Location: client.py:256-274
Vulnerability Type: Automatic signing of untrusted payment terms
Risk Level: High

Vulnerable Code

python
auth = {
    "from": self.address,
    "to": Web3.to_checksum_address(terms["payTo"]),
    "value": str(int(terms["maxAmountRequired"])),
    "validAfter": str(now - 60),
    "validBefore": str(now + 600),
    "nonce": "0x" + secrets.token_bytes(32).hex(),
}
eip = terms["eip712"]
signable = encode_typed_data(
    domain_data=eip["domain"],
    message_types=eip["types"],
    message_data={
        "from": auth["from"], "to": auth["to"], "value": int(auth["value"]),
        "validAfter": int(auth["validAfter"]), "validBefore": int(auth["validBefore"]),
        "nonce": bytes.fromhex(auth["nonce"][2:]),
    },
)
sig = Account.sign_message(signable, private_key=self.account.key).signature.hex()

Technical Analysis

The x402 payment implementation treats payment terms returned by the remote API as trusted. It signs an EIP-3009-style authorization using the wallet's private key without validating critical security boundaries, including:

  • The payTo recipient.
  • The maxAmountRequired value.
  • The EIP-712 domain chain ID.
  • The EIP-712 verifying contract or token contract.
  • Whether the domain represents the expected Base USDC contract.
  • Whether the authorization amount equals the advertised fee of 50,000 USDC base units.
  • Whether the offered payment scheme and message types are exactly those supported by the client.

Merely converting the supplied recipient into a checksum address does not establish that it is an authorized recipient. Likewise, encode_typed_data() encodes the server-provided domain but does not determine whether that domain is safe or expected.

This behavior exceeds the minimum privilege needed to pay a fixed fee because the server is effectively allowed to select both the authori ...[truncated 1623 chars]

Remediation
View remediation

Remediation Suggestions

Apply a strict local payment policy before constructing or signing the authorization:

  1. Require chain ID 8453 for Base mainnet.
  2. Require the EIP-712 verifying contract to equal the configured Base USDC address.
  3. Validate the complete EIP-712 domain, including expected name, version, chain ID, and verifying contract.
  4. Require maxAmountRequired to equal or fall below a caller-configurable hard cap. The documented $0.05 fee corresponds to 50,000 USDC base units.
  5. Pin or explicitly allow-list the payment recipient instead of accepting arbitrary payTo values.
  6. Validate the payment network, asset, scheme, and EIP-712 message type against an exact expected schema.
  7. Reject unknown fields, malformed offers, ambiguous offers, and responses containing multiple unsupported alternatives.
  8. Expose the recipient, asset, chain, and amount to the caller and require confirmation when they differ from pinned defaults.
  9. Keep the short authorization lifetime and unique nonce, but do not treat these controls as substitutes for recipient, amount, and domain validation.
  10. Add negative tests proving that altered recipients, inflated amounts, incorrect chain IDs, and unexpected verifying contracts are rejected before signing.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding

Security-Critical Dependencies Are Installed Without Version or Integrity Pinning

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:14-19
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: Medium

Vulnerable Code

yaml
install:
  - kind: uv
    package: web3
    bins: []
  - kind: uv
    package: eth-account
    bins: []

Technical Analysis

The installation metadata requests web3 and eth-account without exact versions, a lockfile, or package hashes. Consequently, separate installations can resolve to different package versions and transitive dependency graphs.

These dependencies occupy a security-critical position: they process the supplied wallet private key, construct blockchain transactions, encode payment authorizations, and create cryptographic signatures. A compromised, malicious, or unexpectedly incompatible future release could therefore execute with the Skill process's privileges and access sensitive in-memory wallet material.

The package names appear legitimate and no malicious dependency was demonstrated in the audited files. The vulnerability is the absence of reproducible version and integrity constraints, not evidence that the currently published packages are malicious.

Attack Path

  1. An attacker compromises a declared package, one of its transitive dependencies, or the relevant package-distribution account or infrastructure.
  2. The attacker publishes a malicious release that remains compatible with the unconstrained dependency declaration.
  3. A user installs the Skill after that release becomes the version selected by the resolver.
  4. The package manager downloads and installs the malicious release because no audited version or artifact hash is required.
  5. The dependency is imported by client.py and executes in the Skill's Python process.
  6. Malicious dependency code can inspect supplied keys, alter addresses or transaction data, manipulate signatures, access files available to the process, or communicate over t ...[truncated 630 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin web3 and eth-account to exact, reviewed versions rather than unconstrained package names.
  2. Commit a lockfile that captures the complete transitive dependency graph.
  3. Enforce package artifact hashes during installation where supported.
  4. Obtain packages only from an explicitly configured, trusted package index.
  5. Use automated dependency scanning and review release notes before updating cryptographic or blockchain dependencies.
  6. Test upgrades in isolation and require explicit approval before changing locked versions.
  7. Run the client with minimal filesystem and network permissions so a compromised dependency has limited reach.
  8. Prefer an isolated wallet with only the funds necessary for the service rather than a wallet holding unrelated assets.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes broad phrases such as "third-party audit," "signed receipt," and "check before sending" that could match many unrelated user requests and cause the skill to be invoked unexpectedly. Because this skill can initiate a paid verification flow and involves signing for USDC transfer authorization, overbroad invocation increases the chance of accidental payment or inappropriate use in contexts the user did not intend.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill describes a "one signature, no gas" payment flow and says the agent "never sends a transaction," which may downplay the security significance of signing an EIP-3009 authorization. A user may incorrectly infer this is harmless, even though the signature authorizes a real USDC transfer, creating risk of uninformed consent and unintended loss of funds if invoked automatically or misunderstood.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · client.py (reported line 246)May include surrounding context.

python
return receipt_tx.transactionHash.hex()


    # ── x402: pay by signing, no gas, no approval, no transaction ─────────────

    def _sign_x402(self, terms):
        """Sign an EIP-3009 transfer authorization for the quoted terms.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The default code path can trigger private-key-backed signing of an x402 payment authorization and send it to a remote verifier with no built-in interactive confirmation, explicit amount display, or trust check on the quoted payment terms. In an agent or automation context, this makes fund movement authorization effectively one function call away, so a caller can unknowingly authorize transfers to an attacker-controlled or misconfigured endpoint if api_url or returned terms are untrusted.

Content

No source excerpt is available for this finding.