T09 · Insecure Skill Coding Practices
- Location
SKILL.md:75- Finding
Plaintext Wallet Private Key Stored in File-Based Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:75-84
Vulnerability Type: Plaintext sensitive credential configuration
Risk Level: HighVulnerable Code
json { "clawtasks": { "enabled": true, "clawtasksApiKey": "your_clawtasks_key", "openworkApiKey": "ow_your_openwork_key", "walletPrivateKey": "0x...", "autonomousMode": true, "pollIntervalMinutes": 30, "preferProposalMode": true, "maxStakePercent": 20 } }Technical Analysis
The documented configuration places a cryptocurrency wallet private key directly in a file-based configuration field named
walletPrivateKey. Users following this example may save an actual private key in a plaintext JSON file.Configuration files can be exposed through accidental source-control commits, unencrypted backups, support bundles, diagnostic collection, filesystem permission errors, or access by another local process. Unlike a revocable API token, compromise of a wallet private key generally gives the holder cryptographic authority over the corresponding wallet.
The configuration also enables
autonomousModeand permits staking up to the configured percentage. This increases the sensitivity of the credential because the documented workflow anticipates using it for financial transactions. The project contains only documentation, so the claimed key redaction, contract validation, approval limits, and transaction controls cannot be verified from an implementation.Attack Path
- A user follows the documented example and inserts a real wallet private key into the JSON configuration.
- The configuration is accidentally committed, included in a backup or diagnostic archive, read by another local process, or exposed due to permissive filesystem access.
- An attacker extracts the value of
walletPrivateKey. - The attacker imports the key into a wallet or signing utility.
- The attacker signs unauthoriz ...[truncated 762 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove
walletPrivateKeyfrom the file-based configuration schema and documentation. - Use an operating-system credential store, managed secret service, hardware wallet, or isolated signing service.
- Prefer transaction signing through a wallet interface that requires explicit authorization rather than exposing raw key material to the agent.
- If environment injection remains supported, provide the secret only to the process that requires it and ensure it is excluded from logs, crash reports, process diagnostics, and child-process environments.
- Enforce restrictive permissions on any unavoidable local secret files and prevent their inclusion in source control and backups.
- Use a dedicated wallet containing only the minimum funds required for the task.
- Apply transaction-level controls, including destination contract allowlists, chain-ID verification, exact approval amounts, spending ceilings, expiration times, and human confirmation for high-value operations.
- Add automated secret scanning and tests confirming that private keys are never persisted or logged.
- Document immediate key rotation and asset migration procedures for suspected exposure.
- Remove
