Back to skill

Security audit

AWP - Agent Workflow Protocol

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent workflow generator, but several bundled templates can create publicly callable or highly privileged workflows without enough safety controls.

Install only if you are comfortable reviewing and tightening generated workflows before running or deploying them. Require authentication on any Cloudflare endpoint, restrict LLM endpoints and provider-specific keys, remove shell.execute unless absolutely needed, enable real sandbox and filesystem/network allowlists, pin dependencies with a lockfile, and define retention/deletion rules for memory and logs.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
templates/adapters/cloudflare/src/index.ts:27
Finding

Unauthenticated Public Workflow Execution Endpoint

Content
View full analysis
{ const body = await c.req.json<{ task: string }>(); if (!body.task) { return c.json({ error: "Missing 'task' in request body" }, 400); } try { const result = await executeWorkflow(c.env, body.task); return c.json(result); } catch (e) { const message = e instanceof Error ? e.message : String(e); return c.json({ error: message }, 500); } }); ``` ### Technical Analysis The generated Cloudflare Worker exposes a POST endpoint that immediately passes an arbitrary user-supplied task to `executeWorkflow`. No authentication, authorization, request signature, API token, origin restriction, or abuse-prevention control is applied. A request consequently invokes all eligible agents in the workflow using the deployment owner's LLM account and credentials. Depending on the generated workflow, execution may also invoke tools, process persistent memory, and write output to Cloudflare D1 or R2 storage. This violates least privilege because possession of the public Worker URL is sufficient to exercise the workflow owner's resources. The endpoint also returns complete workflow results to the requester. If those results include information derived from long-term memory, prior-agent output, internal data sources, or privileged tools, the endpoint could expose that information to an unauthenticated party. ### Attack Path 1. An attacker discovers or guesses the deployed `workers.dev` endpoint. 2. The attacker sends a POST request containing an arbitrary `task`. 3. The Worker invokes the configured agents using the operator's LLM credentials. 4. The agents process attacker-controlled instructions and may use enabled tools or persistent storage. 5. The attacker receives the generated workflow output ...[truncated 851 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
templates/adapters/cloudflare/src/llm.ts:56
Finding

LLM API Credential Can Be Sent to an Unrestricted Configurable Endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
extensions/examples/devops.md:307
Finding

Arbitrary Shell Command Execution Protected Only by a Bypassable Blocklist

Content
View full analysis
Dict[str, Any]: """Execute a shell command with safety checks. Args: command: Shell command to execute. timeout: Max execution time in seconds (max 60). """ timeout = min(timeout, 60) for pattern in BLOCKED_PATTERNS: if pattern.lower() in command.lower(): return { "ok": False, "status": 403, "data": {}, "error": f"Blocked: command matches dangerous pattern '{pattern}'", } try: result = subprocess.run( command, shell=True, capture_output=True, text=True, timeout=timeout, ) return { "ok": result.returncode == 0, "status": 200 if result.returncode == 0 else 500, "data": { "stdout": result.stdout[:10000], "stderr": result.stderr[:5000], "returncode": result.returncode, }, "error": result.stderr[:500] if result.returncode != 0 else None, } except subprocess.TimeoutExpired: return {"ok": False, "status": 408, "data": {}, "error": f"Timeout after {timeout}s"} ``` ### Technical Analysis The tool passes the complete `command` string to the operating-system shell with `shell=True`. The shell therefore interprets command separators, pipelines, substitutions, redirects, environment expansion, and executable lookup. The five blocked substrings do not form a meaningful security boundary. They leave almost every command available and can also be bypassed through equivalen ...[truncated 1747 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
templates/agent-full.awp.yaml:65
Finding

Full Agent Template Enables Excessive Tools Without an Active Sandbox

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
templates/adapters/cloudflare/package.json:11
Finding

Cloudflare Template Uses Unlocked Broad Dependency Version Ranges

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (58)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

There is a clear description-behavior mismatch. The declared purpose describes a generator for complete AWP multi-agent workflows and related files, driven by natural language input. The actual code chunk merely defines a basic AWPAgent subclass template with a hardcoded agent name placeholder and a default run method returning a fixed response. Its primary purpose is to serve as a scaffold for an individual agent implementation, not to generate multi-agent workflows or associated artifacts. No undeclared sensitive behavior is present, but the claimed core functionality is absent from the supplied code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The supplied code chunk does not generate AWP workflows or produce workflow files, configs, prompts, schemas, tools, or skills. Its actual role is a low-level adapter that sends chat messages to an LLM provider (either Cloudflare Workers AI or an OpenAI-compatible API such as OpenRouter) and parses the response into a JSON object. While this could be a supporting component within a larger workflow-generation system, the declared purpose describes an end-user workflow generator, whereas this code specifically performs external model calls and response parsing. It also accesses external/network resources and API credentials that are not reflected in the declared permissions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about generating AWP workflow artifacts from natural language input. The code chunk does not perform any generation, parsing, templating, or artifact creation. Instead, it provides persistence and memory-management utilities for Cloudflare Workers, mapping memory tiers to R2, D1, and KV, plus database initialization. This is a materially different primary purpose and introduces resource access/storage behavior not represented in the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description describes a system whose primary purpose is generating complete AWP multi-agent workflow artifacts from natural language input. The supplied code chunk instead is just a skeletal agent template: it subclasses AWPAgent, exposes a placeholder name, and returns a fixed default response from run(). There is no logic for parsing natural language, constructing workflows, emitting YAML or other files, generating prompts/schemas/configs, or creating tools/skills. This is a material description-behavior mismatch, not merely an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose centers on end-to-end generation of AWP multi-agent workflow artifacts from natural language descriptions. The actual code does not generate workflows or any of the listed project files. Instead, it provides a boilerplate Python template for defining one MCP tool, including registration, typed parameters, secret metadata, and standardized return formatting. This is a materially different primary purpose, so the description does not accurately represent the behavior of the supplied code chunk.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. Load this file (`SKILL.md`) -- base rules and generation process

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
1. Load this file (`SKILL.md`) -- base rules and generation process

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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 · extensions/examples/devops.md (reported line 318)May include surrounding context.

md
app = FastMCP("infra")

      BLOCKED_PATTERNS = ["rm -rf /", "DROP DATABASE", "DROP TABLE", "mkfs", "dd if="]

      @app.tool("infra.run_command")
      def run_command(*, command: str, timeout: int = 60) -> Dict[str, Any]:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% 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 · extensions/examples/devops.md (reported line 318)May include surrounding context.

md
app = FastMCP("infra")

      BLOCKED_PATTERNS = ["rm -rf /", "DROP DATABASE", "DROP TABLE", "mkfs", "dd if="]

      @app.tool("infra.run_command")
      def run_command(*, command: str, timeout: int = 60) -> Dict[str, Any]:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

The tool executes attacker-controlled input with subprocess.run(..., shell=True), which enables shell injection and arbitrary command execution. The surrounding blocklist is incomplete and easy to bypass with alternate syntax, encoding, chaining, variable expansion, or less obvious destructive commands, making this especially dangerous in a DevOps/infrastructure context.

Content

Scanner excerpt · extensions/examples/devops.md (reported line 338)May include surrounding context.

md
"error": f"Blocked: command matches dangerous pattern '{pattern}'",
                  }
          try:
              result = subprocess.run(
                  command, shell=True, capture_output=True, text=True, timeout=timeout,
              )
              return {

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'network' 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.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/agent-full.awp.yaml (reported line 103)May include surrounding context.

yaml
#   filesystem:
  #     read: ["data/"]
  #     write: ["data/output/"]
  #     deny: [".env", "**/*.key"]

  # --- Code Mode (alternative tool execution strategy) ---
  # Instead of calling tools one-by-one, the agent writes code against a

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · adapters/cloudflare-dynamic-workers.md (reported line 155)May include surrounding context.

md
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/mcp-tool.py (reported line 22)May include surrounding context.

python
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/workflow.awp.yaml (reported line 55)May include surrounding context.

yaml
Secrets:
  Tools can declare API keys they need via secrets=["KEY"] in the decorator.
  The AWP runtime injects them as a _secrets dict at call time — the LLM never
  sees these values. Declare keys in secrets.yaml at the workflow root.
"""

from __future__ import annotations

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
# --- Environment & Secrets (L0+) ---
# Declare required environment variables. Variables with sensitive: true
# are loaded from secrets.yaml > .env > os.environ and never logged.
# env:
#   required:
#     - name: SEARCH_API_KEY

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
# --- Environment & Secrets (L0+) ---
# Declare required environment variables. Variables with sensitive: true
# are loaded from secrets.yaml > .env > os.environ and never logged.
# env:
#   required:
#     - name: SEARCH_API_KEY

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · adapters/clawhub.md (reported line 155)May include surrounding context.

md
# --- Environment & Secrets (L0+) ---
# Declare required environment variables. Variables with sensitive: true
# are loaded from secrets.yaml > .env > os.environ and never logged.
# env:
#   required:
#     - name: SEARCH_API_KEY

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · templates/workflow.awp.yaml (reported line 55)May include surrounding context.

yaml
# --- Environment & Secrets (L0+) ---
# Declare required environment variables. Variables with sensitive: true
# are loaded from secrets.yaml > .env > os.environ and never logged.
# env:
#   required:
#     - name: SEARCH_API_KEY