Back to skill

Security audit

Shellbot Website

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Cloudflare deployment helper, but it needs review because its secret handling, mutable remote project generation, and local credential use create avoidable high-impact risks.

Install only if you are comfortable giving an agent Cloudflare edit authority. Prefer a narrowly scoped API token, avoid Wrangler OAuth fallback for agent runs, do not pass real secrets as command-line arguments, keep bulk secret files out of the repo and delete them after use, and review generated templates before deployment.

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 (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/manage-secrets.sh:93
Finding

Arbitrary Command Execution Through Bulk Secret Filename Injection

Content
View full analysis
" exit 1 fi if [[ ! -f "$BULK_FILE" ]]; then err "File not found: $BULK_FILE" exit 1 fi # Validate JSON before uploading if command -v jq &>/dev/null; then if ! jq empty "$BULK_FILE" 2>/dev/null; then err "Invalid JSON in $BULK_FILE" exit 1 fi elif command -v python3 &>/dev/null; then if ! python3 -c "import json; json.load(open('$BULK_FILE'))" 2>/dev/null; then err "Invalid JSON in $BULK_FILE" exit 1 fi fi wrangler secret bulk "$BULK_FILE" $ENV_FLAG ok "Secrets uploaded from $BULK_FILE" ;; ``` ### Technical Analysis `BULK_FILE` is derived from a user-controlled positional argument and interpolated directly into a Python program passed through `python3 -c`. Shell quoting does not protect the resulting Python source. A single quote in the filename can terminate the Python string literal and append additional Python statements. The preceding `[[ -f "$BULK_FILE" ]]` check does not prevent exploitation because Linux filenames may contain quotes, semicolons, spaces, and other characters used by Python syntax. The vulnerable branch is reached when `jq` is unavailable but `python3` is installed. ### Attack Path 1. An attacker creates a file with a specially crafted filename containing a single quote and valid Python statements. Conceptually, a filename such as the following can terminate `open(...)` and invoke an operating-system command: ```text x');__import__("os").system("id");# ``` 2. The attacker invokes the bulk operation using that filename: ```bash bash scripts/manage-secrets.sh bulk "
Remediation
View remediation
/dev/null; then err "Invalid JSON in $BULK_FILE" exit 1 fi ``` Additional hardening measures: 1. Prefer `jq` with a declared dependency instead of maintaining multiple validation implementations. 2. Reject files that are not regular files or that resolve outside an explicitly permitted project directory when such a restriction is compatible with the workflow. 3. Add tests using filenames containing quotes, spaces, newlines, semicolons, and leading hyphens. 4. Run static shell analysis such as ShellCheck and add injection-focused tests to CI. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/manage-secrets.sh:68
Finding

Secret Values Exposed Through Command-Line Arguments

Content
View full analysis
" exit 1 fi if [[ -z "$VALUE" ]]; then err "Value is required: $(basename "$0") put " err "Non-interactive mode only. Provide the value as an argument." exit 1 fi echo "$VALUE" | wrangler secret put "$KEY" $ENV_FLAG ok "Secret '$KEY' set" ;; ``` The documented invocation in `SKILL.md:254-268` reinforces this pattern: ```bash bash scripts/manage-secrets.sh put API_KEY "sk-..." bash scripts/manage-secrets.sh put API_KEY "sk-..." --env production ``` ### Technical Analysis The script requires the secret value to be supplied as a positional command-line argument. Although the value is subsequently piped to Wrangler through standard input, it has already been exposed in the command line used to launch `manage-secrets.sh`. Command-line arguments can be retained in shell history, terminal transcripts, Agent execution logs, CI job logs, audit telemetry, and process metadata. On systems where process arguments are visible to other local users or monitoring tools, the value may also be observable while the command is running. ### Attack Path 1. A user follows the documented command and supplies an API key or other secret as the second positional argument. 2. The invoking shell or Agent records the complete command. 3. A local user, log collector, CI operator, support bundle, or later process with access to the history or logs retrieves the plaintext value. 4. The exposed secret is reused against the service for which it is valid. ### Impact Assessment The impact depends on the permissions of the submitted secret. Exposure may allow unauthorized API access, data retrieval or modification, deploym ...[truncated 165 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/manage-secrets.sh:62
Finding

Wrangler Option Injection Through Unquoted Environment Flag Expansion

Content
View full analysis
" exit 1 fi if [[ -z "$VALUE" ]]; then err "Value is required: $(basename "$0") put " err "Non-interactive mode only. Provide the value as an argument." exit 1 fi echo "$VALUE" | wrangler secret put "$KEY" $ENV_FLAG ok "Secret '$KEY' set" ;; list) wrangler secret list $ENV_FLAG ;; delete) if [[ -z "$KEY" ]]; then err "Key is required: $(basename "$0") delete " exit 1 fi echo "y" | wrangler secret delete "$KEY" $ENV_FLAG ok "Secret '$KEY' deleted" ;; ``` The same unsafe expansion is also used for bulk upload at `scripts/manage-secrets.sh:114`: ```bash wrangler secret bulk "$BULK_FILE" $ENV_FLAG ``` ### Technical Analysis The environment option is assembled as a single string and later expanded without quotes: ```bash ENV_FLAG="-e $ENV" wrangler ... $ENV_FLAG ``` Unquoted shell expansion performs word splitting. Consequently, whitespace in a user-controlled `--env` value produces multiple command arguments. Values beginning with or containing additional supported Wrangler options can therefore change the effective command rather than remaining a single environment name. This is argument injection rather than shell metacharacter command injection: shell operators introduced through variable expansion are not reparsed as shell syntax. Nevertheless, injected Wrangler flags can redirect or modify an authenticated secret operation. ### Attack Path 1. An attacker or untrusted automation controls the value supplied to `--env`. 2. The value includes whites ...[truncated 680 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/create-project.sh:70
Finding

Unpinned Remote Project Generator and Unrestricted Template Source

Content
View full analysis
Remediation
View remediation
-- \ "$PROJECT_NAME" \ --template="$RESOLVED_TEMPLATE" \ "${C3_ARGS[@]}" ``` 2. Establish a controlled update process that reviews release notes and integrity information before changing the pinned version. 3. Restrict built-in templates to trusted Cloudflare repositories and immutable commit identifiers. 4. For custom templates, require an explicit trust confirmation and accept only approved repository hosts. 5. Resolve custom Git templates to a full commit SHA rather than a mutable branch or tag. 6. Consider performing generation in a sandbox or container without Cloudflare credentials or unrelated project access. 7. Disable or separately approve dependency lifecycle scripts where the generator supports doing so. 8. Record the resolved generator version and template commit in output or an audit log for reproducibility. ]]>
Vulnerability Patterns
  • 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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The code partially matches the declared description because it does scaffold Cloudflare Workers projects from a variety of templates and can optionally trigger deployment during creation. However, the declared purpose is much broader than what this code chunk actually implements. This script does not set up custom domains, manage secrets, provision resources directly, or perform any frontend design work. Its primary behavior is narrowly focused on project scaffolding with template selection and a few create-time flags. Therefore, the description materially overstates the capabilities represented by this supplied code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad end-to-end Cloudflare Workers skill for creating, designing, provisioning, and deploying micro apps and websites. The supplied code chunk only implements a deployment helper script around wrangler deploy, with authentication checks and optional environment/dry-run handling. While deployment is one subset of the declared purpose, the actual code does not implement the majority of the advertised capabilities such as scaffolding templates, resource provisioning, domain configuration, secrets management, or frontend design. This is a material description-versus-behavior mismatch because the primary described functionality is much broader than what this code actually does.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
86% confidence
Finding

The documented bulk secrets.json workflow implies handling a plaintext file of secrets without any warning about storage, permissions, logging, or source-control exposure. In a skill with Write/Read and deployment capabilities, this creates a meaningful credential access risk because secrets may persist on disk, be committed accidentally, or be harvested by other processes.

Content

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

md
bash scripts/manage-secrets.sh delete API_KEY

# Bulk upload from JSON
bash scripts/manage-secrets.sh bulk secrets.json

# Environment-specific
bash scripts/manage-secrets.sh put API_KEY "sk-..." --env production

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The manifest references npx create-cloudflare without version pinning, enabling execution of whatever version npm resolves at the time. This is a classic supply-chain exposure, especially risky here because scaffolded templates and post-create scripts may execute automatically and influence subsequent deployment steps.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The manifest references npx create-cloudflare without version pinning, enabling execution of whatever version npm resolves at the time. This is a classic supply-chain exposure, especially risky here because scaffolded templates and post-create scripts may execute automatically and influence subsequent deployment steps.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The manifest allows npx create-cloudflare* without an exact version, meaning project scaffolding may execute newly published code from npm at invocation time. Because this skill also handles deployment and secrets-related workflows, compromise of that upstream package could directly affect local files, generated code, and Cloudflare credentials.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The manifest allows npx create-cloudflare* without an exact version, meaning project scaffolding may execute newly published code from npm at invocation time. Because this skill also handles deployment and secrets-related workflows, compromise of that upstream package could directly affect local files, generated code, and Cloudflare credentials.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

If any command fails with authentication errors, tell user:

text
Get an API token from https://dash.cloudflare.com/profile/api-tokens
Use the "Edit Cloudflare Workers" template, or create a custom token with:
  Workers Scripts: Edit
  D1: Edit
  Workers KV Storage: Edit

Rp1

Medium
Category
MCP Rug Pull
Confidence
84% confidence
Finding

The prerequisites section instructs users to use npx wrangler, again relying on an unpinned remote package at execution time. While documentation alone is less dangerous than a directly invoked manifest command, it still normalizes insecure execution of mutable third-party code in a privileged deployment workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill documents teardown behavior but does not prominently warn that deleting workers and resources may be irreversible or destructive beyond the worker itself. In an agent-executed infrastructure skill, underemphasized destructive behavior increases the chance of accidental deletion of production assets or stateful resources.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The examples encourage passing secret values directly on the command line and bulk-uploading from a JSON file without an explicit warning about exposure. Command-line secrets may be captured in shell history, process listings, CI logs, or agent telemetry, making accidental credential disclosure more likely in a workflow already centered on infrastructure deployment.

Content

No source excerpt is available for this finding.

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 · references/custom-domains.md (reported line 14)May include surrounding context.

The setup-domain.sh script automates this. Under the hood it uses the Workers Custom Domains API:

bash
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/domains" \
  -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file recommends the error message "Please enter a date in MM/DD/YYYY format," which imposes a US-centric date format as a universal pattern. This is a natural-language locale policy concern because no user choice, locale awareness, or regional justification is provided.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script force-confirms secret deletion by piping "y" into wrangler secret delete, removing the only built-in safety check for a destructive action. In a secret-management tool for production Cloudflare Workers, this increases the chance of accidental or scripted deletion of critical credentials, which can cause outages or break deployments even without an external attacker.

Content

No source excerpt is available for this finding.

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 · references/custom-domains.md (reported line 14)May include surrounding context.

md
exit 1
fi

API_BASE="https://api.cloudflare.com/client/v4"
AUTH_HEADER="Authorization: Bearer $CLOUDFLARE_API_TOKEN"

# Get account ID if not set

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 · references/custom-domains.md (reported line 62)May include surrounding context.

md
exit 1
fi

API_BASE="https://api.cloudflare.com/client/v4"
AUTH_HEADER="Authorization: Bearer $CLOUDFLARE_API_TOKEN"

# Get account ID if not set

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 · references/custom-domains.md (reported line 154)May include surrounding context.

md
exit 1
fi

API_BASE="https://api.cloudflare.com/client/v4"
AUTH_HEADER="Authorization: Bearer $CLOUDFLARE_API_TOKEN"

# Get account ID if not set

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 · scripts/setup-domain.sh (reported line 79)May include surrounding context.

sh
exit 1
fi

API_BASE="https://api.cloudflare.com/client/v4"
AUTH_HEADER="Authorization: Bearer $CLOUDFLARE_API_TOKEN"

# Get account ID if not set

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 · scripts/setup-domain.sh (reported line 133)May include surrounding context.

sh
# Add custom domain to worker via API
info "Adding custom domain '$CUSTOM_DOMAIN' to worker '$WORKER_NAME'..."

DOMAIN_RESPONSE=$(curl -s -w "\n%{http_code}" -X PUT \
  -H "$AUTH_HEADER" \
  -H "Content-Type: application/json" \
  "$API_BASE/accounts/$ACCOUNT_ID/workers/domains" \

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · scripts/teardown.sh (reported line 23)May include surrounding context.

sh
--force|-f) FORCE=true; shift ;;
    -h|--help)
      echo "Usage: $(basename "$0") <worker-name> [--force]"
      echo "  --force, -f    Skip confirmation prompt"
      exit 0 ;;
    -*) err "Unknown option: $1"; exit 1 ;;
    *) WORKER_NAME="$1"; shift ;;

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown instructs the user to provide and use CLOUDFLARE_API_TOKEN in API calls, but it does not include any warning that the token is sensitive or should be protected from logs, shell history, and accidental sharing. For markdown files, missing warnings about behaviors affecting privacy or system integrity should be flagged when sensitive credentials are involved.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This shell script explicitly states that all prompts are auto-accepted, and later invokes a project creation command that writes files to disk and can optionally deploy or initialize git. While there are informational log lines, there is no clear user-facing warning in the script comments or usage text about filesystem changes or the implications of using --deploy.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.