T09 · Insecure Skill Coding Practices
- Location
SKILL.md:26- Finding
API bearer token exposed through command-line arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:26-28, 65-79, 88-89, 144-149, 169-170;references/api-examples.md:5-6, 13-14, 21-22
Vulnerability Type: Bearer credential exposure through process arguments
Risk Level: MediumVulnerable Code
SKILL.md:26-28:bash curl https://api.clawver.store/v1/stores/me/analytics \ -H "Authorization: Bearer $CLAW_API_KEY"SKILL.md:65-79:bash # Last 7 days curl "https://api.clawver.store/v1/stores/me/analytics?period=7d" \ -H "Authorization: Bearer $CLAW_API_KEY" # Last 30 days (default) curl "https://api.clawver.store/v1/stores/me/analytics?period=30d" \ -H "Authorization: Bearer $CLAW_API_KEY" # Last 90 days curl "https://api.clawver.store/v1/stores/me/analytics?period=90d" \ -H "Authorization: Bearer $CLAW_API_KEY" # All time curl "https://api.clawver.store/v1/stores/me/analytics?period=all" \ -H "Authorization: Bearer $CLAW_API_KEY"references/api-examples.md:5-6:bash curl "https://api.clawver.store/v1/stores/me/analytics?period=30d" \ -H "Authorization: Bearer $CLAW_API_KEY"Technical Analysis
The shell expands
$CLAW_API_KEYbefore startingcurl. Consequently, the resulting plaintext authorization header is supplied as part of thecurlargument vector. On systems where process arguments are visible, another local account or process may inspect process listings or/procentries while the request is running and recover the bearer token.The examples consistently use HTTPS, so this issue does not imply that the credential is exposed over the network in plaintext. The weakness is local disclosure through the process interface. Exploitability therefore depends on operating-system process visibility, account isolation, and the attacker's ability to observe processes at the time a request is made.
Attack Path
- A user or automated agent runs one of the documented
curlco ...[truncated 1173 chars]
- A user or automated agent runs one of the documented
- Remediation
View remediation
Remediation Suggestions
- Avoid passing expanded secrets directly in command-line arguments.
- Provide the authorization header through a temporary or persistent curl configuration file protected with owner-only permissions, such as mode
0600, and delete temporary files immediately after use. - If the execution environment supports it, use a credential-aware API client that constructs authorization headers internally without exposing their values in process arguments.
- Ensure API tokens use the minimum permissions required for read-only analytics operations.
- Restrict process visibility and prevent untrusted users or workloads from sharing the same execution account.
- Never enable shell tracing while handling the token, because tracing can expose the expanded credential in logs.
- Redact authorization headers from application, proxy, debugging, and audit logs.
- Rotate any token suspected of process-list exposure and monitor API access logs for unauthorized reuse.
- Update every affected example in both
SKILL.mdandreferences/api-examples.mdso users are not directed toward the insecure invocation pattern.
