Back to skill

Security audit

Buy Domain Helper

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its stated Cloudflare publishing purpose, but it needs Review because it requests an unrelated credential and has unsafe execution paths around deployment, package fetching, and system installation.

Review carefully before installing. Remove the unrelated NETA_TOKEN requirement, avoid pasting Cloudflare tokens into command lines, expose only directories you intend to make public, and require explicit confirmation before deployment or DNS changes. Prefer pinned or bundled tooling and fix the deploy command injection before using this with real Cloudflare credentials.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
site.js:103
Finding
Shell Command Injection Through Deployment Arguments<![CDATA[ ## Vulnerability Details **File Location**: `site.js:103-108` **Vulnerability Type**: OS command injection through user-controlled shell interpolation **Risk Level**: High ### Vulnerable Code ```js const env = { ...process.env, CLOUDFLARE_API_TOKEN: TOKEN, CLOUDFLARE_ACCOUNT_ID: ACCOUNT }; const result = execSync( `wrangler pages deploy "${dir}" --project-name "${projectName}" --branch main 2>&1`, { env } ).toString(); ``` ### Technical Analysis The positional arguments `dir` and `projectName` originate from command-line input and are interpolated directly into a command string passed to `execSync`. Because `execSync` executes string commands through a shell, enclosing these values in double quotes does not neutralize shell constructs such as command substitution. Embedded quotes can also terminate the intended argument and introduce additional commands. For example, a directory argument containing `$(touch /tmp/pwned)` would be evaluated by the shell even though it appears inside double quotes. The spawned shell also receives an environment containing the Cloudflare API token and account ID, increasing the consequences of successful command execution. ### Attack Path 1. An attacker persuades the Agent or user to deploy using an attacker-controlled directory or project-name argument. 2. The attacker includes shell syntax in the argument, such as command substitution or a quote-escape sequence. 3. `parseFlags` accepts the value without validation. 4. The value is interpolated into the command string. 5. `execSync` invokes a shell, which evaluates the injected syntax. 6. The attacker's command executes with the privileges and environment of the Skill process. ### Impact Assessment Successful exploitation permits arbitrary local command execution with the Agent's operating-system privileges. The injected process can read or modify files available to the Agent, invoke network tools, alter deployments, and access environment variables inherited ...[truncated 203 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace shell-string execution with `execFileSync` or `spawnSync` and pass arguments as an array: ```js const result = execFileSync( 'wrangler', ['pages', 'deploy', dir, '--project-name', projectName, '--branch', 'main'], { env, encoding: 'utf8', shell: false, } ); ``` - Validate `projectName` against the exact character and length restrictions accepted by Cloudflare Pages. - Resolve and validate `dir` as a local directory before invoking Wrangler. - Reject null bytes, control characters, and unexpected argument forms. - Limit the environment passed to the child process to only the variables Wrangler strictly requires. - Add regression tests using arguments containing `$()`, backticks, quotes, semicolons, newlines, and other shell metacharacters. ]]>

T08 · Insecure Dependencies

Warning
Location
site.js:81
Finding
Unpinned Remote Package Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `site.js:81` **Vulnerability Type**: Unsafe dynamic dependency resolution and execution **Risk Level**: Medium ### Vulnerable Code ```js const serveProc = spawn('npx', ['-y', 'serve', target, '-p', '8080', '-s'], { stdio: 'ignore' }); ``` ### Technical Analysis The static-directory tunnel path invokes `npx -y serve` without specifying a package version or relying on a reviewed lockfile. If the package is not already available locally, `npx` can resolve it from the configured package registry, download it, and execute it automatically. The `-y` option suppresses user confirmation. Consequently, the code executed by this Skill can change after the Skill itself has been audited. Registry compromise, package-account compromise, registry configuration manipulation, or dependency resolution manipulation could cause unreviewed code to run locally. ### Attack Path 1. A user invokes `node site.js tunnel <directory>`. 2. The system reaches the static-directory branch. 3. `npx -y serve` resolves the package using the active npm registry configuration. 4. If the package is unavailable locally, `npx` downloads the currently resolved package version without confirmation. 5. Package installation or runtime code executes with the privileges of the Skill process. 6. A compromised or maliciously resolved package can access local files, inherited environment variables, and network resources. ### Impact Assessment A compromised dependency could execute arbitrary code under the current user account. The accessible scope includes files readable or writable by the Agent, available environment credentials, and network services reachable from the host. The issue also makes builds and audits non-reproducible because the executed package version is not fixed. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Declare `serve` as a project dependency at a reviewed, exact version. - Commit a package lockfile containing integrity hashes. - Invoke the locally installed binary rather than allowing `npx` to resolve an unspecified remote version. - Avoid `npx -y` for runtime installation. - Use a minimal built-in static HTTP server where practical, eliminating this dynamic dependency. - Apply dependency scanning and controlled update review before changing the pinned version. - If a registry is required, enforce a trusted registry configuration and package integrity verification. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
package.json:6
Finding
Unrelated Neta API Token Required Beyond Declared Functionality<![CDATA[ ## Vulnerability Details **File Location**: `package.json:6-11` **Vulnerability Type**: Unnecessary credential requirement violating least privilege **Risk Level**: Medium ### Vulnerable Code ```json "env": [ { "name": "NETA_TOKEN", "description": "Neta AI API token. Get it at https://www.neta.art/open/", "required": true } ] ``` ### Technical Analysis The package metadata marks `NETA_TOKEN` as required, although the Skill's declared functionality exclusively concerns Cloudflare tunnels, Pages, domains, and DNS. `SKILL.md` declares no required environment variables, and `site.js` does not reference or use `NETA_TOKEN`. Requiring an unrelated third-party credential exceeds the minimum privileges and data access necessary for the Skill. Even though the reviewed code does not transmit this token, making it available in the Skill environment unnecessarily expands the credential exposure surface. ### Attack Path 1. A user installs or activates the Skill. 2. The hosting framework reads `package.json` and requests or injects the required `NETA_TOKEN`. 3. The unrelated credential becomes available to the Skill process despite not being needed for any implemented command. 4. A compromised dependency, command-injection payload, diagnostic dump, or future code change could read and disclose or misuse the token. ### Impact Assessment The unnecessary requirement exposes a Neta AI credential to a process that has no legitimate need for it. The maximum service-side impact depends on the permissions assigned to that token. Locally, it enlarges the set of secrets accessible to any code executed in the Skill process, including code reached through the command-injection and dynamic-dependency paths identified elsewhere in this audit. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Remove the `NETA_TOKEN` entry from `package.json`. - Keep package metadata consistent with `SKILL.md` and the actual implementation. - Request only the narrowly scoped Cloudflare credentials needed for the specific operation selected by the user. - Do not expose unrelated credentials globally to the Skill process. - Add a release check that compares declared environment requirements with actual code references and documented functionality. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
site.js:40
Finding
Cloudflare API Tokens Accepted and Documented as Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `site.js:40-41` **Additional Locations**: `SKILL.md:23`, `README.md:68`, `README.md:92`, `README.md:115-121` **Vulnerability Type**: Sensitive credential exposure through process arguments and shell history **Risk Level**: Medium ### Vulnerable Code ```js const TOKEN = flags.token ?? process.env.CF_API_TOKEN; const ACCOUNT = flags.account ?? process.env.CF_ACCOUNT_ID; ``` The documented invocation pattern explicitly encourages command-line token use: ```bash node site.js deploy my-site ./my-site --token <PAGES_TOKEN> --account <ACCOUNT_ID> ``` ```bash node site.js zone mysite.com --token <DNS_TOKEN> node site.js pages-domain my-site mysite.com --token <PAGES_TOKEN> --account <ACCOUNT_ID> node site.js dns-link <zone_id> my-site --token <DNS_TOKEN> ``` ### Technical Analysis The implementation accepts Cloudflare API tokens through `--token`, and the documentation repeatedly recommends this method. Command-line arguments may be recorded in interactive shell history, automation logs, terminal transcripts, Agent tool logs, and process metadata. Depending on the operating system and process isolation configuration, other local users or monitoring tools may also be able to inspect active process arguments. The affected tokens are security-sensitive: the Pages token can modify deployments, while the DNS token is explicitly intended to have DNS edit permission for a zone. ### Attack Path 1. A user follows the documented command and supplies a Cloudflare token through `--token`. 2. The complete command is stored in shell history or captured by Agent, CI, terminal, or process-monitoring logs. 3. Alternatively, a local observer inspects process arguments while the command is running. 4. An unauthorized party extracts the token. 5. The party authenticates to Cloudflare and performs operations allowed by the token's scope. ### Impact Assessment Exposure of a Pages-edit token can permit unauthorized projec ...[truncated 354 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove or deprecate the `--token` option. - Prefer `CF_API_TOKEN` supplied through a protected environment, credential manager, or secret-injection facility. - Where environment variables are unsuitable, read the token from standard input without echoing it. - Remove token-bearing command examples from `README.md` and `SKILL.md`. - Add explicit warnings not to place tokens in shell commands, chat transcripts, source files, or logs. - Ensure error messages and debug output never include authorization headers or complete environment dumps. - Continue recommending separate, narrowly scoped Pages and DNS tokens, restricted to the required account or zone. - Advise users to rotate any token previously exposed through command history or logs. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (9)

Hidden Instructions

High
Category
Prompt Injection
Content
<!--skill-metadata
name: buy-domain-helper
description: |
  3-layer site launcher for any HTML. Tunnel instantly, deploy permanently to Cloudflare Pages, then buy a domain and link it via DNS.
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises capabilities that involve environment access and networked operations, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch can cause the skill to be invoked without clear guardrails, increasing the chance of unintended external actions like deployments, DNS changes, or token use under overly broad agent defaults.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill uses broad activation language like helping when a user wants to 'share a local page, host a site, or get a custom domain live,' which can match many ordinary requests. In an agent environment, that raises the risk of over-triggering a skill that performs network publishing, deployment, or DNS-related actions when the user did not explicitly request those sensitive operations.

External Transmission

Medium
Category
Data Exfiltration
Content
import { execSync, spawn } from 'node:child_process';

const BASE = 'https://api.cloudflare.com/client/v4';

function parseFlags(args) {
  const flags = { _: [] };
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
Tunnel mode silently escalates from using an expected dependency to installing software via `brew install cloudflared` if it is missing. Auto-installing and executing external software is an unnecessary and risky capability for this helper because it changes the host system and trusts external package sources during normal operation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The script runs `npx -y serve` without pinning a specific version, so each execution may fetch and execute whatever package version is current on the registry at runtime. In a skill that is supposed to launch and host sites, this creates a supply-chain execution path where a compromised package, typo-squat, or malicious update can lead to arbitrary code execution on the user's machine.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
When given a directory, the tool launches `npx` to download and run `serve` dynamically, then exposes that content through a public tunnel. This combines unpinned remote code execution with external exposure of local content, making the skill context more dangerous because the feature is explicitly designed to publish data from the local machine.

Intent-Code Divergence

Low
Confidence
97% confidence
Finding
The inline setup documentation says Layer 1 needs no setup because `cloudflared` installs automatically via Homebrew if missing. However, the manifest's `requires.bins` list explicitly declares `cloudflared` as required, indicating the skill expects it to already exist rather than auto-installing it. This is a direct documentation-versus-declared-behavior contradiction.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.secret_argv_exposure

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
site.js:67

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
site.js:43

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
README.md:87