T09 · Insecure Skill Coding Practices
- Location
skills.md:50- Finding
Wallet Private Key Stored Without Enforced Access Controls
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is transparent about being a PancakeSwap trading tool, but it gives the agent persistent control of a funded wallet without enforced key protection or required per-trade confirmation.
Install only if you are comfortable giving the agent control over a dedicated, low-balance BSC wallet. Do not reuse an important wallet, prefer testnet first, secure the key file before funding it, and require the agent to show and wait for your explicit approval before every token approval, swap, or transfer.
skills.md:50Wallet Private Key Stored Without Enforced Access Controls
skills.md:41Unpinned Third-Party Dependency Installation
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
56 \
"$ADDRESS" \
--ft-auth \
--secret ~/.config/clawchain/credentials.json \
-brid $CLAWCHAIN_BRID \
--api-url $CLAWCHAIN_NODE \
--await
The skill is explicitly built around persistent local wallet state, enabling the agent to retain signing capability across sessions. In context, this persistence materially raises risk because a compromised agent environment, prompt abuse, or unauthorized reuse of the wallet can trigger future transactions without fresh wallet setup or strong re-authentication.
# BSC PancakeSwap Trading Skill
This skill lets the AI agent create a BSC wallet (private key + address saved in one file), **discover which tokens and swaps are available** on PancakeSwap, swap tokens, and receive top-ups from the user. The agent is not limited to specific tokens — it can resolve token addresses and check which pairs have liquidity.
## Configuration (BSC Mainnet)
The skill instructs creation of a wallet file containing an unencrypted private key and public metadata, which materially increases the chance of key theft through local compromise, backups, logs, or accidental disclosure. In this skill’s context, the key directly authorizes on-chain transfers and swaps, so exposure can lead to irreversible loss of funds.
The trade execution section describes signing and broadcasting swaps without requiring a just-in-time user confirmation, transaction preview, or explicit risk acknowledgement at the execution step. Because blockchain transactions are irreversible and the skill is designed to handle arbitrary tokens and routes, mistakes or prompt-induced abuse could immediately convert or drain user-provided assets.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
## 7. Security Notes
- **wallet.json** contains the private key. Restrict access: `chmod 600 ~/.config/bsc_agent/wallet.json`.
- Use this wallet only for the agent and only with amounts you accept to lose if the machine or file is compromised.
- Prefer a dedicated BSC wallet; do not reuse a wallet that holds large funds elsewhere.
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
# BSC PancakeSwap Trading Skill
This skill lets the AI agent create a BSC wallet (private key + address saved in one file), **discover which tokens and swaps are available** on PancakeSwap, swap tokens, and receive top-ups from the user. The agent is not limited to specific tokens — it can resolve token addresses and check which pairs have liquidity.
## Configuration (BSC Mainnet)