T09 · Insecure Skill Coding Practices
- Location
src/commands/setup.ts:18- Finding
Wallet Private Key Is Collected with Echo and Stored in a Plaintext Configuration File
- 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 accepts a raw blockchain private key through a normal `readline` prompt. Standard terminal input remains visible while the user types, allowing shoulder surfing, terminal recording, or session logging to capture the secret. The unencrypted private key is subsequently written into `config.json` at the project root. The write operation does not explicitly request owner-only permissions such as mode `0o600`, inspect the permissions of an existing file, or use an operating-system credential store. Its effective accessibility therefore depends on the process umask and existing ...[truncated 1479 chars]- Remediation
View remediation
