T09 · Insecure Skill Coding Practices
- Location
SKILL.md:57- Finding
API Credential Exposed Through a URL Query Parameter
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 57
Vulnerability Type: API credential exposure through command-line URL
Risk Level: Mediumbash curl -s "https://api.the-odds-api.com/v4/sports/$SPORT_KEY/odds?apiKey=$ODDS_API_KEY&regions=us,eu&markets=h2h,spreads&oddsFormat=american&bookmakers=pinnacle,circasports,bookmaker,betonlineag,draftkings,fanduel" \Technical Analysis
The documented command expands
ODDS_API_KEYdirectly inside a URL passed as a command-line argument tocurl. Although HTTPS protects the URL while it is in transit, it does not prevent exposure at the originating host or terminating infrastructure.The expanded URL can be observable through process inspection while
curlis running. It may also be captured by diagnostic tooling, verbose execution wrappers, HTTP proxies, monitoring systems, crash reports, or server-side request logs. Any component that records the complete request URL would consequently record the credential.Attack Path
- A user configures
ODDS_API_KEYand runs the documented snapshot command. - The shell expands the environment variable into the URL supplied to
curl. - A local process with sufficient process-inspection access, or an authorized intermediary that records request URLs, captures the expanded URL.
- The observer extracts the
apiKeyquery parameter. - The exposed key is reused to make requests against the Odds API until it is revoked or otherwise restricted.
Impact Assessment
Successful exploitation exposes the Odds API credential available to the skill. An attacker could consume the associated API quota, create unexpected service charges where applicable, disrupt legitimate requests through quota exhaustion, and access any API functionality authorized to that key.
This issue does not itself grant operating-system privileges or access beyond the permissions assigned to the exposed API credential. T ...[truncated 146 chars]
- A user configures
- Remediation
View remediation
Remediation Suggestions
- Use a provider-supported authorization header instead of placing the credential in the URL, if the API supports header-based authentication.
- If query-string authentication is mandatory, avoid exposing the expanded URL in process arguments by supplying sensitive curl configuration through a protected file descriptor or a temporary configuration file with mode
0600. - Ensure proxy, application, and API gateway logs redact authentication query parameters.
- Disable shell tracing around credential-bearing commands and avoid verbose curl output in production.
- Restrict the API key by permitted API operations, source IP addresses, quotas, and spending limits where supported.
- Rotate the key if it may previously have been captured in logs or monitoring systems.
