T09 · Insecure Skill Coding Practices
- Location
scripts/check_models.sh:37- Finding
API Credentials Can Be Transmitted to Arbitrary or Unencrypted Provider Endpoints
- Content
View full analysis
/dev/null) ``` For Anthropic-compatible providers, the API key is sent to the configured endpoint: ```bash if [[ "$API_TYPE" == *"anthropic"* ]]; then # Build URL: append /v1/messages if not already in the path if [[ "$BASEURL" == *"/v1/messages"* ]]; then FULL_URL="$BASEURL" else FULL_URL="${BASEURL%/}/v1/messages" fi curl -s -X POST "$FULL_URL" \ -H "Content-Type: application/json" \ -H "x-api-key: ${APIKEY}" \ -H "anthropic-version: 2023-06-01" \ -d "{\"model\":\"${MODEL_ID}\",\"max_tokens\":512,\"messages\":[{\"role\":\"user\",\"content\":\"reply ok\"}]}" \ --connect-timeout 10 --max-time 60 \ -o "$TMPRESP" 2>/dev/null ``` For OpenAI-c ...[truncated 4701 chars]- Remediation
View remediation
