T09 · Insecure Skill Coding Practices
- Location
SKILL.md:51- Finding
WeCom secret exposed through configuration output and command-line arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:51andSKILL.md:189
Vulnerability Type: Sensitive credential exposure
Risk Level: HighVulnerable Code
bash openclaw config get channels.wecom 2>&1bash openclaw config set channels.wecom.secret <YOUR_SECRET>Technical Analysis
The diagnostic command retrieves the complete
channels.wecomconfiguration. Based on the documented configuration structure, this object contains the WeCom botsecret. If the CLI does not redact sensitive values, the secret can be written to the terminal, captured in Agent context, or retained in conversation and execution logs.The repair command also asks the operator to supply the secret as a command-line argument. After placeholder substitution, the plaintext secret may be retained in shell history, process telemetry, audit logs, terminal recordings, or diagnostic output. On systems where process arguments are visible to other local users, it may also be exposed during command execution.
Attack Path
- An operator invokes the skill to diagnose a WeCom connection problem.
- The Agent executes
openclaw config get channels.wecom. - The CLI returns the complete configuration, potentially including the plaintext
secret. - The output is captured in the Agent transcript, terminal logs, or other observability systems.
- Alternatively, during repair, the operator replaces
<YOUR_SECRET>with the real credential. - The resulting command is stored in shell history or captured through process and command auditing.
- A party with access to those records obtains the secret and can attempt to authenticate as the associated WeCom bot.
Impact Assessment
Disclosure may allow unauthorized use or impersonation of the configured WeCom bot, subject to the permissions and capabilities assigned to that bot. The exposure scope includes local shell history, Agent transcripts, ex ...[truncated 224 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not retrieve the entire
channels.wecomobject during routine diagnostics. - Query only non-sensitive fields, such as
enabled, or use a command that reports whether a secret is configured without returning its value. - Explicitly redact values under keys such as
secret,token, andcredentialbefore displaying or retaining command output. - Do not pass the secret directly through command-line arguments.
- Accept secrets through a no-echo interactive prompt, protected standard input, a secret manager, or another mechanism that does not expose them in process arguments.
- Instruct users never to paste real credentials into chat or Agent transcripts.
- Disable shell-history recording for unavoidable sensitive operations and ensure diagnostic logs do not contain configuration secrets.
- Rotate the WeCom secret if the documented commands were previously executed with a real credential and the output or shell history may have been retained.
- Do not retrieve the entire
