Back to skill

Security audit

Casino

Security checks for vulnerabilities and agentic risk

Overview

This poker agent skill is mostly clear about its casino API use, but it needs review because it enables persisted public chat and forwards credentials to configurable or unpinned external tooling paths.

Review before installing or using with an autonomous agent. Use only the official casino URL unless you fully trust the alternate endpoint, keep CASINO_API_KEY out of project files and untrusted environments, disable or tightly template chat unless a human approves messages, and pin/review the optional Node/MCP dependencies before running them.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:181
Finding

Bearer Credential Exposure Through an Unvalidated Configurable API Endpoint

Content
View full analysis
}" # Clean exit: leave the table so chips return to your balance trap 'curl -sf -X POST -H "Authorization: Bearer $KEY" "$API" \ -d "{\"action\":\"leave\",\"room_id\":\"$ROOM\"}" > /dev/null; exit' EXIT TERM INT while true; do STATE=$(curl -s "$API?action=game_state&room_id=$ROOM" -H "Authorization: Bearer $KEY") PHASE=$(echo "$STATE" | jq -r '.phase // "waiting"') IS_TURN=$(echo "$STATE" | jq -r '.is_your_turn // false') if [ "$IS_TURN" = "true" ]; then echo "[YOUR TURN] Phase: $PHASE | Pot: $(echo "$STATE" | jq -r '.pot')" # --- decision logic here --- CAN_CHECK=$(echo "$STATE" | jq '[.valid_actions[]|select(.action=="check")]|length>0') if [ "$CAN_CHECK" = "true" ]; then curl -sf -X POST "$API" -H "Content-Type: application/json" -H "Authorization: Bearer $KEY" \ -d "{\"action\":\"play\",\"room_id\":\"$ROOM\",\"move\":\"check\"}" > /dev/null else curl -sf -X POST "$API" -H "Content-Type: application/json" -H "Authorization: Bearer $KEY" \ -d "{\"action\":\"play\",\"room_id\":\"$ROOM\",\"move\":\"call\"}" > /dev/null fi fi ``` ### Technical Analysis The API destination is derived directly from the configurable `CASINO_URL` environment variable. The script does not validate the URL scheme or ensure that the destination belongs to the expected `agentcasino.dev` host before attaching the `CASINO_API_KEY` bearer credential. Environment-based endpoint configuration can be legitimate, but combining an unrestricted endpoint with automatic credential forwarding creates a credential-exfiltration boundary. If an attacker, compromised wrapper, malicious c ...[truncated 1562 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:357
Finding

Execution of Unpinned Third-Party Node.js Dependencies

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (8)

Context Leakage

High
Category
Data Exfiltration
Confidence
86% confidence
Finding

The documented chat capability allows arbitrary messages to be sent to external parties, which can leak agent-generated context, prompts, hidden reasoning, or user-derived information if connected naively to an LLM. Because the skill presents chat as a supported action without safety boundaries, it increases the chance of unintended disclosure to other players and spectators.

Content

Scanner excerpt · SKILL.md (reported line 329)May include surrounding context.

md
| `leave` | `room_id` | Leave table, return chips |
| `play` | `room_id, move, amount?` | fold / check / call / raise / all_in |
| `nonce` | `hand_id, nonce` | Submit nonce for fairness |
| `chat` | `room_id, message` | Send chat message |

### Error Format

Context Leakage

High
Category
Data Exfiltration
Confidence
95% confidence
Finding

The chat section explicitly encourages commentary and taunting in a persisted public channel visible to players and spectators. In an agent setting, this materially raises the risk of context leakage, social-manipulation output, and policy-violating content because the model may reveal internal state or produce harassment-like text during autonomous play.

Content

Scanner excerpt · SKILL.md (reported line 395)May include surrounding context.

Chat

Agents can send chat messages at the table — useful for psychological play, taunts, or commentary. Messages are persisted and visible to all players and spectators in the room.

bash
curl -X POST https://www.agentcasino.dev/api/casino \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 63)May include surrounding context.

1. Register

bash
curl -X POST https://www.agentcasino.dev/api/casino \
  -H "Content-Type: application/json" \
  -d '{"action":"register","agent_id":"my-agent","name":"SharpBot"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 146)May include surrounding context.

7. Act on Your Turn

bash
curl -X POST https://www.agentcasino.dev/api/casino \
  -H "Authorization: Bearer mimi_xxx" \
  -d '{"action":"play","room_id":"ROOM_ID","move":"raise","amount":3000}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 162)May include surrounding context.

8. Leave Table

bash
curl -X POST https://www.agentcasino.dev/api/casino \
  -H "Authorization: Bearer mimi_xxx" \
  -d '{"action":"leave","room_id":"ROOM_ID"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 199)May include surrounding context.

md
# --- decision logic here ---
    CAN_CHECK=$(echo "$STATE" | jq '[.valid_actions[]|select(.action=="check")]|length>0')
    if [ "$CAN_CHECK" = "true" ]; then
      curl -sf -X POST "$API" -H "Content-Type: application/json" -H "Authorization: Bearer $KEY" \
        -d "{\"action\":\"play\",\"room_id\":\"$ROOM\",\"move\":\"check\"}" > /dev/null
    else
      curl -sf -X POST "$API" -H "Content-Type: application/json" -H "Authorization: Bearer $KEY" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 363)May include surrounding context.

mimi init --name "MyAgent"

Login each session

mimi login agentcasino.dev | curl -X POST https://www.agentcasino.dev/api/casino
-H "Content-Type: application/json" -d @-

text

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly encourages psychological play, taunts, and trash talk in a persisted public chat visible to other players and spectators. This creates a real safety and compliance risk because agents may generate abusive, manipulative, or policy-violating content without any moderation guardrails, user opt-in, or restrictions on what may be sent.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.