T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:102
- Finding
- API Key Requested Through Conversation Despite Environment-Based Secret Configuration## Vulnerability Details **File Location**: `SKILL.md:102-110` **Vulnerability Type**: Sensitive credential exposure through conversational context **Risk Level**: Medium ### Vulnerable Code ```markdown ## Base URL `https://run.salesblink.io/api/public/v1.0.0` ## Authentication Ask the user for their SALESBLINK_API_KEY: `https://run.salesblink.io/account/integration/api` Pass it in every request as the `Authorization` header (no "Bearer" prefix): **Header:** `Authorization: key-****` ``` ### Technical Analysis The Skill instructs the agent to ask the user for a complete SalesBlink API key. This conflicts with the safer environment-based secret mechanism already declared in `SKILL.md:18-21`, where `SALESBLINK_API_KEY` is configured as the primary environment variable. A credential pasted into a conversation can enter model context, transcripts, application logs, observability systems, support exports, or retained chat history. The masked example does not prevent exposure when the user supplies the real key. Because the same credential authorizes every documented authenticated API operation, its disclosure violates least-exposure principles and creates a high-value credential-handling weakness. Sending the key as an authorization header over HTTPS to the declared SalesBlink API is necessary for the Skill's functionality. The vulnerability is specifically the instruction to acquire the key through chat rather than exclusively through protected runtime secret injection. ### Attack Path 1. The Skill follows `SKILL.md:106` and asks the user to provide `SALESBLINK_API_KEY`. 2. The user pastes the complete key into the conversation. 3. The secret becomes part of conversational context or associated logging and retention systems. 4. An unauthorized person or compromised component with access to those records retrieves the key. 5. The attacker submits the key in the `Authorization` header to the SalesBlink API. 6. ...[truncated 1122 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the instruction to ask users to paste `SALESBLINK_API_KEY` into chat. 2. Retrieve the key exclusively from the protected `SALESBLINK_API_KEY` runtime environment variable already declared in the Skill metadata. 3. If the variable is unavailable, instruct the user to configure it through the host platform's secret-management interface outside the conversation. 4. Never print, echo, summarize, log, or include the key in agent reasoning, tool output, error messages, or generated command examples. 5. Redact `Authorization` headers from HTTP diagnostics and observability data. 6. Avoid command constructions that could expose the key through shell history or process arguments; use an HTTP client's protected header configuration. 7. Document key rotation and revocation procedures for suspected disclosure. 8. Prefer a narrowly scoped API credential if SalesBlink supports scopes, and separate campaign-operation credentials from billing or credential-administration access.
