T09 · Insecure Skill Coding Practices
- Location
SKILL.md:225- Finding
API Credential Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:225
Vulnerability Type: API credential exposure through process arguments
Risk Level: MediumVulnerable Code:
bash claw test-skill translatepro --api-key $GOOGLE_TRANSLATE_API_KEYTechnical Analysis
The documented command expands
GOOGLE_TRANSLATE_API_KEYand passes its value through the--api-keycommand-line argument. This places the credential in the process argument vector.Depending on host configuration, command-line arguments may be visible to other authorized local users, process-monitoring utilities, diagnostic systems, audit tooling, crash collectors, or command telemetry. The credential could consequently be retained in logs or observed while the command is running.
Attack Path
- A user exports a valid Google Translation API key as documented.
- The user runs the test command from
SKILL.md:225. - The shell expands
$GOOGLE_TRANSLATE_API_KEYinto its secret value. - The expanded value becomes part of the
clawprocess argument vector. - A local process observer or telemetry collector captures the command line.
- An attacker with access to the captured data extracts and reuses the key against the Google Translation API.
Exploitation requires access to process metadata, monitoring output, or retained command telemetry; the documentation alone does not grant remote access.
Impact Assessment
Exposure may allow unauthorized use of the affected Google Translation API credential within the permissions and quotas assigned to that key. Potential consequences include fraudulent API consumption, quota exhaustion, billing charges, and disruption of legitimate translation workflows.
This issue does not directly provide operating-system privilege escalation or arbitrary code execution. Its scope is limited by the API key's configured service restrictions, application restrictions, quotas, and associated cloud permissi ...[truncated 4 chars]
- Remediation
View remediation
Remediation Suggestions
- Modify the
clawcommand so it readsGOOGLE_TRANSLATE_API_KEYdirectly from the environment without accepting the secret as a command-line argument. - Alternatively, accept the key through standard input or a permission-restricted secret file.
- Avoid printing, logging, or including credential values in diagnostic output.
- Configure Google Cloud API-key restrictions, including limiting the key to the Translation API and applying applicable application restrictions.
- Apply conservative quotas and billing alerts to reduce the impact of credential misuse.
- Rotate the key if the documented command has already been used in an environment where process arguments or command telemetry may have been retained.
- Replace the vulnerable example with a command that does not expand secrets into the argument vector.
- Modify the
