T09 · Insecure Skill Coding Practices
- Location
RETRY_PUBLISH.txt:1- Finding
Plaintext ClawHub Publishing Token Included in Project
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is an Agent Casino audit helper, but it pushes live betting and account registration, overstates independent verification, and includes an exposed publishing token.
Review carefully before installing. Do not run the betting commands unless you understand the legal, account, privacy, and financial implications. Treat reports from this skill as weak evidence unless you independently verify each bet from raw commitment, seed, client seed, nonce, and result data. The publisher should revoke the exposed ClawHub token and remove it from artifacts and history before publication.
RETRY_PUBLISH.txt:1Plaintext ClawHub Publishing Token Included in Project
RETRY_PUBLISH.txt:1Unpinned Package Execution Through npx in Publishing Command
scripts/audit.sh:42Fairness Audit Trusts the Casino's Self-Reported Verification Result
The file contains a plaintext CLAWHUB_TOKEN value directly embedded in a publish command, which exposes a usable credential to anyone who can read the file, logs, shell history, or screenshots. Because the token is paired with a publishing action, compromise could let an attacker publish, modify, or impersonate the associated skill or account.
The skill markets itself as a zero-trust cryptographic auditor, but its documented workflow includes registration and placing live bets while relying on remote API responses rather than demonstrably local verification. This mismatch can mislead users or agents into performing financial and external actions under false assumptions of safety and rigor, increasing the chance of unintended spending, data disclosure, and incorrect trust decisions.
The skill instructs users to register with an external gambling-related service and place real test bets without clear warnings about monetary loss, account creation, or data transfer. In context, this is especially dangerous because the task is framed as an audit, which may cause users to underestimate that they are being guided into live financial activity.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
if [ -z "$AGENT_CASINO_API_KEY" ]; then
echo "Error: Set AGENT_CASINO_API_KEY"
echo "Register: curl -X POST $API_BASE/register -H 'Content-Type: application/json' -d '{\"name\": \"auditor\", \"ref\": \"ref_27fcab61\"}'"
exit 1
fi
The skill claims cryptographic fairness verification using SHA3-384 and AES-256-CTR, but the implementation only calls a remote /verify/{bet_id} endpoint and performs simple local statistics. This creates a trust gap where the purported auditor merely trusts the service being audited, enabling false assurance and defeating the zero-trust security claims in the skill metadata.
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
while IFS= read -r line; do
BET_ID=$(echo "$line" | python3 -c "import sys,json; print(json.load(sys.stdin).get('bet_id',''))" 2>/dev/null)
if [ -n "$BET_ID" ] && [ "$BET_ID" != "" ]; then
VERIFY=$(curl -s "$API_BASE/verify/$BET_ID" -H "Authorization: Bearer $AGENT_CASINO_API_KEY")
STATUS=$(echo "$VERIFY" | python3 -c "import sys,json; d=json.load(sys.stdin); print('VALID' if d.get('verified',False) else 'INVALID')" 2>/dev/null || echo "UNKNOWN")
TOTAL=$((TOTAL + 1))
if [ "$STATUS" = "VALID" ]; then
The command uses npx clawhub without pinning an exact package version, which allows whatever version is currently published to be fetched and executed at publish time. In a supply-chain attack or malicious package update scenario, this could execute attacker-controlled code in an environment that also contains a live credential, increasing the risk substantially.
The skill includes shell-based commands (curl, bash scripts/audit.sh ...) but declares no explicit tool scope or permission boundaries. That creates an unsafe ambiguity where an agent may execute networked and potentially state-changing commands without transparent authorization controls.
The description is heavily keyword-stuffed and lacks a clear invocation boundary, which can cause overly broad matching and accidental activation in unrelated contexts. In an agent ecosystem, that raises the risk that a skill capable of network calls and financial actions is invoked when a user only asked for general security, randomness, or cryptography help.
The skill sends user/agent data to an external service via a registration POST request, which is an external transmission event. While external API use may be expected for this skill, the lack of disclosure and consent mechanisms makes the transmission security-relevant, especially because it creates an account relationship with a third party.
curl -X POST https://agent.rollhub.com/api/v1/register \
-H "Content-Type: application/json" \
-d '{"name": "auditor-agent", "ref": "ref_27fcab61"}'
The script instructs the user to send registration data to an external service, establishing outbound data transmission to a third-party endpoint. In this skill context, external transmission is expected, but it still carries privacy, trust, and account-enrollment risk because an audit helper is directing users to register with the target system.
if [ -z "$AGENT_CASINO_API_KEY" ]; then
echo "Error: Set AGENT_CASINO_API_KEY"
echo "Register: curl -X POST $API_BASE/register -H 'Content-Type: application/json' -d '{\"name\": \"auditor\", \"ref\": \"ref_27fcab61\"}'"
exit 1
fi
The script's run mode places live bets against a production remote API, creating real external side effects and potential financial loss instead of performing passive audit or local fairness verification. In the context of an 'auditor' skill, this is especially risky because users may reasonably expect read-only validation, not repeated wagering transactions.
The script performs repeated remote betting transactions and truncates bets.jsonl before execution without an explicit warning, backup, or confirmation. This can cause unintended spending and destroy prior audit evidence, which is particularly dangerous in a security-audit tool where preserving historical records matters.
Report generation overwrites the existing report file unconditionally, which can erase prior audit output or evidence. While lower severity than the live betting behavior, silent destruction of prior reports is still unsafe in an auditing context where traceability and preservation are important.
No suspicious patterns detected.