T09 · Insecure Skill Coding Practices
- Location
src/lib/config.ts:38- Finding
Wallet Private Key Is Collected Visibly and Stored in Plaintext
- Content
View full analysis
): void { const existing = readConfigFile() ?? {} const merged = { ...existing, ...config } writeFileSync(CONFIG_PATH, JSON.stringify(merged, null, 2) + "\n") } ``` ### Technical Analysis The setup command obtains the wallet private key through an ordinary `readline` question. Standard terminal input remains visible while the user types, allowing the secret to be exposed through shoulder surfing, terminal recording, screen sharing, or captured interactive-session output. The key is subsequently serialized into `config.json` as plaintext. `writeFileSync` is called without an explicit restrictive file mode such as `0o600`, so access depends on the process umask and any permissions already associated with the file. The audited project also did not include a `.gitignore` ent ...[truncated 1330 chars]- Remediation
View remediation
