T09 · Insecure Skill Coding Practices
- Location
SKILL.md:25- Finding
Authentication Token Exposed Through Command-Line Arguments and URL Query Strings
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 25-30, 47-53, 63-71, 77-84, and 91-98
Vulnerability Type: Credential exposure through process arguments, request URLs, and logs
Risk Level: MediumThe documented commands expand
BEEMINDER_AUTH_TOKENdirectly into curl command-line arguments. Several commands also transmit the credential as a URL query parameter.bash curl -s "$BASE/goals.json?auth_token=$BEEMINDER_AUTH_TOKEN" | jq '[.[] | {slug, safebuf, baremin, limsum}]' curl -s "$BASE/goals/GOAL.json?auth_token=$BEEMINDER_AUTH_TOKEN" curl -s "$BASE/goals.json?auth_token=$BEEMINDER_AUTH_TOKEN" \ | jq '[.[] | select(.safebuf <= 0)] | sort_by(.losedate) | .[] | {slug, baremin, limsum}' curl -s "$BASE/goals.json?auth_token=$BEEMINDER_AUTH_TOKEN" \ | jq --arg cutoff "$(date -d '+2 days' +%s)" \ '[.[] | select(.losedate <= ($cutoff | tonumber))] | sort_by(.losedate) | .[] | {slug, baremin, limsum}' curl -s -X POST "$BASE/goals/GOAL/datapoints.json" \ -d "auth_token=$BEEMINDER_AUTH_TOKEN" \ -d "value=N" \ -d "comment=TEXT" curl -s "$BASE/goals/GOAL/datapoints.json?auth_token=$BEEMINDER_AUTH_TOKEN&count=5&sort=daystamp" curl -s -X PUT "$BASE/goals/GOAL/datapoints/DATAPOINT_ID.json" \ -d "auth_token=$BEEMINDER_AUTH_TOKEN" \ -d "value=N" \ -d "comment=TEXT" curl -s -X DELETE "$BASE/goals/GOAL/datapoints/DATAPOINT_ID.json?auth_token=$BEEMINDER_AUTH_TOKEN" curl -s "$BASE/goals.json?auth_token=$BEEMINDER_AUTH_TOKEN" \ | jq '[.[] | select(.safebuf <= 1)] | sort_by(.safebuf) | .[] | {slug, baremin, limsum, safebuf}' curl -s -X POST "$BASE/goals/GOAL/datapoints.json" \ -d "auth_token=$BEEMINDER_AUTH_TOKEN" \ -d "value=1" \ -d "comment=done" \ -d "requestid=GOAL-$(date +%Y%m%d)"Technical Analysis
Shell expansion inserts the secret into curl's argument vector. Depending on operating-system controls and execution environmen ...[truncated 2209 chars]
- Remediation
View remediation
Remediation Suggestions
- Use Beeminder's supported authorization-header mechanism, if available, instead of query-string authentication.
- Avoid expanding credentials directly into command-line arguments. Load secrets through a permission-restricted curl configuration file, protected credential provider, or other mechanism that does not expose them in the process argument vector.
- If the API only supports form or query authentication, generate a temporary curl configuration with restrictive permissions such as mode
0600, remove it immediately after use, and ensure cleanup occurs on failure. - Disable shell tracing around credential-bearing operations and configure CI, agent, and observability systems to redact
auth_tokenvalues. - Ensure request logging excludes or sanitizes query strings and authentication fields.
- Use short-lived or narrowly scoped credentials if supported, rotate any token suspected of exposure, and revoke obsolete tokens.
- Make mutating operations explicit and confirmation-gated, especially datapoint update and deletion requests.
