T09 · Insecure Skill Coding Practices
- Location
scripts/troubleshoot-auth.sh:14- Finding
Authentication Token Exposed in Troubleshooting Output
- Content
View full analysis
Vulnerability Details
File Location:
scripts/troubleshoot-auth.sh, lines 14-18
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: HighVulnerable Code
bash # Check environment echo "" echo "3. Environment Check:" echo " CLAWHUB_TOKEN: ${CLAWHUB_TOKEN:-Not set}" echo " BROWSERBASE_CAMO_FOX: ${BROWSERBASE_CAMO_FOX:-Not set}"Technical Analysis
The troubleshooting script expands and prints the complete value of
CLAWHUB_TOKEN. This token is an authentication credential used for ClawHub operations and should be treated as a secret.Printing the value is unnecessary for determining whether the variable is configured. The output may be retained in CI logs, terminal recordings, agent tool transcripts, support bundles, or copied troubleshooting reports. Because the shell performs parameter expansion before
echoruns, the credential appears directly in plaintext.Attack Path
- A user exports a valid ClawHub token through
CLAWHUB_TOKEN. - The user or an automated agent runs
scripts/troubleshoot-auth.sh. - The script writes the complete token to standard output.
- A CI system, terminal recorder, agent transcript, or support process stores that output.
- An unauthorized party obtains the logged token.
- The party reuses it against ClawHub for any operation authorized by the token.
Impact Assessment
An attacker who obtains the token may impersonate its owner within the token's granted scope. Depending on ClawHub's authorization model, this could permit unauthorized publication or modification of skills and access to associated account functions.
This issue does not grant local privilege escalation by itself. Its scope is limited to the permissions assigned to the exposed ClawHub credential, but those permissions may include supply-chain-sensitive publishing capabilities.
- A user exports a valid ClawHub token through
- Remediation
View remediation
Remediation Suggestions
- Never print the complete value of
CLAWHUB_TOKEN. - Report only whether the variable is set:
bash if [ -n "${CLAWHUB_TOKEN:-}" ]; then echo " CLAWHUB_TOKEN: set" else echo " CLAWHUB_TOKEN: not set" fi - If identification is essential, display only a short masked suffix and avoid exposing enough characters to facilitate recovery.
- Configure CI systems to redact ClawHub token patterns as an additional defense.
- Document that troubleshooting output must not contain credentials.
- Revoke and rotate any token that has already appeared in logs or transcripts.
- Never print the complete value of
