T09 · Insecure Skill Coding Practices
- Location
SKILL.md:21- Finding
Plaintext Collection and Reflection of a Feishu Application Secret
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 21-30, 41-47, and 72-74
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: MediumVulnerable Code Snippet
json "{agentId}": { "appId": "{appId}", "appSecret": "{appSecret}" }The surrounding instructions require the agent to ask the user for the Feishu App Secret and subsequently output the final merged JSON fragment containing that value.
Technical Analysis
The Skill directs users to submit a live Feishu application secret through the conversational interface. It then embeds that value directly into a JSON configuration fragment and instructs the agent to return the merged fragment to the user.
This handling unnecessarily duplicates the secret across several locations:
- The user's original message.
- The model's active context.
- The generated response containing the merged JSON.
- Any conversation history, telemetry, debugging records, or audit logs retained by the hosting platform.
- Any clipboard, ticket, document, or messaging system into which the generated configuration is copied.
Although storing an application secret in the destination configuration may be required by the target application, collecting and reflecting it through a conversational channel expands its exposure surface. The Skill provides no redaction, secure-input mechanism, secret-manager integration, or warning against sharing production credentials.
Attack Path
- A user invokes the Skill to configure a Feishu agent.
- Following the Skill instructions, the agent asks the user to provide the Feishu App Secret.
- The user enters a valid production secret into the conversation.
- The secret is retained in the conversation context and may also be captured by platform logs or telemetry.
- The agent places the same secret into the final merged JSON response, creating another plaintext copy.
- An unauthorized perso ...[truncated 934 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not ask the user to submit the real App Secret through the conversation.
- Generate configuration with a non-secret placeholder, for example:
json "appSecret": "${FEISHU_APP_SECRET}" - Instruct the user to replace the placeholder locally using a protected editor, environment variable, or supported secret-management facility.
- Do not reproduce secret values in final responses, summaries, diagnostics, or error messages.
- Add an explicit warning that production credentials must not be pasted into chat.
- If direct configuration editing is supported, use a secure secret-input mechanism that suppresses display and prevents logging.
- Restrict permissions on
~/.openclaw/openclaw.jsonto the owning user and document that it contains sensitive credentials. - Recommend immediate rotation of any secret previously shared through conversation history or other potentially retained channels.
- Where feasible, use short-lived credentials or a dedicated Feishu application with only the minimum API scopes necessary for the agent.
