Back to skill

Security audit

POKERCLAW

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for autonomous PokerClaw play, but it asks for raw login credentials and sends credentials or bearer tokens to a user-configured API URL without clear safety boundaries.

Review before installing. Use this only with a PokerClaw server URL you trust, preferably HTTPS, and avoid entering a reused password into chat. Prefer setting a scoped POKERCLAW_TOKEN yourself through a secure secret mechanism, and remember that the skill can autonomously join games and submit betting actions for the configured account.

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

Error
Location
SKILL.md:15
Finding

Unvalidated API Endpoint Can Expose User Credentials and Bearer Tokens

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15–40
Vulnerability Type: Unvalidated credential destination and insecure secret handling
Risk Level: High

The skill permits POKERCLAW_API_URL to be supplied through an environment variable or directly by the user. It then sends login credentials and bearer tokens to that destination without requiring HTTPS, validating the hostname, or restricting the endpoint to an approved POKERCLAW origin.

Vulnerable code:

markdown
- **API URL**: Stored in `POKERCLAW_API_URL` env var (e.g., `https://your-pokerclaw-instance.com`)
- **Auth Token**: Stored in `POKERCLAW_TOKEN` env var (JWT token from login/register)

If these are not set, ask the user to provide:
1. The POKERCLAW server URL
2. Their login credentials (email + password) OR ask if they want to register a new agent

## API Reference

All endpoints are prefixed with `{POKERCLAW_API_URL}/api/agent-api/`. Include the auth token as `Authorization: Bearer {POKERCLAW_TOKEN}` header on all requests except register/login.

### Authentication

**Register a new agent:**
```bash
curl -X POST "{POKERCLAW_API_URL}/api/agent-api/register" \
  -H "Content-Type: application/json" \
  -d '{"username": "my_claw", "email": "claw@example.com", "password": "secure123", "agent_name": "ClawBot_Prime"}'

Response includes token - save this as POKERCLAW_TOKEN.

Login:

bash
curl -X POST "{POKERCLAW_API_URL}/api/agent-api/login" \
  -H "Content-Type: application/json" \
  -d '{"email": "claw@example.com", "password": "secure123"}'
text

### Technical Analysis

The confidentiality of the authentication flow depends entirely on the value of `POKERCLAW_API_URL`. Because the skill accepts a user-provided URL and does not define an origin allowlist, a maliciously supplied endpoint can receive the user's email address and password during login or registration. Every subsequent authenticated
...[truncated 2085 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin POKERCLAW_API_URL to the official service origin or enforce a strict allowlist of approved HTTPS hostnames.
  2. Reject cleartext HTTP, embedded URL credentials, IP-literal destinations where unnecessary, malformed URLs, and unexpected ports.
  3. Disable redirects for authentication requests or verify that every redirect remains on the approved HTTPS origin.
  4. Validate the server certificate using the operating system's trusted certificate store; do not permit insecure TLS options.
  5. Do not request passwords through ordinary chat messages. Use a protected credential prompt, secret manager, or externally completed authentication flow.
  6. Avoid placing passwords directly in command-line arguments. Supply request data through a protected input channel or temporary file with restrictive permissions, and securely remove temporary material afterward.
  7. Provision POKERCLAW_TOKEN through a secret-management mechanism and prevent it from appearing in logs, transcripts, error messages, or command traces.
  8. Scope tokens to the minimum required API permissions, use short expiration periods, and support immediate revocation and rotation.
  9. Clearly warn users not to provide credentials reused on other services.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Register a new agent:

bash
curl -X POST "{POKERCLAW_API_URL}/api/agent-api/register" \
  -H "Content-Type: application/json" \
  -d '{"username": "my_claw", "email": "claw@example.com", "password": "secure123", "agent_name": "ClawBot_Prime"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly instructs the agent to ask the user for login credentials, including email and password, without any warning about secure handling, minimization, or safer alternatives. This creates a real risk of credential collection and unnecessary exposure of sensitive secrets to the agent and any connected tooling or logs.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
85% confidence
Finding

The register endpoint transmits sensitive data, including email and password, to an external service. In context this is expected functionality for account creation, but it is still a genuine security concern because the skill encourages transmitting secrets to a third-party endpoint defined by an environment variable, which may be misconfigured, untrusted, or non-HTTPS.

Content

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

Register a new agent:

bash
curl -X POST "{POKERCLAW_API_URL}/api/agent-api/register" \
  -H "Content-Type: application/json" \
  -d '{"username": "my_claw", "email": "claw@example.com", "password": "secure123", "agent_name": "ClawBot_Prime"}'