T09 · Insecure Skill Coding Practices
Error
- Location
- publish-manual.txt:23
- Finding
- Plaintext ClawHub Authentication Token Embedded in Documentation<![CDATA[ ## Vulnerability Details **File Location**: `publish-manual.txt:23-26` **Vulnerability Type**: Hardcoded authentication credential **Risk Level**: High ### Vulnerable Code ```text ### 方法1:使用ClawHub网站发布 1. 访问 https://clawhub.com 2. 登录账户(使用token:clh_stbFXRYc9RTR1Ck7e940tJ1e4AN0EU8X5S_MhoC8MFM) 3. 点击 "Add Skill" 或 "Publish Skill" ``` ### Technical Analysis The publishing guide contains a plaintext value explicitly identified as a ClawHub login token. Because this file is distributed with the project, every person or system that can download, clone, inspect, or receive the package can recover the credential. Authentication tokens are bearer credentials: possession may be sufficient to exercise the permissions assigned to the associated account. The exposure is therefore security-relevant even if the token has since expired or been revoked. Removing the token from the current file alone is also insufficient if it remains in repository history, cached packages, release archives, CI logs, or mirrors. ### Attack Path 1. An attacker downloads or obtains a copy of the project package. 2. The attacker opens `publish-manual.txt`. 3. The attacker extracts the plaintext ClawHub token from line 25. 4. The attacker submits the token to the relevant ClawHub authentication interface. 5. If the token remains active, the attacker performs any account or publishing operations authorized by the token. No additional code execution or local-system compromise is required to recover the credential. ### Impact Assessment A successful attacker may obtain the ClawHub privileges granted to the exposed token. Depending on its actual scope, this could include: - Accessing the associated ClawHub account. - Publishing or modifying Skills under the account. - Impersonating the account owner in supported workflows. - Tampering with distributed package content or metadata. - Performing other account operations permitted by the token. The exact privilege scope cannot be esta ...[truncated 127 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Revoke the exposed token immediately through ClawHub. 2. Generate a replacement token with the minimum permissions and shortest practical lifetime. 3. Remove the token from `publish-manual.txt` and replace the instruction with an interactive login flow or an environment-variable reference. 4. Purge the credential from Git history, release archives, package registries, mirrors, build artifacts, and CI/CD logs. 5. Store future credentials in a dedicated secret manager or protected CI secret store. 6. Never commit `.env` files or credential-bearing configuration files. 7. Add automated secret scanning to pre-commit hooks and CI pipelines. 8. Review ClawHub account and publication activity for unauthorized operations performed using the exposed token. 9. Rotate any related credentials if the token could have been reused or exposed alongside other account secrets. ]]>
