T09 · Insecure Skill Coding Practices
- Location
references/platforms.md:10- Finding
Authentication Token Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
references/platforms.md, line 10
Vulnerability Type: Authentication token exposure through process arguments and shell history
Risk Level: MediumComplete Vulnerable Snippet:
sh clawhub login --token <token>Technical Analysis
The documented login command instructs users to provide an authentication token directly as a command-line argument. After substitution of the placeholder with a real token, the secret may be exposed through:
- Shell command-history files
- Process listings or process-monitoring tools while the command runs
- Terminal session recordings
- CI/CD and automation logs
- Diagnostic or audit telemetry that records command arguments
- Scripts into which users copy the example
The project contains no executable code that automatically collects or transmits this token. The weakness is nevertheless actionable because following the documented procedure may disclose a live credential to other local users, administrators, or systems that retain command output and invocation metadata.
Attack Path
- A user replaces
<token>with a valid ClawHub authentication token and executes the documented command. - The shell, operating system, terminal recorder, or automation environment records the command or its process arguments.
- An attacker with access to the affected history file, process metadata, or logs retrieves the plaintext token.
- The attacker submits the stolen token to ClawHub.
- If the token remains valid, the attacker performs actions allowed by its assigned account permissions.
Impact Assessment
Exploitation requires access to local process information, shell history, terminal recordings, or relevant automation logs. A recovered token may allow unauthorized access to the associated ClawHub account and any operations authorized by that token, potentially including publishing or otherwise managing ...[truncated 182 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace the command-line token argument with the official CLI's interactive secret prompt, standard-input mechanism, protected credential store, or another method that does not expose the token in process arguments.
- If the CLI supports environment-based authentication, document use of a short-lived, narrowly scoped environment variable while warning that environment variables may still be visible in some diagnostic and process-inspection contexts.
- Explicitly instruct users not to paste tokens into shell history, committed scripts, shared terminal sessions, or CI/CD logs.
- Recommend short-lived, least-privilege tokens and routine rotation.
- Advise users to revoke and replace any token accidentally exposed.
- Configure automation systems to mask secrets and disable command tracing around authentication operations.
