T09 · Insecure Skill Coding Practices
- Location
SKILL.md:528- Finding
Full Configuration Output Can Expose Stored Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 528-540
Vulnerability Type: Sensitive information exposure through excessive file output
Risk Level: HighVulnerable Code
bash CONFIG_PATHS=( "$HOME/.clawdbot/clawdbot.json" "$HOME/.clawdbot/config.yaml" "$HOME/.clawdbot/.clawdbotrc" ".clawdbotrc" ) for path in "${CONFIG_PATHS[@]}"; do if [ -f "$path" ]; then echo "Found config: $path" cat "$path" break fi doneTechnical Analysis
The audit procedure uses
catto copy the first discovered configuration file in its entirety into command output. Elsewhere, the skill explicitly states that Telegram, Discord, and Slack credentials may be stored in~/.clawdbot/clawdbot.jsonor environment variables (SKILL.md:145-147).A security audit only needs selected configuration properties, such as gateway binding, authentication presence, access-control policies, and logging settings. Printing the complete file exceeds that minimum requirement. If the file contains API tokens, channel credentials, webhook secrets, browser-control tokens, or other sensitive values, those values enter the agent's context and may also be retained in tool logs, session transcripts, monitoring systems, or generated reports.
The credential paths flagged at
SKILL.md:144,SKILL.md:148, andSKILL.md:150are documented for permission inspection and are not themselves read by the supplied commands. The confirmed issue is the unrestricted output of general configuration files that may contain credentials.Attack Path
- A Clawdbot configuration file contains an API token, channel credential, webhook secret, or similar sensitive value.
- A user or agent invokes the documented security-audit workflow.
- The workflow discovers the configuration file and executes
cat "$path". - The complete file, including secret values, is emitted into tool output.
- The values may b ...[truncated 993 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all uses of
catthat print complete configuration files. - Parse only an explicit allowlist of non-sensitive properties required by each audit check.
- Report whether authentication is configured without outputting its value.
- Redact values for keys matching patterns such as
token,secret,password,credential,apiKey,auth,cookie, andwebhook. - Keep credential-file checks limited to metadata such as ownership, mode, type, and symlink status.
- Prevent raw tool output from being copied into reports or persistent transcripts.
- Add tests containing synthetic secrets and verify that they never appear in audit output.
- Prefer a structured parser over
grepor line-oriented redaction so nested JSON and YAML values are handled safely.
A safer audit should produce results such as
gateway authentication: configuredandconfiguration mode: 600, without exposing the underlying credential value.- Remove all uses of
