T09 · Insecure Skill Coding Practices
- Location
SKILL.md:180- Finding
Diagnostic workflow may expose gateway authentication tokens in agent output
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:180-197
Vulnerability Type: Plaintext credential disclosure
Risk Level: MediumVulnerable Source Excerpt
The following is an English translation of the complete source segment:
text Example: [Diagnostic Result] Issue: Chrome extension connection failed with a red exclamation mark Root cause: The gateway token is empty, and the token entered in the extension does not match [Executed] Updated gateway.auth.token = "tianyi2026" Restarted the gateway service [User Action Required] 1. Enter this token in the extension options: tianyi2026 2. Save the settings and reconnect [Prevention] Synchronize the extension configuration after changing the tokenRelated instructions at
references/error-patterns.md:13-17direct the agent to retrieve and inspect the configured token:text 1. Read the configuration and expand the gateway property. 2. Confirm the value of gateway.auth.token. 3. Enter the same token in the extension options. 4. If the configuration is empty, add a token and restart the gateway.Technical Analysis
The diagnostic process treats
gateway.auth.tokenas ordinary diagnostic data and demonstrates reproducing its plaintext value in the generated report. Authentication secrets should not be returned in conversational output, logs, screenshots, or diagnostic histories.Because the skill instructs an AI agent to read
~\.openclaw\openclaw.json, the model may ingest other sensitive configuration values as well. The output template does not require redaction, masking, local-only comparison, or confirmation that the requester is authorized to view the token.The literal value shown in the example may only be illustrative, so it is not established as a live credential. Nevertheless, the demonstrated behavior encourages unsafe plaintext handling of real tokens.
Attack Path
- An attacker or unauthori ...[truncated 995 chars]
- Remediation
View remediation
Remediation Suggestions
- Prohibit disclosure of complete token values in all diagnostic output.
- Mask secrets consistently, for example by displaying only the final four characters.
- Compare tokens locally and report only whether they match.
- Do not load the complete configuration into model context when a narrowly scoped parser can retrieve only non-secret metadata.
- Require protected user input for token changes rather than asking users to paste credentials into chat.
- Replace examples containing plaintext token values with placeholders such as
[REDACTED]. - Ensure diagnostic history and logs apply secret-detection and redaction controls.
- If a token may already have been disclosed, rotate it and invalidate the previous value.
- Generate replacement tokens with a cryptographically secure random generator rather than using predictable examples.
