T09 · Insecure Skill Coding Practices
- Location
scripts/get-access-token.sh:5- Finding
Unrestricted API base URL can redirect credentials and authorization data to an attacker-controlled server
- Content
View full analysis
/dev/null ``` ```bash headers="$(curl -fsS -i \ "$BASE_URL/auth/session" \ -b "$COOKIE_JAR" -c "$COOKIE_JAR" \ "${COMMON_HEADERS[@]}" \ -H 'Content-Type: application/x-www-form-urlencoded' \ -H 'Origin: https://app.ourskylight.com' \ -H 'Referer: https://app.ourskylight.com/auth/session/new' \ --data-urlencode "authenticity_token=$authenticity_token" \ --data-urlencode "email=$SKYLIGHT_EMAIL_VALUE" \ --data-urlencode "password=$SKYLIGHT_PASSWORD_VALUE")" ``` The authorization code is also submitted to an endpoint derived from the same configurable base URL: ```bash at_response="$(curl -fsS "$BASE_URL/oauth/token" \ -H 'content-type: application/x-www-form-urlencoded' \ -H 'origin: https://ourskylight.com' \ -H 'referer: https://ourskylight.com/' \ --data-urlencode 'grant_type=authorization_code' \ --data-urlencode 'client_id=skylight-mobile' \ --data-urlencode 'scope=everything' \ --data-urlencode "skylight_api_client_device_fingerprint=$DEVICE_FINGERPRINT" \ --data-urlencode 'skylight_api_client_device_platform=web' \ --data-urlencode 'skylight_api_client_device_name=unknown' \ --data-urlencode 'skylight_api_client_device_os_version=10.15.7' \ --data-urlencode 'skylight_api_clie ...[truncated 2857 chars]- Remediation
View remediation
