Back to skill

Security audit

Nginx Hosting

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says by publishing static games through nginx, but its raw deployment commands are under-scoped enough to merit review before installation.

Install only if operators will use strict game-name validation, quote shell variables, verify destinations remain under /data/games, avoid publishing sensitive files, and understand that updates can replace live public content. Prefer a small reviewed deployment script with staging or backups over literal placeholder substitution from these examples.

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)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:38
Finding
Unvalidated and Unquoted Deployment Parameters Enable Command Injection and Path Traversal<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 38–39; the unsafe copy pattern is repeated at line 53 **Vulnerability Type**: Shell command injection and arbitrary-path file write **Risk Level**: High ### Vulnerable Code ```bash mkdir -p /data/games/{game-name} cp -r /path/to/build/* /data/games/{game-name}/ ``` The update procedure repeats the unsafe destination construction: ```bash cp -r /path/to/new-build/* /data/games/{game-name}/ ``` ### Technical Analysis The deployment instructions place the `{game-name}` placeholder directly into shell commands without requiring validation, shell-safe quoting, or destination-path canonicalization. If an agent replaces this placeholder with attacker-controlled text, shell metacharacters may alter the command structure. For example, a value containing `;`, command substitution, redirection, or similar shell syntax can introduce an additional command when textual substitution is performed. A value containing path components such as `../../` can also cause the destination to escape the intended `/data/games/` root. The source path is represented as another unquoted placeholder. Implementations derived from this documentation may consequently mishandle source paths containing whitespace, wildcard characters, leading hyphens, or shell metacharacters. ### Attack Path 1. An attacker asks the agent to deploy or update a game and supplies a crafted game name. 2. The agent substitutes that value directly into the documented command without validating it as a restricted slug. 3. A value containing shell syntax changes the command executed by the shell, or a traversal value such as `../../target` resolves outside `/data/games/`. 4. The command runs with the agent's filesystem permissions. 5. The attacker can cause commands to execute or files to be copied to an unintended writable location. Exploitation requires the game name or another substituted path to be derived from an untrusted request and i ...[truncated 680 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Require game names to match a strict allowlist, such as `^[A-Za-z0-9_-]+$`. - Explicitly reject empty values, `.` and `..`, path separators, whitespace, leading hyphens, control characters, and shell metacharacters. - Pass values as shell variables and quote every expansion: ```bash game_name='validated-slug' source_dir='/validated/build/path' destination="/data/games/$game_name" mkdir -p -- "$destination" cp -r -- "$source_dir"/. "$destination"/ ``` - Canonicalize the destination and verify that it remains a child of `/data/games/` before creating directories or copying files. - Validate the source as an existing directory and avoid directly interpolating user-provided source paths. - Use a deployment script that accepts structured arguments rather than having the agent construct shell commands through textual substitution. - Run deployment under a dedicated, least-privileged account that can write only to the game-content directory and perform only the required nginx reload operation. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:45
Finding
TLS Certificate Verification Disabled During Deployment Validation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 45 **Vulnerability Type**: Improper TLS certificate validation **Risk Level**: Low ### Vulnerable Code ```bash curl -sk https://roger-us02.clawln.net/games/{game-name}/ | head -3 ``` ### Technical Analysis The `-k` option instructs `curl` to accept an HTTPS connection without validating the server certificate. This defeats certificate-chain and hostname verification during the documented post-deployment check. Although this command only retrieves output for verification and does not execute the response, it can cause an invalid or intercepted HTTPS endpoint to appear healthy. The additional `-s` option suppresses normal progress and error reporting, further reducing visibility into verification failures. ### Attack Path 1. An attacker gains a network position capable of intercepting or redirecting the verification request, or the hostname resolves to an unintended endpoint. 2. The attacker presents an invalid or attacker-controlled TLS certificate. 3. Because `curl -k` disables certificate verification, the client accepts the connection. 4. The attacker returns content that resembles the expected first lines of the deployed page. 5. The operator or agent incorrectly concludes that the public HTTPS deployment was verified successfully. This issue does not by itself execute remote content or modify the deployed files; it undermines the reliability of the verification step. ### Impact Assessment An attacker able to intercept or redirect the request can spoof the verification response and conceal certificate, routing, or deployment problems. The immediate effect is false deployment validation rather than direct code execution or privilege escalation. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Remove `-k` and allow `curl` to perform normal certificate-chain and hostname validation: ```bash curl -sS --fail-with-body "https://roger-us02.clawln.net/games/$game_name/" | head -3 ``` - Use `-sS` rather than `-s` so errors remain visible. - Use `--fail-with-body` or an explicit HTTP status check to ensure HTTP errors cause verification failure. - If a private certificate authority is genuinely required, install the appropriate CA certificate or provide it with `--cacert` instead of disabling verification globally. - Apply the same strict game-name validation and quoting requirements to the verification URL. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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 (1)

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly enables zero-auth publication of arbitrary static content to a permanent public HTTPS URL, but it does not warn operators that any copied files become immediately internet-accessible or that updating a game can silently overwrite existing public content. In this context, the missing warning increases the chance of accidental data exposure, unintended publication of internal assets, or destructive replacement of an existing deployment.

Static analysis

No suspicious patterns detected.