T09 · Insecure Skill Coding Practices
- Location
SKILL.md:286- Finding
API Key Exposed Through Command-Line Process Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:286andREADME.md:232
Vulnerability Type: Credential exposure through process arguments
Risk Level: MediumVulnerable Code
SKILL.md:286:bash curl -H "Authorization: Bearer $MUREKA_API_KEY" https://api.mureka.ai/v1/account/billingThe same command is duplicated at
README.md:232.Technical Analysis
The shell expands
MUREKA_API_KEYbefore startingcurl. The resulting bearer token is therefore supplied as part of the process argument vector. Depending on operating-system policy and local monitoring configuration, command-line arguments can be observed through process-inspection utilities, process accounting, audit systems, diagnostic tooling, or telemetry agents.Although transmitting the API key to the fixed Mureka HTTPS endpoint is required for authenticated API access, exposing the expanded credential in process arguments is not required. The Python client avoids this particular issue by reading the key from the environment and constructing the header inside the process.
Attack Path
- An authenticated local attacker, monitoring service, or other process with sufficient process-inspection privileges watches newly created process arguments.
- The user follows the documented billing-check command.
- The shell expands
$MUREKA_API_KEYinto thecurlargument containing the authorization header. - The observer captures the bearer token while the process is running or from process-accounting records.
- The captured token is replayed against the Mureka API.
Impact Assessment
A successful attacker obtains the privileges associated with the compromised Mureka API key. This may permit unauthorized music-generation requests, file uploads, access to account-scoped API resources, consumption of paid credits, and resulting account charges. The exact scope depends on the permissions implemented by the Mureka account and API.
...[truncated 196 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the documented command that expands the API key directly into a command-line argument.
- Add a billing-status operation to
scripts/mureka.pyso the credential is read fromMUREKA_API_KEYand the authorization header is constructed inside the Python process. - If
curlmust be supported, provide the authorization header through a permission-restricted configuration or standard-input mechanism that does not expose the token in the argument vector. - Ensure temporary credential-bearing files, if used, are created with owner-only permissions and deleted immediately after use.
- Recommend rotating the API key if it has previously been used in environments with untrusted local users, process accounting, or command-line telemetry.
- Apply the corrected guidance consistently to both
SKILL.mdandREADME.md.
