Back to skill

Security audit

YYClaw

Security checks for vulnerabilities and agentic risk

Overview

The skill’s YYClaw API purpose is coherent, but it mishandles API keys and uses broad activation for paid external calls.

Review before installing. Use this only if you are comfortable sending prompts and account queries to YYClaw and potentially spending prepaid/on-chain credit. Do not let the agent print your API key or paste it into chat; configure it privately as an environment secret, and confirm before any billable model call.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:88
Finding
API Key Exposure Through Console Output and Conversation Logs## Vulnerability Details **File Location**: `SKILL.md`, lines 88–92 **Vulnerability Type**: Secret exposure through insecure credential handling **Risk Level**: Medium **Vulnerable Code Snippet**: ```bash ### Reading API Key ```bash echo $YYCLAW_API_KEY ``` If not set, ask the user to provide it or direct them to https://crypto.yyclaw.cc to get one. ``` ### Technical Analysis The skill explicitly instructs the agent to print `YYCLAW_API_KEY`. Printing a secret is not necessary to determine whether the variable is configured. The resulting value may be retained in terminal output, agent transcripts, execution logs, monitoring systems, or debugging records. The fallback instruction to ask the user to provide the key can also cause the credential to be entered directly into a conversation. Such conversations may be stored or made accessible to systems and personnel that do not require access to the credential. This violates least-exposure principles for secret handling. Although sending the key in an authorization header to the declared YYClaw API is necessary for authenticated operations, displaying it or accepting it through ordinary conversational input is not necessary. ### Attack Path 1. A user invokes the YYClaw skill without the agent first confirming whether the environment variable is safely configured. 2. The agent follows `SKILL.md` and executes `echo $YYCLAW_API_KEY`, or asks the user to provide the key in the conversation. 3. The plaintext API key appears in terminal output, an agent transcript, or associated logs. 4. A person or system with access to those records obtains the credential. 5. The exposed key is replayed against the YYClaw API to perform authenticated operations. ### Impact Assessment Successful exploitation could allow unauthorized use of paid model calls and access to API-key-scoped account information, including balance, remaining credit, wallet address, spending information, and ...[truncated 450 chars]
Remediation
## Remediation Suggestions - Remove `echo $YYCLAW_API_KEY` and never display the credential. - Check only whether the variable exists, without revealing its value: ```bash if [ -n "${YYCLAW_API_KEY:-}" ]; then echo "YYCLAW_API_KEY is configured" else echo "YYCLAW_API_KEY is not configured" fi ``` - Do not ask users to paste API keys into ordinary chat or command-line arguments. - Direct users to configure the key through a secret manager, protected environment configuration, or another private credential-entry mechanism. - Ensure application, proxy, and agent logs redact `Authorization` headers and values matching the `sk-yy-` key format. - Apply minimum necessary permissions, spending limits, expiration, rotation, and revocation controls to issued API keys. - Obtain explicit user approval before transmitting prompts containing confidential information to the third-party gateway.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (6)

External Script Fetching

High
Category
Supply Chain
Content
### Check Balance
```bash
curl -s -H "Authorization: Bearer $YYCLAW_API_KEY" https://crypto.yyclaw.cc/v1/balance | python3 -m json.tool
```

### Check Usage
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
### Check Usage
```bash
curl -s -H "Authorization: Bearer $YYCLAW_API_KEY" https://crypto.yyclaw.cc/v1/usage?limit=10 | python3 -m json.tool
```

### List Models
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
### List Models
```bash
curl -s https://crypto.yyclaw.cc/v1/models | python3 -m json.tool
```

### Call a Model
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill instructs the agent to send prompts, balance queries, and usage requests to an external service without clearly warning that user content, wallet-linked account data, and API key-authenticated metadata will be transmitted off-platform. This omission weakens informed consent and increases privacy risk, particularly because usage and balance endpoints expose financial and account details.

External Transmission

Medium
Category
Data Exfiltration
Content
### Call a Model
```bash
curl -s -X POST https://crypto.yyclaw.cc/v1/chat/completions \
  -H "Authorization: Bearer $YYCLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"gemini-3-flash","messages":[{"role":"user","content":"Hello"}]}'
Confidence
90% confidence
Finding
The model-call example transmits user-supplied prompt content to an external third-party endpoint using a bearer token tied to a paid account. In this skill context that behavior is expected, but it is still security-relevant because sensitive user data could be exfiltrated to the provider and the call may incur charges.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger 'Any mention of calling AI models through YYClaw' is overly broad and could cause the skill to activate in contexts where the user is only discussing YYClaw rather than consenting to use it. Because the skill performs authenticated external API calls tied to billing and account metadata, accidental activation can lead to unintended data transmission and paid actions.

Static analysis

No suspicious patterns detected.