Back to skill

Security audit

Casino Tournament

Security checks for vulnerabilities and agentic risk

Overview

This is an explicit gambling-tournament helper, not hidden malware, but it steers agents toward account registration and risky betting without clear safeguards.

Review this skill carefully before installing. It is oriented around crypto gambling tournaments and should only be used where gambling is legal, age-appropriate, and explicitly requested by the user. Do not allow an agent to register accounts, place wagers, or use an API key without direct human approval, spending limits, and clear understanding of the hardcoded referral and outbound data sent to agent.rollhub.com.

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 (1)

T09 · Insecure Skill Coding Practices

Note
Location
scripts/tournament.sh:10
Finding
Unsafe JSON Construction from User-Controlled Agent Name## Vulnerability Details **File Location**: `scripts/tournament.sh`, lines 10-14 **Vulnerability Type**: JSON payload injection caused by unsafe string interpolation **Risk Level**: Low ### Vulnerable Code ```bash register) read -p "Agent name: " NAME curl -s -X POST "$API_BASE/register" \ -H "Content-Type: application/json" \ -d "{\"name\": \"$NAME\", \"ref\": \"ref_27fcab61\"}" | python3 -m json.tool ;; ``` ### Technical Analysis The script reads an agent name from standard input and inserts it directly into a JSON string without JSON-aware escaping. Characters such as double quotes, backslashes, and control characters can invalidate the request or change its logical structure. Shell command injection is not established because the expansion of `NAME` occurs inside a quoted shell argument. However, the quoting does not protect the JSON document itself. A crafted name can introduce additional properties if the resulting payload is accepted by the remote registration service. For example, an input similar to: ```text x", "role": "admin", "unused": " ``` would cause the generated request body to contain attacker-controlled JSON structure rather than treating the entire input solely as an agent name. The actual server-side effect depends on how strictly the remote API validates and filters registration properties. ### Attack Path 1. An attacker or untrusted caller invokes `bash scripts/tournament.sh register`. 2. The caller supplies an agent name containing JSON syntax, including quotes and additional properties. 3. The script interpolates the value into the `curl -d` argument without JSON encoding. 4. The altered payload is transmitted to `https://agent.rollhub.com/api/v1/register`. 5. If the service accepts unexpected or duplicate fields, the attacker may manipulate registration attributes beyond the intended `name` value. This path does not grant local shell execution, filesystem acc ...[truncated 611 chars]
Remediation
## Remediation Suggestions Construct the request body with a JSON serializer rather than manual string interpolation: ```bash payload="$( python3 -c 'import json, sys; print(json.dumps({ "name": sys.argv[1], "ref": "ref_27fcab61" }))' "$NAME" )" curl -sS -X POST "$API_BASE/register" \ -H "Content-Type: application/json" \ --data-binary "$payload" | python3 -m json.tool ``` Additionally: - Enforce a reasonable length limit and documented character policy for agent names. - Reject control characters before sending the request. - Use `curl --fail-with-body` so HTTP failures are surfaced reliably. - Require the server to allowlist registration fields and reject unknown or duplicate properties. - Do not rely on client-side validation as the API's only security boundary.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Missing User Warnings

High
Confidence
97% confidence
Finding
This skill promotes gambling tournament participation, registration, betting activity, and leaderboard competition without any warning about monetary loss, addiction risk, legal restrictions, or the dangers of automated betting. In context, that omission is especially serious because the skill is explicitly aimed at AI agents and encourages activity metrics like highest volume and biggest win.

External Script Fetching

High
Category
Supply Chain
Content
## Registration

```bash
curl -X POST https://agent.rollhub.com/api/v1/register \
  -H "Content-Type: application/json" \
  -d '{"name": "tournament-agent", "ref": "ref_27fcab61"}'
```
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
case "$CMD" in
  register)
    read -p "Agent name: " NAME
    curl -s -X POST "$API_BASE/register" \
      -H "Content-Type: application/json" \
      -d "{\"name\": \"$NAME\", \"ref\": \"ref_27fcab61\"}" | python3 -m json.tool
    ;;
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
standings)
    TYPE="${2:-volume}"
    echo "🏆 Leaderboard ($TYPE)"
    curl -s "$API_BASE/leaderboard?type=$TYPE" | python3 -m json.tool
    ;;
  myrank)
    if [ -z "$AGENT_CASINO_API_KEY" ]; then
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
echo "Set AGENT_CASINO_API_KEY first"
      exit 1
    fi
    curl -s "$API_BASE/leaderboard/me" \
      -H "Authorization: Bearer $AGENT_CASINO_API_KEY" | python3 -m json.tool
    ;;
  *)
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill includes shell commands and operational guidance but declares no tool scope or permission boundaries. That can let an agent invoke shell/network capabilities unexpectedly, increasing the chance of unintended registration, polling, or other external actions against the gambling API.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The YAML description is a broad keyword list covering gambling, tournaments, rankings, betting, and APIs, which can cause the skill to activate for loosely related prompts. Overbroad activation is risky here because the skill steers agents toward external gambling-related actions and account registration.

Vague Triggers

Medium
Confidence
86% confidence
Finding
The markdown description and overview do not define when the skill should or should not be used. Without boundaries, an orchestrator may invoke it in inappropriate contexts, exposing users or agents to gambling workflows, external API use, and financial-risk behaviors unintentionally.

External Transmission

Medium
Category
Data Exfiltration
Content
## Registration

```bash
curl -X POST https://agent.rollhub.com/api/v1/register \
  -H "Content-Type: application/json" \
  -d '{"name": "tournament-agent", "ref": "ref_27fcab61"}'
```
Confidence
90% confidence
Finding
The skill instructs sending data to an external service via a registration POST request. Even though the transmitted sample data is minimal, it still causes outbound communication to a third party and may create accounts or link usage through the embedded referral code without clear user consent or privacy disclosure.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The file promotes gambling tournament formats and includes explicit strategy tips for high-risk and repeated betting behavior without any warning about financial loss, addiction, or responsible gambling. In the context of an agent skill designed for crypto gambling competitions, this can nudge users or autonomous agents toward harmful risk-taking and normalizes unsafe wagering behavior.

External Transmission

Medium
Category
Data Exfiltration
Content
case "$CMD" in
  register)
    read -p "Agent name: " NAME
    curl -s -X POST "$API_BASE/register" \
      -H "Content-Type: application/json" \
      -d "{\"name\": \"$NAME\", \"ref\": \"ref_27fcab61\"}" | python3 -m json.tool
    ;;
Confidence
83% confidence
Finding
The script transmits user-supplied data to an external service during registration. This is an intentional network action for the skill’s purpose, but it still creates a real data-exfiltration/privacy surface because users may provide identifying information without clear validation or disclosure.

Static analysis

No suspicious patterns detected.