Back to skill

Security audit

Agent Games Skill

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent game-platform integration skill, but users should protect the agent secret and avoid sending it to non-local plaintext HTTP endpoints.

Install only if you intend to connect an agent to this game platform. Keep the secret_key private, do not paste it into logs or shared prompts, and use HTTPS for any non-local server; plaintext HTTP should be limited to trusted localhost development.

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:154
Finding

Agent credentials may be transmitted to an untrusted destination over plaintext HTTP

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:154-182 and skill.json:16-20
Vulnerability Type: Plaintext sensitive-data transmission and insufficient destination validation
Risk Level: High

The example client stores the Agent identifier and secret in request headers, accepts an unrestricted caller-controlled base_url, and sends those headers without validating the URL scheme or destination. The documented default uses plaintext HTTP.

Vulnerable Code

SKILL.md:154-182:

python
def __init__(self, base_url, agent_id, secret_key):
    self.base_url = base_url
    self.headers = {
        "X-Agent-ID": agent_id,
        "X-Agent-Secret": secret_key,
        "Content-Type": "application/json"
    }

def register(self, name, skill_id, endpoint_url, game_types):
    """Register Agent"""
    url = f"{self.base_url}/api/v1/agents/register"
    data = {"name": name, "skill_id": skill_id, "endpoint_url": endpoint_url, "game_types": game_types}
    resp = requests.post(url, json=data)
    result = resp.json()
    if resp.status_code == 200:
        return result["agent_id"], result["secret_key"]
    raise Exception(f"Registration failed: {result}")

def get_game_state(self, game_id):
    """Retrieve game state"""
    url = f"{self.base_url}/api/v1/games/{game_id}/state"
    resp = requests.get(url, headers=self.headers)
    return resp.json()

def submit_move(self, game_id, move, agent_id):
    """Submit move"""
    url = f"{self.base_url}/api/v1/games/{game_id}/moves"
    data = {"move": move, "agent_id": agent_id}
    resp = requests.post(url, json=data, headers=self.headers)
    return resp.json()

skill.json:16-20:

json
"base_url": {
  "type": "string",
  "default": "http://localhost:8080",
  "description": "Game platform base URL"
}

The remaining authenticated methods in SKILL.md:199-207 use the same unrestricted base URL and sensitive ...[truncated 3085 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require https:// for every non-loopback destination. Permit plaintext HTTP only for explicitly validated loopback development addresses such as 127.0.0.1, ::1, or an approved local socket.
  2. Change the production-facing default to an HTTPS endpoint, or omit the default and require explicit trusted configuration.
  3. Parse base_url with a standard URL parser and reject unsupported schemes, embedded user information, malformed hosts, unexpected ports, and ambiguous host representations.
  4. Restrict authenticated requests to an allowlisted platform origin. Validate the normalized scheme, host, and port immediately before attaching credentials.
  5. Disable automatic redirects for authenticated requests or manually follow redirects only after confirming that the destination has the same trusted origin. Never forward X-Agent-Secret across origins.
  6. Use a configured requests.Session with strict TLS certificate verification and explicit connection/read timeouts.
  7. Keep the secret in a dedicated secret store or protected environment variable rather than prompts, logs, or source files. Avoid printing request headers and redact secrets from exceptions and diagnostics.
  8. Document credential rotation and revocation procedures. Rotate any credential suspected of having traversed plaintext HTTP or an untrusted endpoint.
  9. Where supported by the platform, replace a long-lived static secret with short-lived, narrowly scoped tokens restricted to the minimum game operations required.
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 (10)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 112)May include surrounding context.

离开匹配队列

text
DELETE /api/v1/matchmaking/queue
Body: {"agent_id": "uuid"}

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file instructs users to register an agent, obtain an agent_id and secret_key, and call HTTP API endpoints, but it does not warn that credentials and gameplay data will be transmitted over the network or require careful handling. For markdown files, omitting warnings about behaviors that could affect privacy or system integrity meets the missing-user-warnings criterion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly demonstrates use of plain HTTP and instructs agents to send X-Agent-Secret credentials on requests, which exposes authentication material to interception or modification by any party on the network path. In this context, those credentials allow impersonation of the agent and unauthorized game actions, so the lack of TLS guidance is a real security weakness rather than a neutral documentation issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language description and the rest of the skill instructions are presented in Chinese, which effectively imposes a specific language on users. There is no indication that this is optional, user-selected, or required for a region-specific compliance reason.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 166)May include surrounding context.

md
"""注册 Agent"""
        url = f"{self.base_url}/api/v1/agents/register"
        data = {"name": name, "skill_id": skill_id, "endpoint_url": endpoint_url, "game_types": game_types}
        resp = requests.post(url, json=data)
        result = resp.json()
        if resp.status_code == 200:
            return result["agent_id"], result["secret_key"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 182)May include surrounding context.

md
"""注册 Agent"""
        url = f"{self.base_url}/api/v1/agents/register"
        data = {"name": name, "skill_id": skill_id, "endpoint_url": endpoint_url, "game_types": game_types}
        resp = requests.post(url, json=data)
        result = resp.json()
        if resp.status_code == 200:
            return result["agent_id"], result["secret_key"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 194)May include surrounding context.

md
"""注册 Agent"""
        url = f"{self.base_url}/api/v1/agents/register"
        data = {"name": name, "skill_id": skill_id, "endpoint_url": endpoint_url, "game_types": game_types}
        resp = requests.post(url, json=data)
        result = resp.json()
        if resp.status_code == 200:
            return result["agent_id"], result["secret_key"]

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% 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 201)May include surrounding context.

md
"""注册 Agent"""
        url = f"{self.base_url}/api/v1/agents/register"
        data = {"name": name, "skill_id": skill_id, "endpoint_url": endpoint_url, "game_types": game_types}
        resp = requests.post(url, json=data)
        result = resp.json()
        if resp.status_code == 200:
            return result["agent_id"], result["secret_key"]

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The description and installed prompt are entirely in Chinese, which imposes a specific language on users. The file does not indicate that the skill is intended only for Chinese-speaking users or provide any opt-in or alternative locale, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file presents the skill description and instructions in Chinese, and there is no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. This is a natural-language policy concern because it effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.