T09 · Insecure Skill Coding Practices
- Location
SKILL.md:72- Finding
API Token Exposure Through Agent Conversation Setup Instructions
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:72-75
Vulnerability Type: Plaintext credential exposure
Risk Level: MediumVulnerable Snippet
text Paste this to your OpenClaw agent and it will install the skill and configure the token for you: > Install this skill: https://clawhub.ai/roger52027/ecommerce-website-data > My APEX_TOKEN is: your_token_hereThe same unsafe guidance is duplicated in
README.md:20-24.Technical Analysis
The setup instructions explicitly encourage users to submit a live
APEX_TOKENthrough an agent conversation. This unnecessarily places the secret in model context and may expose it to conversation history, application logs, telemetry, debugging records, prompt transcripts, or tools and integrations that can access the session.The skill itself supports safer credential mechanisms, including the
APEX_TOKENenvironment variable and OpenClaw configuration. Therefore, transmitting the token in natural-language chat is not required for the declared e-commerce API functionality and violates least-exposure principles for credentials.The bundled client reads the token from the environment and sends it over HTTPS to the fixed ECcompass API host. That behavior is declared and necessary. The vulnerability is specifically the documentation’s recommendation to disclose the credential in chat, not the authenticated API request.
Attack Path
- A user follows the documented “Quickest Way” setup.
- The user replaces
your_token_herewith a validAPEX_TOKENand submits it to the agent. - The plaintext token becomes part of the conversation context and may be retained in chat history, logs, telemetry, or debugging systems.
- An unauthorized party, compromised integration, or tool with access to those records extracts the token.
- The attacker replays the token in the
APEX_TOKENHTTP header againsthttps://api.eccompass.ai/public/api/v1/. - The attacker ...[truncated 716 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all instructions asking users to paste
APEX_TOKENinto an agent conversation, including the duplicate guidance inREADME.md:20-24. - Require credential entry through a dedicated secret manager, protected credential prompt, or configuration interface that prevents the value from entering model context.
- Retain environment-based configuration, but advise users to set the variable outside recorded shell history where possible.
- Store persistent credentials using restrictive file permissions and a secret-reference mechanism rather than embedding plaintext directly in general configuration.
- Add an explicit warning such as: “Never paste API tokens into chat, prompts, logs, source files, or support messages.”
- Ensure logs and error messages never include request headers or token values.
- Support token revocation, rotation, expiration, and least-privilege scopes. Advise users who followed the prior instructions to revoke and replace exposed tokens.
- Consider automated secret redaction for conversation transcripts and telemetry as defense in depth.
- Remove all instructions asking users to paste
