Back to skill

Security audit

Action Gate Bridge

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent but routes high-impact actions through unauthenticated local HTTP helpers that could be spoofed or misused if treated as an approval boundary.

Review before installing. Use this only with a trusted, authenticated action-gate sidecar/proxy, restrict endpoint configuration, require explicit user approval for red actions, and avoid routing sensitive request bodies or credential references until the bridge validates and authenticates responses.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/propose-action.js:2
Finding

Unauthenticated Action-Gate Sidecar Can Forge Approval Decisions

Content
View full analysis

Vulnerability Details

File Location: scripts/propose-action.js, lines 2-23
Vulnerability Type: Unauthenticated local tool/API spoofing
Risk Level: Medium

Vulnerable Code

javascript
const base = process.env.ACTION_GATE_URL || "http://localhost:8787";

const input = {
  source: process.argv[2] || "communications",
  actionType: process.argv[3],
  target: process.argv[4],
  summary: process.argv[5],
  payloadSummary: process.argv[6] || "",
  program: process.argv[7] || "",
};

async function main() {
  if (!input.actionType || !input.target || !input.summary) {
    throw new Error(
      "Usage: propose-action.js <source> <actionType> <target> <summary> [payloadSummary] [program]",
    );
  }

  const res = await fetch(`${base}/v1/proposals`, {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify(input),
  });

The corresponding workflow in references/action-bridge.md, lines 14-16, treats the sidecar's decision as authoritative:

markdown
4. let the sidecar return `allowed`, `needs_approval`, `blocked`, or `accepted`
5. only then decide what to show the user
6. if approved and an execution adapter exists, execute behind the sidecar

Technical Analysis

The client submits action details to an HTTP endpoint without authenticating the sidecar or verifying the integrity and origin of its response. The endpoint can be replaced through ACTION_GATE_URL, while the default endpoint uses unauthenticated plaintext HTTP on localhost.

A malicious process capable of binding to port 8787, or an attacker capable of controlling the environment variable or intercepting a non-loopback plaintext connection, can impersonate the action gate. The client also does not validate the HTTP status, response content type, response schema, approval nonce, expiration, or cryptographic binding between a response a ...[truncated 1613 chars]

Remediation
View remediation

Remediation Suggestions

  • Authenticate the sidecar with a per-session bearer token, mutually authenticated TLS, or a Unix-domain socket protected by strict filesystem permissions.
  • Require HTTPS for every non-loopback endpoint and reject insecure remote URLs.
  • Restrict endpoint configuration to an explicit allowlist of trusted schemes, hosts, and ports.
  • Validate successful HTTP status codes, expected content type, and a strict response schema before processing a decision.
  • Cryptographically bind each approval to the exact action payload, user identity, one-time nonce, policy version, and short expiration time.
  • Distinguish sidecar receipt from approval: accepted should not be interpreted as user authorization.
  • Fail closed when sidecar authentication, response verification, or policy evaluation fails.
  • Require an independently verifiable user-approval artifact before execution of red-category actions.

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/route-http-write.js:2
Finding

Unauthenticated HTTP Write Proxy Can Be Impersonated

Content
View full analysis

Vulnerability Details

File Location: scripts/route-http-write.js, lines 2-36
Vulnerability Type: Unauthenticated write-proxy spoofing and request-data exposure
Risk Level: Medium

Vulnerable Code

javascript
const base = process.env.CRABTRAP_HTTP_PROXY_URL || "http://localhost:8795";

const [
  ,
  ,
  source = "communications",
  target = "http-target",
  summary = "HTTP write routed via action gate",
  path = "/",
  bodyJson = "{}",
  program = "External API",
  credentialsRef = "",
] = process.argv;

async function main() {
  const body = JSON.parse(bodyJson);
  const res = await fetch(`${base}/v1/http/requests`, {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify({
      source,
      target,
      summary,
      program,
      execution: {
        adapter: "http_json",
        ...(credentialsRef ? { credentialsRef } : {}),
      },
      request: {
        method: "POST",
        path,
        body,
      },
    }),
  });

Technical Analysis

The script routes write-request information to a configurable proxy without authenticating that proxy. The default transport is plaintext HTTP, and CRABTRAP_HTTP_PROXY_URL can redirect the request to another endpoint.

The submitted object may contain an external target, operation summary, request path, complete JSON body, program name, and a credential-reference identifier. A process impersonating the proxy can collect this information and return an arbitrary response. The script does not check the HTTP status, verify response integrity, enforce a response schema, or establish that the proxy is the intended trusted sidecar.

The credentialsRef value is a reference rather than necessarily the underlying credential, so the code does not prove direct credential disclosure. It may nevertheless expose sensitive identifier and routing information that could ...[truncated 1384 chars]

Remediation
View remediation

Remediation Suggestions

  • Authenticate the proxy with mTLS, a scoped per-session token, or a permission-restricted Unix-domain socket.
  • Prohibit plaintext HTTP for non-loopback endpoints and validate the configured URL against an explicit allowlist.
  • Use signed requests and responses containing a nonce, timestamp, request digest, and short expiration.
  • Validate response status, content type, and schema; reject unknown decision values and fail closed on errors.
  • Avoid sending sensitive request bodies until the action has been independently approved.
  • Minimize metadata disclosed to the proxy and use opaque, narrowly scoped, short-lived credential references.
  • Ensure credential references can only be resolved by the authenticated legitimate sidecar and cannot be reused by unrelated processes.
  • Clearly distinguish “request received,” “approved,” and “executed,” and require verifiable execution evidence before reporting success.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (1)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs use of Node helper scripts that perform outbound communication actions and likely rely on network and environment-backed credentials, but the manifest does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch weakens reviewability and enforcement boundaries, increasing the chance that a host grants broader capabilities than intended or that risky write paths are invoked without clear least-privilege constraints.

Content

No source excerpt is available for this finding.