T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:233
- Finding
- Authentication Token Exposure Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md`, line 233 **Vulnerability Type**: Credential exposure through process arguments and command history **Risk Level**: Medium **Vulnerable code snippet**: ```bash clawhub login --token "<token>" --no-browser ``` ### Technical Analysis The documented login method passes the ClawHub authentication token directly as a command-line argument. After replacing the placeholder with a real credential, the token may become accessible through: - Shell history files - Process-listing and process-monitoring utilities - Terminal session recordings - CI/CD build logs - Command auditing or endpoint-monitoring systems - Wrapper scripts that record invoked arguments The document also states that the authenticated token is retained in a ClawHub configuration file, but it does not prescribe restrictive file permissions or other credential-storage controls. ### Attack Path 1. A user replaces the placeholder with a valid ClawHub publishing token. 2. The user executes the documented login command. 3. The command or its arguments are retained in shell history, process telemetry, terminal logs, or automation output. 4. A local user, monitoring process, or party with access to those logs extracts the token. 5. The attacker authenticates to ClawHub using the recovered credential. 6. The attacker performs any operation permitted by the compromised token, potentially including unauthorized publication of Skill versions. ### Impact Assessment Successful exploitation compromises the ClawHub privileges associated with the exposed token. Depending on the token's permissions, an attacker could impersonate the publisher, publish unauthorized or malicious updates, modify accessible Skill releases, or otherwise operate against resources owned by the affected account. This issue does not directly grant operating-system privilege escalation. Its scope is primarily the ClawHub accou ...[truncated 52 chars]
- Remediation
- ## Remediation Suggestions - Prefer the ClawHub CLI's interactive authentication flow so the secret is not included in the command line. - If supported, provide the token through standard input, an operating-system credential manager, or a protected credential file. - If environment-variable authentication is unavoidable, ensure the variable is masked in CI/CD systems and never printed or passed through verbose tracing. - Explicitly warn users not to place real credentials in shell history, scripts, screenshots, issue reports, or build logs. - Disable command echoing and tracing around authentication operations. - Require restrictive permissions on the ClawHub configuration file, limiting access to the owning user. - Recommend short-lived, narrowly scoped publishing tokens and immediate rotation whenever accidental disclosure is suspected.
