T09 · Insecure Skill Coding Practices
- Location
scripts/badgerpeek:90- Finding
Honeybadger Authentication Token Can Be Sent to an Arbitrary HTTPS Endpoint
- Content
View full analysis
"$auth_file" if ! status=$(curl \ --config "$auth_file" \ --silent \ --show-error \ --connect-timeout 10 \ --max-time 45 \ --retry 2 \ --retry-delay 1 \ --request GET \ --header 'Accept: application/json' \ --header "User-Agent: ${PROGRAM}/${VERSION}" \ --output "$response_file" \ --write-out '%{http_code}' \ "$url"); then ``` ### Technical Analysis The CLI reads its destination from `HONEYBADGER_API_URL` or the fallback `HONEYBADGER_ENDPOINT`. Its validation only requires an `https://` prefix, or loopback HTTP with an explicit port. It does not restrict the hostname to an official or explicitly trusted Honeybadger origin. The Honeybadger token is then written to a curl configuration as an HTTP Basic authentication username and used for the request. Consequently, an attacker who can influence the process environment can select an attacker-controlled HTTPS origin and cause the CLI ...[truncated 1867 chars]- Remediation
View remediation
