T09 · Insecure Skill Coding Practices
- Location
SKILL.md:136- Finding
Hardcoded Feishu Application Secret and Insecure Temporary Credential Storage
- Content
View full analysis
'; // e.g. cli_a931e5b57ff89cc0 const APP_SECRET = ''; // from openclaw.json const IMAGE_PATH = '/absolute/path/to/image.jpg'; // must be absolute const RECEIVE_ID = ''; // e.g. ou_71c53ff7589f8527a27c2a057b96b6d7 const RECEIVE_ID_TYPE = 'open_id'; // or 'chat_id', 'user_id' // =================================== ``` The documentation then discloses a concrete Feishu application credential: ```markdown Read `openclaw.json` → `channels.feishu.accounts.` for `appId` and `appSecret`. For the CTO agent, these are already known: - `accountId`: `cto` - `appId`: `cli_a931e5b57ff89cc0` - `appSecret`: `Q3c78ab1ORB7xOj0JtRz2d1GwQtzZcZH` ``` The cron integration writes the generated script, including the embedded credential, into a shared temporary directory: ```javascript const { writeFileSync, unlinkSync } = require('fs'); const { execSync } = require('child_process'); const path = '/tmp/feishu-send-' + Date.now() + '.js'; const script = `/* filled template */`; writeFileSync(path, script); execSync(`node ${path}`); unlinkSync(path); ``` ### Technical Analysis The Skill contains a credential represented as the active application secret for the `cto` Feishu account. Secrets committed to documentation or source-controlled artifacts must be considered compromised because every person or system that can read the package can recover and reuse them independently of the intended workflow. The documented execution process introduces a second exposure path. It directs the agen ...[truncated 2886 chars]- Remediation
View remediation
