T09 Β· Insecure Skill Coding Practices
- Location
references/08-openclaw-one-shot.md:13- Finding
Sensitive credentials are collected through chat and unnecessarily persisted in configuration and cron definitions
- Content
View full analysis
Vulnerability Details
File Location:
references/08-openclaw-one-shot.md:13-17, 36-37, 52-60;references/09-openclaw-one-shot-free-key.md:15-25, 31-33, 50-60
Vulnerability Type: Plaintext sensitive credential handling and excessive secret persistence
Risk Level: MediumComplete Vulnerable Snippets
From
references/08-openclaw-one-shot.md:13-17:text a. **Payer wallet private key** β paste your EVM private key for the funded wallet that will pay 50 $POWER for the credit plan. **Use a burner wallet only** β never a wallet holding significant assets or with extensive transaction history. This key is consumed by `node scripts/signup-pay.mjs` and stored in OpenClaw env as `POWERLOOM_EVM_PRIVATE_KEY`. b. **Telegram alerts** β ask explicitly: "Do you want Telegram alerts for whale swaps? If yes, paste your `POWERLOOM_TELEGRAM_BOT_TOKEN` and `POWERLOOM_TELEGRAM_CHAT_ID`. If no, type 'skip' and alerts will print to stdout only."From
references/08-openclaw-one-shot.md:36-37:text 3. After signup, set the `sk_live_...` API key and all six env vars in OpenClaw under `skills.entries.powerloom-bds-univ3.env.*`: `POWERLOOM_EVM_PRIVATE_KEY` (from input a), `POWERLOOM_EVM_RPC_URL`, `POWERLOOM_EVM_CHAIN_ID`, `POWERLOOM_PLAN_ID`, `POWERLOOM_TOKEN_SYMBOL`, `POWERLOOM_API_KEY` (from `signup-pay.mjs` claim output).From
references/08-openclaw-one-shot.md:52-60:text - Message: a shell command that `cd`s to the skill dir, sets env inline, then runs `node scripts/whale-cron.mjs`. Required env in the cron message: - `POWERLOOM_API_KEY=<value from signup-pay.mjs claim output>` - `POWERLOOM_BDS_MCP_CALL_TIMEOUT_MS=120000` - `WHALE_CRON_THRESHOLD=10000` (default; only override if I asked for a different threshold) - Telegram env in the cron message β **only** if input (b) yielded both values: - `POWERLOOM_TELEGRAM_BOT_TOKEN=<value from input (b)>` - `POWERLOOM_TELEGRAM_CHAT_ID=<value from input (b)>`From `reference ...[truncated 4488 chars]
- Remediation
View remediation
Remediation Suggestions
-
Do not request raw private keys through chat.
- Use a hardware wallet, external signer, WalletConnect-style approval, or an encrypted keystore with an interactive password.
- Have the user execute the payment command locally when a secure external signer cannot be integrated.
-
Do not persist the wallet private key in Skill configuration.
- Supply it only to the single payment process through a protected secret channel.
- Remove it immediately after the transaction completes.
- Ensure recurring monitoring jobs cannot read wallet credentials.
-
Use a secret manager for recurring credentials.
- Store Powerloom and Telegram credentials in a platform-supported encrypted secret store.
- Have cron jobs reference secret identifiers or securely injected environment variables rather than embedding literal values in cron command text.
-
Minimize exposure in agent context and logs.
- Never repeat secrets in summaries, tool output, exception messages, or generated shell commands.
- Add automatic redaction for
sk_live_*, EVM private-key patterns, Telegram bot tokens, and configured secret values.
-
Apply least privilege and lifecycle controls.
- Use a dedicated burner wallet with only the exact required funds.
- Rotate API and Telegram credentials after suspected disclosure.
- Document deletion and rotation steps after wallet-funded onboarding.
-
Harden configuration storage.
- Restrict configuration and scheduler-definition permissions to the service account.
- Exclude secret-bearing files from backups and diagnostic bundles, or encrypt them using separately managed keys.
- Prevent administrative interfaces from rendering literal secret values.
-
Revise both one-shot runbooks.
- Replace instructions to paste credentials into chat with secure secret-entry procedures.
- Remove the instruction to retain
POWERLOOM_EVM_PRIVATE_KEYafter signup. - Replace i ...[truncated 56 chars]
-
