T09 · Insecure Skill Coding Practices
Error
- Location
- clawhub-auth.json:1
- Finding
- Plaintext ClawHub Authentication Token Committed to the Package<![CDATA[ ## Vulnerability Details **File Location**: `clawhub-auth.json:1-4` **Vulnerability Type**: Hardcoded authentication credential **Risk Level**: High ### Vulnerable Code ```json { "registry": "https://clawhub.ai", "token": "[REDACTED EXPOSED clh_ TOKEN]" } ``` The token value has been redacted from this report to prevent further credential disclosure. The audited file contains the complete plaintext credential. ### Technical Analysis A ClawHub authentication token is stored directly in a versioned package file. Any user, service, build worker, or package consumer with access to the project can extract the credential without authentication. Embedding credentials in source code or package artifacts prevents effective access control and makes credential rotation difficult. If the token remains valid, it can be submitted to the configured `https://clawhub.ai` registry. The token's exact permissions and current validity were not established during this static audit. ### Attack Path 1. An attacker downloads, clones, or otherwise obtains the project. 2. The attacker opens `clawhub-auth.json`. 3. The attacker extracts the plaintext `clh_` token. 4. The attacker submits the token to the configured ClawHub registry. 5. If the token remains valid, the attacker performs any operations authorized by its assigned scope. ### Impact Assessment Depending on the token's permissions, exploitation could permit unauthorized registry access, package publication, modification of published content, account abuse, or supply-chain compromise. The affected scope is the ClawHub account, namespace, or packages accessible to the exposed credential. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Revoke the exposed token immediately and generate a replacement with the minimum required permissions. 2. Remove `clawhub-auth.json` from the repository and distributed package. 3. Purge the credential from version-control history and previously published artifacts where feasible. 4. Store authentication material in a protected environment variable or operating-system credential store. 5. Add credential files to `.gitignore`, `.npmignore`, and package publication exclusion rules. 6. Enable automated secret scanning in commits and CI pipelines. 7. Review ClawHub activity logs for unauthorized operations performed with the exposed token. 8. Use short-lived, narrowly scoped publication credentials wherever supported. ]]>
