T09 · Insecure Skill Coding Practices
- Location
SKILL.md:591- Finding
API Credentials Exposed Through Shell Scripts, Command Arguments, and Command History
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:591-604,SKILL.md:617-617,SKILL.md:666-670,SKILL.md:679-683, andREADME.md:30-37
Vulnerability Type: Insecure credential handling
Risk Level: LowVulnerable Code
SKILL.md:591-604:bash API_KEY="YOUR_API_KEY" DATE="2024-01-15" # 1. Get completed activities ACTIVITIES=$(curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \ "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/activities?oldest=$DATE&newest=$DATE&fields=id,name,type,distance,icu_training_load") # 2. Get planned workouts for today EVENTS=$(curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \ "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/events?oldest=$DATE&newest=$DATE&category=WORKOUT") # 3. Get wellness data WELLNESS=$(curl -s -H "Authorization: ApiKey $ATHLETE_ID:$API_KEY" \ "https://intervals.icu/api/v1/athlete/$ATHLETE_ID/wellness/$DATE")README.md:30-37:bash curl -H "Authorization: ApiKey YOUR_ATHLETE_ID:YOUR_API_KEY" \ https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_ID **Bearer Token (OAuth):** ```bash curl -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ https://intervals.icu/api/v1/athlete/YOUR_ATHLETE_IDTechnical Analysis
The documentation instructs users to place an Intervals.icu API key or OAuth bearer token directly in shell commands or assign it as plaintext in a shell script. When the command is executed, the expanded
Authorizationheader may be exposed in thecurlprocess arguments to local process-inspection facilities. If users directly substitute credentials into an interactive command, those credentials can also remain in shell history. Saving the workflow with a real key embeds the credential in a plaintext file.The examples use placeholders rather than actual committed credentials, so the project itself does not disclose a live secret. The vulnerability arises when use ...[truncated 1497 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not instruct users to paste production secrets directly into interactive commands or source-controlled scripts.
- Retrieve credentials at runtime from a dedicated secret manager, operating-system keychain, or permission-restricted configuration file.
- If environment variables are demonstrated, explain that they can still leak through process environments, diagnostics, child processes, or accidental logging and must not be stored in committed files.
- Prefer a permission-restricted
curlconfiguration file or an equivalent mechanism that prevents the authorization value from appearing directly in command arguments. Ensure the file is readable only by its owner and excluded from version control. - Add explicit warnings against committing credentials, sharing terminal transcripts, enabling shell tracing with secrets, or leaving real keys in shell history.
- Recommend short-lived OAuth tokens and least-privilege scopes where supported.
- Document immediate credential revocation and rotation procedures for suspected exposure.
- Add secret-scanning rules and pre-commit checks to detect accidentally committed API keys or bearer tokens.
