T09 · Insecure Skill Coding Practices
- Location
api-workflows.md:7- Finding
Tripadvisor API Key Exposed in Command-Line URL Query Parameters
- Content
View full analysis
Vulnerability Details
File Location:
api-workflows.md:7,api-workflows.md:15-16,api-workflows.md:35-36, andapi-workflows.md:42-43
Vulnerability Type: API credential exposure through URL query parameters and process arguments
Risk Level: MediumComplete Vulnerable Code
bash curl -sS -i "https://api.tripadvisor.com/api/partner/2.0/location/search?query=Madrid&key=${TRIPADVISOR_API_KEY}" | sed -n '1,20p'bash curl -sS "https://api.tripadvisor.com/api/partner/2.0/location/search?query=Madrid&key=${TRIPADVISOR_API_KEY}" \ | jq '.data[] | {location_id, name, result_type, address_obj}'bash curl -sS "https://api.tripadvisor.com/api/partner/2.0/location/${LOCATION_ID}?key=${TRIPADVISOR_API_KEY}" \ | jq '{location_id, name, rating, num_reviews, ranking_data, price_level, web_url}'bash curl -sS "https://api.tripadvisor.com/api/partner/2.0/location/${LOCATION_ID}/nearby_search?key=${TRIPADVISOR_API_KEY}" \ | jq '.data[] | {location_id, name, rating, num_reviews}'Technical Analysis
The documented commands expand
TRIPADVISOR_API_KEYdirectly into curl's command-line URL. HTTPS protects the request while it is in transit, but it does not prevent local or endpoint-side disclosure of the complete URL.The expanded credential may be exposed through:
- Process-argument inspection or process telemetry.
- Shell tracing and diagnostic output.
- Command auditing and execution records.
- Proxy, gateway, monitoring, or server access logs that record URLs.
- Error reports containing the request URL.
The logging rule in
api-workflows.md:21-29instructs the Agent to redact keys from its own request log. This is a useful safeguard, but it does not prevent the other disclosure channels because the secret is already present in the invoked command's URL.Network access to Tripadvisor is necessary for the Skill's declared search and comparison functionality. The primary issue is therefore not unauthori ...[truncated 1131 chars]
- Remediation
View remediation
Remediation Suggestions
- Use Tripadvisor's supported authentication header rather than a URL query parameter, if the API supports one. For example, use an authorization or API-key header according to the current official API documentation.
- If query-parameter authentication is mandatory, use an HTTP client or protected configuration mechanism that does not expose the expanded secret in process arguments.
- Disable shell tracing and verbose request diagnostics around credential-bearing requests.
- Ensure application, proxy, gateway, monitoring, and server logs redact the
keyparameter. - Avoid printing complete request URLs in error messages or audit records.
- Restrict the API key to the minimum available endpoints, quota, origin, and client permissions.
- Rotate any key that may already have appeared in process telemetry, shell traces, diagnostic records, or URL logs.
- Retain the existing local redaction rule, but clarify that it supplements rather than replaces secure credential transport and handling.
