T09 · Insecure Skill Coding Practices
- Location
SKILL.md:90- Finding
Credentials Exposed Through Command-Line Arguments and URL Query Parameters
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 90, 100–101, and 142
Vulnerability Type: Insecure credential handling
Risk Level: MediumVulnerable Code
bash # Basic auth curl -u username:password https://api.example.com # API key in URL curl "https://api.example.com?api_key=your_key" # With proxy authentication curl -x http://proxy:8080 -U user:pass https://api.example.comTechnical Analysis
The documentation encourages users to place authentication credentials directly in command-line arguments and URL query parameters. Users copying these examples and replacing the placeholders with real values may expose credentials through shell history, process inspection, terminal logging, diagnostic output, or monitoring systems.
API keys embedded in URLs have additional exposure paths, including server and reverse-proxy access logs, network monitoring systems, analytics platforms, and copied URLs. URL query parameters can also be propagated through referrer information in some workflows.
The examples contain placeholders rather than actual secrets, so the package itself does not disclose a live credential. The vulnerability arises when users follow the documented pattern with operational credentials.
Attack Path
- A user copies one of the documented commands.
- The user replaces
username:password,user:pass, oryour_keywith a real credential. - The command or URL is recorded in shell history, process telemetry, access logs, proxy logs, or terminal output.
- An attacker or another local, administrative, or logging-system user retrieves the exposed value.
- The attacker authenticates to the affected API or proxy using the recovered credential.
- The attacker obtains the permissions assigned to that credential; this does not independently grant privileges beyond the compromised account or token.
Impact Assessment
Successful exploitation can expose API cre ...[truncated 410 chars]
- Remediation
View remediation
Remediation Suggestions
-
Do not recommend placing literal secrets in command-line arguments or URL query parameters.
-
Prefer an authorization header populated from a protected environment variable:
bash curl -H "Authorization: Bearer ${API_TOKEN}" https://api.example.com -
Explain that environment variables still require careful handling and must not be printed, committed, included in diagnostic output, or exposed to untrusted child processes.
-
For reusable credentials, recommend an appropriately permission-restricted curl configuration file,
.netrcfile, or operating-system secret manager. -
For interactive Basic authentication, omit the password so curl prompts for it:
bash curl -u username https://api.example.com -
Send API keys through service-supported authentication headers instead of query parameters.
-
Add explicit warnings about shell history, process inspection, access logs, proxy logs, and verbose output.
-
Advise users to rotate any credential that has already been entered into a command line or URL and to remove it from retained logs where operationally possible.
-
