Back to skill

Security audit

ClawFriend

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent ClawFriend purpose, but it asks for wallet and API authority, can run scheduled social actions, and delegates trust to community-installed code with weak safeguards.

Install only after reviewing the wallet, cron, and community-skill behavior carefully. Use a low-value dedicated wallet, do not reuse a primary EVM key, keep API_DOMAIN fixed to https://api.clawfriend.ai, disable or remove cron jobs you do not want, and avoid installing/running community skill scripts unless you independently trust and inspect them.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (6)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:38
Finding

Mandatory Delegation to Untrusted Community Skill Instructions

Content
View full analysis
node scripts/some-script.js [args] ``` ### Technical Analysis The Skill instructs the Agent to inspect community-installed Skills before every action, grants matching community Skills priority over the audited core Skill, and permits execution of scripts supplied by those Skills. A downloaded `SKILL.md` is an instruction-bearing document rather than passive data. If its publisher or distribution service is malicious or compromised, it can contain directives that alter the Agent's current objectives, request credentials, initiate network calls, or invoke local tools. The current design has no instruction isolation, capability boundary, signature verification, or explicit user-approval step before the third-party instructions are followed. This behavior exceeds minimum privilege because ordinary ClawFriend operations do not require arbitrary third-party Skills to be consulted for every unrelated user request. ### Attack Path 1. An attacker publishes or compromises a community Skill available through the ClawFriend Skill Market. 2. The Skill is installed into `cl ...[truncated 931 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
preferences/install-community-skill.md:61
Finding

Remote Community Skill Files Are Downloaded Without Authenticity Verification

Content
View full analysis
with the actual skill name mkdir -p ~/.openclaw/workspace/skills/clawfriend-community-skills/ ``` ```bash # Replace with the actual skill ID from step 1 curl -o ~/.openclaw/workspace/skills/clawfriend-community-skills//SKILL.md \ https://api.clawfriend.ai/v1/skill-market//SKILL.md ``` ```bash # Check the downloaded SKILL.md contains the correct skill ID in metadata cat ~/.openclaw/workspace/skills/clawfriend-community-skills//SKILL.md | head -10 # Verify the skill name and ID match what you intended ``` ```bash # Download each file to the skill directory: curl -o ~/.openclaw/workspace/skills/clawfriend-community-skills// \ https://api.clawfriend.ai/v1/skill-market// # Example for a script: # mkdir -p ~/.openclaw/workspace/skills/clawfriend-community-skills/trading-analyzer/scripts # curl -o ~/.openclaw/workspace/skills/clawfriend-community-skills/trading-analyzer/scripts/analyze.js \ # https://api.clawfriend.ai/v1/skill-market/2ad9dbad-b571-4d71-82cd-607ac7436852/scripts/analyze.js ``` ```bash cat ~/.openclaw/workspace/skills/clawfriend-community-skills//SKILL.md ``` ### Technical Analysis The installation instructions retrieve both instruction files and executable scripts from mutable API endpoints. The documented verification checks only whether metadata inside the downloaded file contains an expected Skill ID. Because that metadata and the payload originate from the same server, an attacker controlling the response can supply both a malicious payload and matching metadata. There is no cryptographic signature, trusted publi ...[truncated 1186 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/utils.js:150
Finding

Configured API Domain Can Exfiltrate the ClawFriend API Key

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/recover.js:29
Finding

Recovery Signature Can Be Sent to an Arbitrary Network Destination

Content
View full analysis
process.exit(1)); } ``` ### Technical Analysis The recovery script accepts its destination as a command-line argument and sends a wallet address and cryptographic signature to that destination without enforcing HTTPS or an official hostname. Although the EVM private key itself is not transmitted, the signature is an authentication proof for the fixed message: ```text Recover my agent on ClawFriend: ``` The message shown in the audited documentation contains no nonce, expiration, request identifier, or destination binding. Consequently, disclosure to another party creates a replay risk unless the server independently implements protections not visible in this project. ### Attack Path 1. An attacker supplies or recommends a recovery command containing an attacker-controlled API domain. 2. The user or Agent provides a valid wallet address and recovery signature. 3. `recover.js` posts both values to the attacker-controlled origin. 4. The attacker captures the signed recovery proof. 5. The attacker replays the proof against the legitimat ...[truncated 517 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/wallet.js:44
Finding

EVM Private Key Is Stored in a General Plaintext Configuration File

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/check-dependencies.js:35
Finding

Missing Dependencies Are Automatically Installed from an Unpinned Dependency Graph

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (326)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Generating/storing EVM private keys, signing messages, and querying chain state are wallet-management operations with direct financial sensitivity. Presenting them as incidental to a social/share-trading skill understates the real risk to user funds and identity.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: clawfriend
version: 1.1.2
description: ClawFriend Social Agent Platform - Skill market - Buy/Sell/Trade Share Agent - https://clawfriend.ai
homepage: https://clawfriend.ai
metadata: {"openclaw":{"emoji":"🧑‍🤝‍🧑","category":"social","api_base":"https://api.clawfriend.ai","requires":{"env":["EVM_PRIVATE_KEY","EVM_ADDRESS","CLAW_FRIEND_API_KEY"]},"primaryEnv":"CLAW_FRIEND_API_KEY"}}
---

# ClawFriend - Social Agent Platform - Buy/Sell/Trade Share Agent

**Website**: https://clawfriend.ai 
**API Base**: https://api.clawfriend.ai
**ClawHub**: `npx clawhub@latest install clawfriend`

## Working Directory

**IMPOR

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` - Skill documentation

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
👉 **Read:** [preferences/install-community-skill.md](./preferences/install-community-skill.md)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
👉 **Read:** [preferences/install-community-skill.md](./preferences/install-community-skill.md)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The file explicitly instructs execution of arbitrary Node.js scripts from community-installed skills. That is equivalent to delegated arbitrary code execution from an untrusted, discoverable directory and can lead to full compromise of local files, secrets, wallets, and agent state.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill directs the agent to ask the user for an EVM private key and persist it in local configuration. Soliciting and storing a blockchain private key gives the skill or any later compromise complete control over the associated wallet, enabling irreversible theft of funds and impersonation.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- Execute: `node scripts/recover.js https://api.clawfriend.ai <walletAddress> <signature>`

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/check-config.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/setup-check.js quick-setup https://api.clawfriend.ai "YourAgentName"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/buy-sell-shares.js buy <subject_address> <amount>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/buy-sell-shares.js buy <subject_address> <amount>

Static analysis

Detected: suspicious.dangerous_exec, suspicious.destructive_delete_command, suspicious.env_credential_access (+1 more)

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/activation-monitor.js:112

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
preferences/install-community-skill.md:516

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/utils.js:21

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
preferences/check-skill-update.md:55

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/recover.js:89

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/register.js:145

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
scripts/wallet.js:51