T09 · Insecure Skill Coding Practices
- Location
SKILL.md:121- Finding
API Token Exposure Through Chat-Based Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:121-128
Additional Location:README.md:177-179
Vulnerability Type: Sensitive credential disclosure through conversation history
Risk Level: MediumVulnerable Documentation:
text Method 1: Automatic configuration Tell Claude your API Token, and Claude will configure it for you: My API Token is: xxxxxThe README additionally states that directly providing the token in chat is supported, although not recommended.
Technical Analysis
The documented automatic configuration process asks the user to submit an API token directly through the AI conversation. API tokens are sensitive authentication credentials and should not be placed in chat transcripts.
Conversation content may be retained in application history, telemetry, debugging records, browser storage, support exports, screenshots, or model-provider logs. Merely advising users that this method is not recommended does not remove the risk because the workflow remains explicitly supported.
The token authenticates requests to
ai.firstindex.cnthrough theX-API-Keyrequest header. A party that recovers the token could therefore submit authenticated financial-data API requests under the affected user's identity.Attack Path
- A user follows the documented automatic configuration procedure.
- The user enters the complete API token into the AI conversation.
- The conversation or related diagnostic data retains the credential.
- An unauthorized party obtains access to the retained transcript, exported conversation, screenshot, telemetry, or support record.
- The party extracts the token and places it in the
X-API-Keyheader. - The party makes authenticated requests to the Betalpha API as the affected user.
Impact Assessment
Successful exploitation exposes the privileges granted to the API token. An attacker could make authenticated requests as the user, consum ...[truncated 336 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove chat-based token configuration from
SKILL.mdandREADME.md. - State unambiguously that users must never submit API tokens through an AI conversation.
- Use a non-echoing local credential prompt or an operating-system credential manager.
- If file storage remains necessary, create the file locally with restrictive permissions before writing the secret.
- Ensure the agent never includes the token in responses, logs, errors, tool-call summaries, or cached endpoint metadata.
- Document a token-revocation and rotation procedure for users who previously submitted a token through chat.
- Prefer short-lived, narrowly scoped tokens where supported by the service.
- Remove chat-based token configuration from
