T09 · Insecure Skill Coding Practices
- Location
scripts/agent-play.js:174- Finding
Blind Signing of Backend-Controlled Solana Transactions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real Defipoly automation skill, but it gives an agent risky wallet and transaction-signing powers that need review before installation.
Install only if you are comfortable giving an agent access to a funded Solana wallet and letting it submit irreversible transactions. Use a new low-value wallet, avoid importing an existing wallet or pasting private keys, do not let it search your filesystem for wallet files, and treat the backend transaction-signing flow as high trust in the Defipoly service.
scripts/agent-play.js:174Blind Signing of Backend-Controlled Solana Transactions
SKILL.md:244Overbroad Wallet Discovery and Private-Key Extraction Instructions
scripts/agent-play.js:335Plaintext Private-Key Storage and Command-Line Secret Exposure
scripts/agent-play.js:58Predictable Plaintext JWT Cache in Shared Temporary Directory
The declared purpose is game automation, but the instructions also cover generating/importing private wallets, caching auth artifacts, and scanning arbitrary wallet addresses and balances. That behavioral expansion materially increases sensitive-data handling and surveillance capability beyond what a user would reasonably infer from the description, creating a trust and consent gap around keys, tokens, and wallet discovery.
The skill promotes autonomous on-chain actions using a funded wallet without a prominent upfront warning that transactions spend real assets and are irreversible. In the context of blockchain operations, missing this warning is especially dangerous because users may not appreciate that the agent can incur fees, transfer value, and perform risky game actions like steals automatically.
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
---
name: defipoly
description: "Play Defipoly — a Monopoly-inspired DeFi game on Solana. Buy properties, earn daily DPOLY yield, shield against theft, steal from players and the bank, roll dice for bonuses. Your agent plays autonomously with a funded SOL wallet."
version: 1.0.0
user-invocable: true
homepage: https://defipoly.app
metadata: {"openclaw":{"emoji":"🎲","os":["darwin","linux","win32"],"requires":{"bins":["node","npm"]},"skillKey":"defipoly","install":[{"id":"deps","kind":"exec","command":"cd {skillDir} && npm install","label":"Install Defipoly agent dependencies"}]}}
---
# Defipoly Game Agent
Y
The setup flow combines wallet discovery and private-key import without a strong safety warning about secret handling or consent boundaries. In context, this is particularly dangerous because it normalizes exposing wallet credentials to an autonomous agent that can immediately use them for live blockchain transactions.
These instructions create a natural-language path for the agent to locate local wallet files and then import their secret material for use. Because Solana wallet files and base58 private keys directly control funds, this can lead to credential exfiltration, unauthorized account access, and irreversible theft of real assets if the agent or surrounding tooling is compromised or over-privileged.
The lockfile includes ws 8.19.0, which is flagged for memory disclosure and memory-exhaustion denial of service issues. Even as a transitive dependency, a network-facing Solana agent may process untrusted websocket traffic from RPC infrastructure, so a vulnerable ws version can expose the process to crashes or unintended data exposure.
The lockfile also includes ws 7.5.10, which is flagged for memory exhaustion from tiny fragments and data chunks. Because this agent is designed to operate autonomously with a funded wallet and maintain blockchain network connectivity, denial of service against its websocket handling could disrupt operation or create availability gaps at financially sensitive times.
The script blindly signs a backend-provided serialized transaction and submits it for every state-changing action without independently validating transaction contents or prompting for confirmation. Because the skill is designed to operate with a funded SOL wallet, a compromised or malicious backend could craft arbitrary transactions that drain assets or grant unintended approvals.
The skill declares no explicit tool or permission scope even though its documented behavior clearly requires filesystem access, environment-variable access, network access, and command execution. In an agent setting, this increases the chance the skill is invoked with overly broad capabilities, making accidental credential access or unintended external calls more likely.
The setup flow instructs the agent to search outside the skill directory for wallet files, including default Solana locations and other project directories. This is dangerous because it authorizes broad filesystem discovery of highly sensitive credential material unrelated to the game, creating a direct path to privacy violations and wallet compromise.
The documentation explicitly instructs importing an existing wallet by handling a base58 private key. Direct agent handling of raw private keys is highly sensitive and creates unnecessary exposure risk through logs, prompts, shell history, process lists, or accidental persistence.
The skill instructs the agent not to ask permission for routine moves, enabling autonomous decision-making with a funded wallet. In this specific context, autonomous execution is security-relevant because each move can spend fees, alter asset positions, or attempt risky actions against players, all without fresh user approval.
- Do NOT make more than 3 actions per check-in unless the user explicitly asks for a burst
- Do NOT stay silent — if you're checking in and nothing is available, still tell the user
- Do NOT ask permission for routine moves — your play style is your mandate
- Do NOT change play style without asking the user
## Important Notes
The authenticate flow requests a nonce, signs it with the wallet secret key locally, then POSTs the wallet address, nonce, and signature to the backend. While the signing message mentions authentication, the CLI itself does not provide a user-facing disclosure that wallet-linked authentication data will be transmitted and cached.
The setup flow writes the wallet secret key to .wallet.json in plaintext without warning the user about local credential storage or applying file-permission hardening. Any local compromise, backup leak, shared workspace access, or accidental commit of the file can expose the private key and lead to total wallet loss.
The script exposes a generic scan-wallets command that accepts arbitrary wallet addresses and enumerates SOL/DPOLY balances in bulk. While it uses public on-chain data, this capability is broader than necessary for autonomous Defipoly gameplay and can facilitate targeting, profiling, or operational reconnaissance of third-party wallets.
The markdown defines activation around the user saying "play defipoly," but it does not provide negative examples or clarify when this should trigger versus ordinary discussion about the game. This can lead to unintended invocation from casual conversation rather than an explicit request to start autonomous play.
The lockfile includes stream-json 1.9.1 with an advisory describing O(depth^2) behavior on deeply nested input, which can enable algorithmic complexity denial of service. In this package it is only a transitive dependency of jayson, so exploitability depends on whether the agent parses attacker-controlled deeply nested JSON through that path.
uuid 8.3.2 is flagged for missing bounds checks in certain hash-based UUID functions when a caller supplies a buffer. This is likely lower risk here because it is a transitive library and exploitation requires the application path to invoke vulnerable UUID APIs with attacker-influenced buffer arguments.
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"private": true,
"type": "module",
"dependencies": {
"@solana/web3.js": "^1.98.0",
"bs58": "^6.0.0",
"tweetnacl": "^1.0.3"
}
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"type": "module",
"dependencies": {
"@solana/web3.js": "^1.98.0",
"bs58": "^6.0.0",
"tweetnacl": "^1.0.3"
}
}
Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.
"dependencies": {
"@solana/web3.js": "^1.98.0",
"bs58": "^6.0.0",
"tweetnacl": "^1.0.3"
}
}
The balance command allows querying any provided wallet address rather than only the configured gameplay wallet. Although this reads public blockchain state and is lower risk than direct fund movement, it still expands the tool into a generic wallet-inspection utility outside the stated gameplay scope.
Detected: suspicious.env_credential_access