T09 · Insecure Skill Coding Practices
- Location
skill.md:126- Finding
Private Key Stored Unencrypted in the Default Wallet File
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is openly designed for BSC trading, but it asks an agent to store and use a spend-capable private key in a default plaintext wallet file for irreversible financial transactions.
Review this carefully before installing. Use only a fresh, low-balance wallet, prefer the encrypted keystore option or an external signer, pin dependencies, and require explicit confirmation with displayed token addresses, amounts, slippage, approvals, and transaction destination before any swap or ClawChain registration.
skill.md:126Private Key Stored Unencrypted in the Default Wallet File
skill.md:105Dependency Installation Is Not Reproducibly Pinned
skill.md:205Unquoted Configurable Wallet Path Is Used in Shell Commands
The skill explicitly declares read access to a plaintext wallet file containing a BSC private key and optional access to another credentials file. Even though this is core functionality, persistent local secret storage in plaintext substantially increases the blast radius if the agent, host, logs, backups, or adjacent tooling are compromised.
description: "Contains the agent's BSC private key and public address. Created once during wallet setup. The agent uses this to sign swap transactions on BSC. This file SHOULD be encrypted at rest — see Security section."
access: read
- name: ClawChain Credentials (optional)
path: "~/.config/clawchain/credentials.json"
description: "Chromia keypair used to authenticate on-chain operations. Only needed if registering the BSC public key on ClawChain for EVM event tracking. This file is created by the clawchain skill, not by this skill."
access: read
optional: true
Referenced artifact was not completely inspected
- It does **not** manage ClawChain agent registration. For that, see the `clawchain` skill (`skill.md` or `curl_skills.md`).
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- It does **not** manage ClawChain agent registration. For that, see the `clawchain` skill (`skill.md` or `curl_skills.md`).
- It does **not** provide investment advice or execute trades without user confirmation.
- It does **not** access any files outside of `~/.config/impossible_agent/` and optionally `~/.config/clawchain/credentials.json` (read-only, for EVM key registration only).
### Transparency: Files Accessed
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- It does **not** manage ClawChain agent registration. For that, see the `clawchain` skill (`skill.md` or `curl_skills.md`).
- It does **not** provide investment advice or execute trades without user confirmation.
- It does **not** access any files outside of `~/.config/impossible_agent/` and optionally `~/.config/clawchain/credentials.json` (read-only, for EVM key registration only).
### Transparency: Files Accessed
The transparency table confirms the skill reads and writes a wallet file containing a private key and can read another credential file. This is legitimate for trading/signing, but it still represents real credential exposure risk because the skill design depends on direct filesystem access to long-lived secrets.
| File | Access | Purpose |
|------|--------|---------|
| `~/.config/impossible_agent/wallet.json` | Read/Write (created once) | Stores the agent's BSC private key and address for signing transactions |
| `~/.config/clawchain/credentials.json` | Read-only (optional) | Used only if registering BSC public key on ClawChain for EVM event tracking |
### Transparency: Network Calls
The example command passes a credential file directly to a CLI via --secret ~/.config/clawchain/credentials.json, normalizing direct filesystem use of long-lived authentication material. If command execution, shell history, process inspection, or surrounding tooling are compromised, this can lead to unauthorized ClawChain actions tied to the agent identity.
56 \
"$ADDRESS" \
--ft-auth \
--secret ~/.config/clawchain/credentials.json \
-brid $CLAWCHAIN_BRID \
--api-url $CLAWCHAIN_NODE \
--await
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
| USDT | `0x55d398326f99059fF775485246999027B3197955` | Stablecoin |
| BUSD | `0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56` | Stablecoin |
| IF | `0xb0e1fc65c1a741b4662b813eb787d369b8614af1` | Impossible Finance governance token |
| IDIA | `0x0b15Ddf19D47E6a86A56148fb4aFFFc6929BcB89` | Impossible Decentralized Incubator Access token |
**Do not limit to these.** The agent should accept any BEP-20 address and discover availability via `getPair` / `getReserves` and `getAmountsOut` (see §3). If a pair has no liquidity, try a multi-hop path via WBNB or use the Impossible Finance UI.
The skill instructs the agent to create and persist a reusable private key on disk for future signing operations. Long-lived session/key persistence increases the risk of account takeover and fund loss if the host or agent environment is later compromised, especially since the default format is plaintext JSON.
---
## 1. Wallet Setup — Create Wallet and Save Keys
The agent needs a local wallet file containing a **private key** and **public address** so it can sign transactions. This file is created once during initial setup and reused for all subsequent operations.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
}
- **privateKey** — Used to sign transactions. This file is restricted to owner-only access (`chmod 600`). Never log or expose this value.
- **address** — The agent's BSC account. The user sends BNB/tokens to this address to fund the agent.
- **publicKey** — Derived from private key. Used optionally for ClawChain EVM event tracking registration.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
}
- **privateKey** — Used to sign transactions. This file is restricted to owner-only access (`chmod 600`). Never log or expose this value.
- **address** — The agent's BSC account. The user sends BNB/tokens to this address to fund the agent.
- **publicKey** — Derived from private key. Used optionally for ClawChain EVM event tracking registration.
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
mode: 0o600 automatically. Verify with:
chmod 600 ~/.config/impossible_agent/wallet.json
ls -la ~/.config/impossible_agent/wallet.json
# Should show: -rw-------
No suspicious patterns detected.