T09 · Insecure Skill Coding Practices
- Location
SKILL.md:109- Finding
Bearer API Key Transmitted over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:109-111, 152-153, 193, 201;scripts/search.sh:26, 39-43
Vulnerability Type: Plaintext transmission of sensitive credentials
Risk Level: HighVulnerable Code
SKILL.md:109-111:markdown | North China 2-Beijing (华北 2-北京) | `http://default-21rb.platform-cn-beijing.opensearch.aliyuncs.com` | | East China 1-Hangzhou (华东 1-杭州) | `http://default-21rb.platform-cn-hangzhou.opensearch.aliyuncs.com` | | South China 1-Shenzhen (华南 1-深圳) | `http://default-21rb.platform-cn-shenzhen.opensearch.aliyuncs.com` |scripts/search.sh:26, 39-43:bash URL="${BASE_URL}/v3/openapi/workspaces/${WORKSPACE}/web-search/${SERVICE_ID}" # Make request curl -s -X POST "$URL" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $API_KEY" \ -d "$BODY"Technical Analysis
The documented service addresses use the unencrypted
http://scheme. The script directly appends the API path to the configured address and transmitsALIYUN_SEARCH_API_KEYin an HTTPAuthorization: Bearerheader.HTTP does not provide transport confidentiality, server authentication, or integrity protection. An actor capable of monitoring or modifying the network path can read the API key and query contents or alter the request and response. The script does not reject plaintext URLs or require successful TLS verification.
Attack Path
- A user follows the supplied documentation and configures an
http://Aliyun service address. - The user invokes
scripts/search.shwith a search query. - The script places the API key in the bearer authorization header.
curltransmits the header, query, and response over plaintext HTTP.- A network-positioned attacker captures the request and extracts the API key.
- The attacker reuses the captured key against the associated service until it is revoked or expires.
Impact Assessment
A successful ...[truncated 318 chars]
- A user follows the supplied documentation and configures an
- Remediation
View remediation
Remediation Suggestions
- Replace every documented
http://endpoint with the provider's verifiedhttps://endpoint. - Parse
ALIYUN_SEARCH_HOSTand reject any scheme other than HTTPS. - Fail closed when TLS certificate or hostname validation fails.
- Consider enforcing an allowlist of approved Aliyun service domains.
- Disable redirects or ensure credentials cannot be forwarded to a different origin.
- Update all PowerShell, Bash, and JSON configuration examples consistently.
- Rotate any API key that may previously have been transmitted over an untrusted plaintext connection.
- Replace every documented
