T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:42
- Finding
- Overbroad Disclosure of Sensitive OpenClaw Configuration## Vulnerability Details **File Location**: `SKILL.md`, lines 42-46 **Vulnerability Type**: Sensitive configuration exposure through an overbroad diagnostic command **Risk Level**: Medium ### Vulnerable Code ```bash cat ~/.openclaw/openclaw.json | grep -A 20 '"feishu"' ``` ### Technical Analysis The documented troubleshooting command reads the user's complete private OpenClaw configuration file and prints the matched Feishu section together with the following 20 lines. The stated objective is only to identify account keys for use with the `--account` argument, but this command may display entire account objects and adjacent configuration fields. Depending on the configuration schema and field ordering, the output could include application secrets, access tokens, webhook credentials, account metadata, or unrelated sensitive settings. The skill does not contain code that transmits this information externally; however, command output may become visible in terminal logs, agent tool results, conversation context, monitoring systems, or retained execution records. This violates data-minimization principles because the command exposes substantially more configuration data than is needed to complete the documented task. ### Attack Path 1. A user invokes the skill to configure or troubleshoot Feishu cron delivery. 2. The agent or user follows the documented account-discovery procedure. 3. The command reads `~/.openclaw/openclaw.json`. 4. `grep -A 20` prints the Feishu match and up to 20 subsequent lines without filtering sensitive values. 5. Any credentials within that output become available to terminal history, agent context, logs, or other parties able to observe those records. 6. If valid credentials are disclosed, a party with access to the output could attempt to use them within the permissions assigned to the affected Feishu or OpenClaw account. ### Impact Assessment The direct impact is local disclosure of sensiti ...[truncated 610 chars]
- Remediation
- ## Remediation Suggestions Replace the overbroad text search with a structured query that returns only account identifiers and never displays account values. For example, after confirming the actual configuration schema: ```bash jq -r '.channels.feishu.accounts | keys[]' ~/.openclaw/openclaw.json ``` Additional hardening measures: 1. Verify the correct JSON path for the supported OpenClaw configuration schema before documenting the command. 2. Return only the keys under the Feishu `accounts` object. 3. Do not print complete account objects, tokens, secrets, webhook URLs, or neighboring configuration sections. 4. Avoid `cat | grep` pipelines for structured configuration files. 5. Instruct users not to paste configuration contents into chats, issue trackers, or shared logs. 6. If sensitive output has already been exposed, remove it from retained logs and rotate any credentials that appeared in the output. 7. Ensure `~/.openclaw/openclaw.json` has restrictive filesystem permissions, such as owner-only read and write access where supported.
