Back to skill

Security audit

A2A协议市场

Security checks for vulnerabilities and agentic risk

Overview

This marketplace skill is coherent, but it handles wallet signatures and purchases with weak safeguards, so users should review it carefully before installing or running it.

Review before installing. Do not provide a wallet private key unless you trust the code and endpoint, keep A2A_MARKET_API_URL pinned to the intended API, require explicit confirmation for all purchases, protect or rotate any saved agent ID, and avoid the one-shot publish commands unless you have checked exactly what will be made public and pinned the tooling you run.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/a2a_client.py:31
Finding

Origin-Unbound Wallet Signatures Can Be Sent to an Arbitrary Configured API

Content
View full analysis
Dict[str, str]: """Sign API request for authentication.""" timestamp = str(int(time.time() * 1000)) body_hash = hashlib.sha256(body.encode()).hexdigest() if body else "" message = f"{method}:{path}:{timestamp}:{body_hash}" signed = self.account.sign_message(encode_defunct(text=message)) return { "X-Wallet-Address": self.wallet_address, "X-Timestamp": timestamp, "X-Signature": signed.signature.hex() } ``` The payment path also signs destination data supplied by the selected remote server: ```python payment_data = { "from": self.wallet_address, "to": payment_info.get("accepts", [{}])[0].get("resource", ""), "amount": int(price * 1_000_000), # USDC has 6 decimals "nonce": int(time.time() * 1000), "deadline": int(time.time()) + 3600 # 1 hour validity } message = json.dumps(payment_data, sort_keys=True) signed = self.account.sign_message(encode_defunct(text=message)) ``` ### Technical Analysis The client accepts an unrestricted API origin from either `A2A_MARKET_API_URL` or the constructor. It t ...[truncated 2843 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/a2a_client.py:165
Finding

Spending Limits and Confirmation Controls Are Bypassable

Content
View full analysis
Dict[str, Any]: """ Purchase a skill using credits instead of USDC. Args: skill_id: ID of the skill to purchase Returns: Skill content and payment details """ headers = self._agent_headers() headers["Content-Type"] = "application/json" response = requests.post( f"{self.api_url}/v1/listings/{skill_id}/pay", headers=headers, data=json.dumps({"payment_method": "credits"}) ) response.raise_for_status() return response.json() ``` ### Technical Analysis The client presents `max_per_transaction`, `daily_budget`, seller-reputation, and human-c ...[truncated 2287 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/a2a_client.py:328
Finding

Agent Bearer Credential Is Persisted Without Restrictive Permissions

Content
View full analysis
Optional[str]: """Load agent_id from environment or file.""" agent_id = os.getenv("A2A_AGENT_ID") if agent_id: return agent_id if os.path.exists(AGENT_ID_FILE): with open(AGENT_ID_FILE) as f: return f.read().strip() return None def _agent_headers(self) -> Dict[str, str]: """Get headers with agent ID for Credits API calls.""" if not self.agent_id: raise ValueError("Agent ID required. Call register() first.") return {"x-agent-id": self.agent_id} ``` Registration writes it using default process permissions: ```python # Save agent_id and referral_code locally self.agent_id = data["agent_id"] with open(AGENT_ID_FILE, "w") as f: f.write(self.agent_id) with open(REFERRAL_CODE_FILE, "w") as f: f.write(data.get("referral_code", "")) ``` The shell client does the same: ```bash # Save agent_id and referral_code locally echo "$agent_id" > "$AGENT_ID_FILE" echo "$referral_code" > "$REFERRAL_CODE_FILE" ``` ### Technical Analysis The API documentation and implementation use `x-agent-id` as the only credential for balance queries, reward claims, and credits purchases. The value therefore functions as a bearer credential rather than a harmless identifier. Both clients write it to a predictable file, `~/.a2a_agent_id`, without explicitly setting permissions. On systems with a common `022` umask, a newly created file may be readable by other local users. Existing permissive permissions are also retained when the file is overwritten. No wallet signature, session secret, or second factor is added t ...[truncated 1209 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
publish.sh:47
Finding

Publishing Script Installs and Executes an Unpinned Global npm Package

Content
View full analysis
/dev/null; then echo -e "${GREEN}✓ clawhub CLI is installed${NC}" clawhub --version 2>/dev/null || true else echo -e "${YELLOW}Installing clawhub CLI...${NC}" npm install -g clawhub echo -e "${GREEN}✓ clawhub CLI installed${NC}" fi ``` The quick-start instructions chain installation directly into authentication and publication: ```bash npm install -g clawhub && \ clawhub login && \ cd a2a-market-skill && \ clawhub publish . \ --slug a2a-market \ --name "A2A Market" \ --version 1.2.0 \ --changelog "v1.2: Add Credits system - agent registration, credits balance, daily rewards, credits payment, and referral program" ``` ### Technical Analysis `npm install -g clawhub` resolves the current package version and dependency graph at execution time. No exact version, integrity hash, lockfile, or verified source is specified. npm packages can execute lifecycle scripts during installation. A compromised package release, compromised maintainer account, registry incident, or malicious transitive dependency could therefore execute code with the privileges of the user running the publication script. Global installation also modifies the user's shared tool environment. The installed executable is subsequently used for browser-based GitHub authentication and publication. A compromised CLI would be positioned to steal authentication tokens, alter uploaded content, or publish under the victim's identity. The project does not show evidence that the current `clawhub` package is malicious. The confirmed issue is the unsafe, mutable dependency acquisition and immediate execution pattern. ### Attack Path 1. An attacker compr ...[truncated 1238 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (20)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 186)May include surrounding context.

Delete Listing

text
DELETE /v1/listings/:id

Response: 204 No Content

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The guide instructs users to run clawhub login, which triggers GitHub authorization, but provides no warning about scopes, token handling, or verifying the legitimacy of the CLI and login URL. This can lead users to grant broad repository/account access without understanding the privacy or credential implications, especially in a third-party skill distribution context.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · PUBLISH_GUIDE.md (reported line 136)May include surrounding context.

bash
# 使用 GitHub CLI
gh repo create a2a-market-skill --public --description "A2A Market skill for OpenClaw - Where agents earn"

# 或者手动在 github.com 创建

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This section provides a one-shot copy-paste command that installs tooling, logs the user in, changes directories, and publishes the current skill remotely, but it does not clearly warn that the command will publicly publish project contents. Copy-paste deployment commands materially raise the risk of accidental data exposure, especially if users run them without reviewing what is in the directory or understanding the publication target.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The GitHub fallback instructions create a public repository and push the current project contents, but the markdown does not warn that this will expose the repository publicly. That omission can lead to accidental publication of source code, secrets, configuration, or other sensitive files if users follow the commands verbatim. Because the commands are framed as an easy fallback, the skill context makes accidental disclosure more plausible.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding

The documentation recommends running uvx upd-skill YOUR_USERNAME/a2a-market-skill --env clawd without pinning a specific version or commit. That can cause users to fetch and execute whatever the latest upstream package resolves to at install time, increasing supply-chain risk if the package changes unexpectedly or is compromised. In this context, the command is presented as an installation path for end users, which makes the lack of version pinning more dangerous than a purely internal developer note.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction '技能名称:英文' mandates a specific language in the skill metadata. This is a natural-language locale policy issue because it requires English output without offering user choice or documenting a necessary platform constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The sample skill template promotes a web-scraping agent with inputs like arbitrary URLs, selectors, pagination, and JS rendering, but omits explicit safeguards around authorization, privacy, robots/ToS compliance, rate limiting, and impact on third-party services. In a marketplace context, this can normalize deployment of scraping skills that collect personal or protected data or impose abusive traffic on external sites, increasing legal, privacy, and operational risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown API reference documents payment-gated content retrieval and purchase flows, but it does not include any user-facing warning that these operations will charge the caller or consume paid credits. For markdown files, SQP-2 applies when descriptions omit warnings about behaviors that could affect user data or finances; here the financial impact is described structurally but not warned about as a caution to users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The markdown describes a DELETE endpoint that removes a listing but does not warn users that the action is destructive and may be irreversible. Under SQP-2 for markdown files, destructive behaviors that can affect user data or system integrity should be accompanied by an explicit warning.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/a2a_cli.sh (reported line 213)May include surrounding context.

sh
echo -e "${YELLOW}Getting price suggestion for: $name${NC}"
    echo ""
    
    response=$(curl -s -X POST "$API_URL/v1/pricing/suggest" \
        -H "Content-Type: application/json" \
        -d "$body")

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/a2a_cli.sh (reported line 277)May include surrounding context.

sh
echo -e "${YELLOW}Registering agent: $name${NC}"

    response=$(curl -s -X POST "$API_URL/v1/agents/register" \
        -H "Content-Type: application/json" \
        -d "$body")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persists the agent ID and referral code to predictable files in the user's home directory without setting restrictive permissions or clearly warning the user. While these are not as sensitive as passwords, they are account-linked identifiers that could be read by other local users or processes on a shared/misconfigured system and then used to query balances, claim rewards, or abuse referral/account functionality.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The spending rules define both an auto-approve threshold and a higher require-confirmation threshold, but the implementation ignores the latter and requires confirmation for any amount above auto_approve_below. This mismatch is a logic flaw that can cause operators to rely on a policy that is not actually enforced as documented, leading to incorrect assumptions about when autonomous purchases are allowed.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · scripts/a2a_client.py (reported line 38)May include surrounding context.

python
max_per_transaction: float = 10.0
    daily_budget: float = 100.0
    min_seller_reputation: int = 60
    auto_approve_below: float = 5.0
    require_confirmation_above: float = 50.0

@dataclass

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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 · scripts/a2a_client.py (reported line 205)May include surrounding context.

python
max_per_transaction: float = 10.0
    daily_budget: float = 100.0
    min_seller_reputation: int = 60
    auto_approve_below: float = 5.0
    require_confirmation_above: float = 50.0

@dataclass

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
90% confidence
Finding

This method enables autonomous purchase decisions by returning false for items priced at or below the auto-approve threshold, allowing purchases to proceed without human review. In a marketplace client that can spend funds, that behavior is risky when combined with remote listings and imperfect marketplace trust, because malicious or low-value items can still be purchased automatically.

Content

Scanner excerpt · scripts/a2a_client.py (reported line 115)May include surrounding context.

python
def _needs_confirmation(self, price: float) -> bool:
        """Check if purchase needs human confirmation."""
        return price > self.rules.auto_approve_below
    
    def search(
        self,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Credits-based purchases immediately delegate to purchase_with_credits() and skip the seller reputation, budget, and confirmation checks applied to x402 purchases. An attacker or low-quality seller could induce automated spending of credits on undesirable listings because the alternate payment path bypasses the intended safety controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The register() method stores agent_id and referral_code under the user's home directory, but there is no user disclosure in the method docstring or inline messaging that registration persists data locally. Because this is a file-write side effect outside the return value itself, users of the library may not realize it creates or updates local state.

Content

No source excerpt is available for this finding.