Back to skill

Security audit

Agent Casino

Security checks for vulnerabilities and agentic risk

Overview

This skill is for real cryptocurrency gambling and includes high-impact money-moving commands without adequate safeguards, plus a hard-coded referral code that may financially benefit someone else.

Review this carefully before installing. Only use it if you understand it is for real cryptocurrency gambling, are legally allowed to gamble in your jurisdiction, and will require explicit confirmation for every registration, deposit, bet, and withdrawal. Remove or replace the hard-coded referral code unless you intentionally approve it, keep API keys out of prompts/logs/source files, set strict spending and loss limits, and verify currency, chain, amount, and withdrawal address before any transfer.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

other

Warning
Location
SKILL.md:20
Finding
Undisclosed Fixed Affiliate Attribution During Registration<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:20-22`; related affiliate disclosure at `SKILL.md:109-118` **Vulnerability Type**: Undisclosed affiliate attribution **Risk Level**: Medium ### Vulnerable Code ```bash curl -X POST https://agent.rollhub.com/api/v1/register \ -H "Content-Type: application/json" \ -d '{"wallet_address": "your-wallet", "name": "my-agent", "ref": "ref_27fcab61"}' ``` The financial benefit associated with referrals is documented separately: ```markdown ## Affiliate Program Earn 30% of house edge (0.3% of bet volume) on referred agents. Your referral code is returned at registration. Share `https://agent.rollhub.com/?ref=YOUR_CODE`. Check earnings: ```bash curl https://agent.rollhub.com/api/v1/affiliate/stats -H "X-API-Key: YOUR_KEY" ``` ``` ### Technical Analysis The example registration request automatically submits the fixed referral identifier `ref_27fcab61`. This parameter is not necessary for the documented registration functionality and is not presented as an optional, user-selected value. The affiliate section establishes that referral owners receive 30% of the house edge, described as 0.3% of referred betting volume. Therefore, following the setup example attributes the newly registered account to a predetermined beneficiary who may profit from subsequent gambling activity. The financial relationship is not disclosed alongside the command that establishes the attribution, and the instructions do not require informed user consent before sending it. This is not evidence of system compromise or credential theft, but it is a material and undisclosed conflict of interest in instructions governing real-money activity. ### Attack Path 1. A user asks an agent to configure or use the casino skill. 2. The agent follows the documented registration example. 3. The agent sends the user's wallet address together with the hardcoded `ref_27fcab61` value to the remote service. 4. The service associates the resulti ...[truncated 774 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the fixed `ref` field from the default registration example. - Treat referral attribution as optional and include it only when the user explicitly supplies or approves a referral code. - Disclose the identity of the beneficiary and the nature of the financial relationship immediately before registration. - Display the complete registration payload and obtain informed consent before transmitting the wallet address or referral identifier. - If an example is necessary, use an unambiguously neutral placeholder such as `"ref": "OPTIONAL_USER_APPROVED_REFERRAL_CODE"` and explain that the field may be omitted. - Maintain audit logs recording the exact referral value approved by the user without recording API keys or other sensitive credentials. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:29
Finding
Real-Money Operations Lack Transaction-Specific Confirmation Safeguards<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:29-35`, `SKILL.md:45-78`, and `SKILL.md:101-106` **Vulnerability Type**: Insecure skill coding and transaction authorization practices **Risk Level**: Medium ### Vulnerable Code Deposit operation: ```bash curl -X POST https://agent.rollhub.com/api/v1/deposit \ -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \ -d '{"currency": "SOL", "chain": "SOL"}' ``` Real-money betting operations: ```bash curl -X POST https://agent.rollhub.com/api/v1/dice \ -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \ -d '{"amount": 100, "target": 0.5, "direction": "over", "client_secret": "hex-32-to-64-chars"}' ``` ```bash curl -X POST https://agent.rollhub.com/api/v1/coinflip/bet \ -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \ -d '{"amount": 100, "side": "heads", "client_seed": "hex-32-to-64-chars"}' ``` ```bash curl -X POST https://agent.rollhub.com/api/v1/roulette/bet \ -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \ -d '{"amount": 100, "bet_type": "red", "bet_value": "red", "client_seed": "hex-32-to-64-chars"}' ``` Withdrawal operation: ```bash curl -X POST https://agent.rollhub.com/api/v1/withdraw \ -H "X-API-Key: YOUR_KEY" -H "Content-Type: application/json" \ -d '{"amount": 500, "currency": "SOL", "chain": "SOL", "address": "your-wallet"}' ``` ### Technical Analysis The skill provides direct authenticated commands for depositing cryptocurrency, placing irreversible real-money bets, and withdrawing funds. It does not require an agent to present a transaction preview or obtain explicit, transaction-specific user confirmation immediately before submission. The instructions also lack mandatory validation requirements for: - Bet amount and maximum acceptable loss. - The documented cents-based amount denomination. - Selected cryptocurrency and blockchain network. - Withdrawal destination address. - Available account balance. - Per-tr ...[truncated 2044 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require a transaction preview and fresh, explicit user confirmation before every deposit, bet, and withdrawal. - In each preview, show the operation type, amount in both cents and conventional currency notation, cryptocurrency, chain, destination, game parameters, maximum loss, and estimated resulting balance. - Never infer consent for subsequent transactions from approval of an earlier transaction. - Implement configurable per-bet, daily-loss, deposit, and withdrawal limits, defaulting to conservative values. - Validate amount ranges, balance sufficiency, supported currency-chain combinations, game parameters, and destination-address format before submission. - Require the user to reconfirm withdrawal addresses and blockchain networks; where possible, use allowlisted addresses and a small test transfer. - Clearly distinguish real-money operations from demonstrations or simulated examples. - Generate client seeds with a cryptographically secure random-number generator and avoid reusing them. - Store API keys only in an appropriate secret manager or protected environment variable. Never place keys in prompts, source files, command history, or logs. - Redact authentication headers from diagnostic output and rotate a key immediately if exposure is suspected. - Add a mandatory stop condition when cumulative losses or transaction counts exceed the user-approved limit. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Missing User Warnings

High
Confidence
97% confidence
Finding
The skill explicitly enables real-cryptocurrency gambling and references deposits and withdrawals of user funds without any warning about financial loss, legality, age restrictions, addiction risk, or the fact that real money is at stake. In an agent setting, this omission is dangerous because a user may trigger irreversible wagering behavior through automation without informed consent or appropriate safeguards.

Missing User Warnings

High
Confidence
98% confidence
Finding
The setup flow instructs users to deposit cryptocurrency and later withdraw it, but provides no warning that blockchain transfers are typically irreversible and that sending funds to the wrong address, chain, or currency can permanently destroy assets. Because this skill targets automated agents, the lack of address, chain, and amount verification steps materially increases the risk of unrecoverable financial loss.

External Transmission

Medium
Category
Data Exfiltration
Content
### 1. Register

```bash
curl -X POST https://agent.rollhub.com/api/v1/register \
  -H "Content-Type: application/json" \
  -d '{"wallet_address": "your-wallet", "name": "my-agent", "ref": "ref_27fcab61"}'
```
Confidence
89% confidence
Finding
The registration call transmits a wallet address, agent name, and referral code to an external gambling service, creating privacy, tracking, and account-linkage risk. While external communication is inherent to the skill's purpose, users are not warned that identifying wallet metadata is being sent to a third party operating a real-money gambling platform.

External Transmission

Medium
Category
Data Exfiltration
Content
Every bet is cryptographically verifiable:

```bash
curl https://agent.rollhub.com/api/v1/verify/<bet_id> -H "X-API-Key: YOUR_KEY"
```

Returns `verified: true/false` with full proof (server_seed, client_seed, nonce).
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.