T09 · Insecure Skill Coding Practices
- Location
system_prompt.md:7- Finding
API Credential Exposure Through URL Query Parameters
- Content
View full analysis
Vulnerability Details
File Locations:
system_prompt.md:7-10system_prompt.md:65-66openapi.yaml:15-19- The same query parameter is repeated at
openapi.yaml:39-43,openapi.yaml:63-67,openapi.yaml:88-92,openapi.yaml:116-120,openapi.yaml:142-146,openapi.yaml:168-172, andopenapi.yaml:191-195
Vulnerability Type: API credential disclosure through query-string authentication
Risk Level: MediumVulnerable Code
From
system_prompt.md:7-10:markdown ## 🔐 Authentication (CRITICAL) **At the very beginning of the conversation**, you MUST verify if you have the user's **Humanod API Key**. - If the user hasn't provided it, ask: *"Hello! To manage your Humanod missions, please provide your API Key (from https://www.humanod.app/developer/keys)."* - Once you have the key, **ALWAYS** append it as a parameter `?api_key=YOUR_KEY` (or in the `api_key` param field) for **EVERY** API call you make.From
system_prompt.md:65-66:markdown 2. User: "sk-12345" 3. Call `POST /tasks?api_key=sk-12345`...From
openapi.yaml:15-19:yaml parameters: - name: api_key in: query required: false schema: type: stringThe OpenAPI document repeats this query-string credential parameter for every operation even though it also defines and applies an HTTP bearer authentication scheme.
Technical Analysis
The system prompt requires the agent to append the Humanod API key to every request URL. Credentials placed in query strings can be retained by reverse-proxy access logs, API server logs, browser history, debugging output, observability platforms, network traces, and error-reporting systems. They can also be exposed when complete request URLs are copied or shared.
This is unnecessary because
openapi.yamlalready definesBearerAuthand applies it globally. An authorization header limits routine credential exposure compared with embedding the credential in the URL.T ...[truncated 1830 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the instruction requiring
?api_key=YOUR_KEYfromsystem_prompt.md. - Remove the credential-bearing example at
system_prompt.md:65-66. - Delete the
api_keyquery parameter from every operation inopenapi.yaml. - Use only the existing bearer authentication scheme:
http Authorization: Bearer REDACTED_API_KEY- Store and inject the API key through the agent platform's protected credential mechanism instead of requesting it in ordinary conversation.
- Ensure authorization headers and secret values are redacted from application logs, telemetry, traces, and error reports.
- Configure gateways and servers not to accept credentials in query parameters, preventing accidental fallback to the insecure mechanism.
- Rotate any Humanod API key that has previously been transmitted in a URL.
- Review historical proxy, server, monitoring, and conversation logs for exposed keys and restrict or purge those records where appropriate.
- Preserve the existing explicit-confirmation requirement for financially consequential operations, but enforce authorization and ownership checks independently on the server.
- Remove the instruction requiring
