T09 · Insecure Skill Coding Practices
- Location
SKILL.md:106- Finding
Credentials May Be Transmitted to an Insufficiently Validated Endpoint
- Content
View full analysis
" CLIENT_ID="" CLIENT_SECRET="" TOKEN_RESPONSE="$( curl -fsS "$TOKEN_URL" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=$CLIENT_ID" \ -d "client_secret=$CLIENT_SECRET" )" ACCESS_TOKEN="$(printf '%s' "$TOKEN_RESPONSE" | jq -r '.access_token')" test -n "$ACCESS_TOKEN" && test "$ACCESS_TOKEN" != "null" ``` ### Technical Analysis The Skill permits the API origin to be supplied by the operator and instructs the agent to trust the `token_url` returned by the registration service. It does not require the agent to validate that the selected API origin and returned token endpoint: - Use HTTPS. - Belong to an explicitly trusted hostname. - Use the expected port. - Do not contain embedded user information. - Match an approved deployment or endpoint allowlist. The token exchange sends the OAuth `client_secret` directly to the returned `token_url`. Authenticated API operations likewise send bearer tokens to the selected site origin. Although transmitting credentials to a legitimate OAuth endpoint is necessary for the declared functionality, allowing these credential destinations without explicit endpoint validation exceeds a secure minimum-trust model. The Skill contains strong instructions not to print or share credentials, but those controls do not protect against credentials being submitted directly to a malicious or incorrectly configured endpoint. ### Attack Path 1. An attacker persuades the operator or agent to use an attacker-controlled site orig ...[truncated 1505 chars]- Remediation
View remediation
