T09 · Insecure Skill Coding Practices
- Location
scripts/shared/storage/base.js:27- Finding
Unencrypted Private Keys Stored Without Restrictive File Permissions
- Content
View full analysis
entry.alias === args.alias); if (index >= 0) { keys[index].privateKeyHex = args.key; } else { keys.push({ alias: args.alias, privateKeyHex: args.key }); } await this.writeFile(keys); } } ``` ### Technical Analysis The Skill deliberately persists raw private keys in `$HOME/.openclaw/billions/kms.json`. This storage is necessary for persistent identity signing, but the implementation does not apply the minimum protections appropriate for cryptographic key material. `fs.mkdir()` and `fs.writeFile()` are called without explicit modes. Their resulting permissions depend on the process umask. Under a common `022` umask, the directory may be created as `0755` and the temporary key file as `0644`, permitting other local accounts to traverse the dir ...[truncated 1432 chars]- Remediation
View remediation
