Back to skill

Security audit

Aegis Bridge

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it encourages unattended approval of coding-agent permissions and installs an unpinned persistent MCP command, which users should review carefully before installing.

Review this skill before installing. Prefer project-scoped MCP setup over user-scoped setup, pin or locally verify the `aegis-bridge` executable instead of relying on bare `npx`, and do not use the provided auto-approval heartbeat template unless it runs in a tightly isolated environment with explicit allowlists and audit logging. Treat prompts, transcripts, raw terminal output, and approval requests as sensitive.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Error
Location
scripts/setup-mcp.sh:18
Finding

Unpinned npm Package Persisted as an MCP Executable

Content
View full analysis
/dev/null; then if [ "$SCOPE" = "user" ]; then claude mcp add --scope user aegis -- npx aegis-bridge mcp --port "$PORT" else claude mcp add --scope project aegis -- npx aegis-bridge mcp --port "$PORT" fi ``` The fallback configuration creates the same unpinned command: ```bash jq --arg port "$PORT" ' .mcpServers = (.mcpServers // {}) | .mcpServers.aegis = { "command": "npx", "args": ["aegis-bridge", "mcp", "--port", $port] } ' "$CONFIG_FILE" > "$TMP" && mv "$TMP" "$CONFIG_FILE" ``` ### Technical Analysis The setup script registers the bare npm package name `aegis-bridge` as an MCP executable through `npx`. It does not specify an exact package version, integrity hash, lockfile, verified registry, or trusted local installation path. The resulting command is stored in either the user-level Claude configuration or the project-level MCP configuration. Subsequent MCP launches can therefore resolve package content that was not included in, or reviewed as part of, this project. The effective executable may change when a new package release is published or if the package registry, publisher account, or dependency chain is compromised. Because an MCP server is a locally executed process, resolved package code runs with the privileges of the user launching Claude Code. This is materially more dangerous than using an unpinned library solely for build-time development. ### Attack Path 1. A user runs `scripts/setup-mcp.sh` with either user or project scope. 2. The script stores `npx aegis-bridge mcp --port ...` in Claude’s MCP configuration. 3. An attacker compromises the `aegis-bridge` npm package, its publisher account, registry resolution, or one of its tr ...[truncated 1179 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/heartbeat-template.md:51
Finding

Heartbeat Automation Blindly Approves Permission and Bash Execution Prompts

Content
View full analysis
/dev/null) echo "Agent asks: $QUESTION" # Default: approve. Customize per use case. curl -sf -X POST http://127.0.0.1:9100/v1/sessions/$SID/send \ -H "Content-Type: application/json" \ -d '{"text":"Proceed with your best judgment."}' ;; ``` The workflow documentation explicitly recommends this behavior: ```markdown ## 1) Implement Issue 1. Create session with issue prompt. 2. Poll status with heartbeat loop. 3. Auto-approve permission prompts. 4. Read summary and transcript tail. ``` ### Technical Analysis The heartbeat template handles `permission_prompt` and `bash_approval` through the same unconditional `/approve` request. It does not retrieve or validate the requested command, inspect affected paths, distinguish read-only operations from destructive operations, apply an allowlist, or require human confirmation. A permission prompt is a security boundary intended to prevent an Agent from executing sensitive tools or shell commands without authorization. Automatically approving every prompt removes that boundary. The behavior is especially dangerous in workflows that process untrusted repository content, issue descriptions, pull requests, build scripts, test fixtures, or generated tool output. The `ask_question` branch further delegates unresolved decisions to the ...[truncated 2201 chars]
Remediation
View remediation
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description presents the skill as an orchestration tool for creating and managing Claude Code sessions via Aegis. However, the supplied code does not orchestrate sessions or interact with Claude Code tasks beyond checking readiness. Its actual purpose is to verify that the Aegis server is reachable at /v1/health and to perform a best-effort MCP configuration presence check in local files. This is a materially different primary purpose from session spawning/orchestration, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents the skill as an orchestration tool for spawning and managing Claude Code sessions through Aegis. However, the provided code does not orchestrate sessions, create agents, review PRs, fix CI, or perform any workflow actions. Its sole function is setup/configuration: registering an MCP server named 'aegis' in Claude Code settings. That is materially different from the declared primary purpose. While configuration may support the described workflow, the code chunk itself implements only installation/setup behavior, so the description does not accurately represent the actual behavior.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% 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 · references/api-quick-ref.md (reported line 108)May include surrounding context.

md
| `get_status` | `GET /v1/sessions/:id` + `/health` |
| `get_transcript` | `GET /v1/sessions/:id/read` |
| `send_message` | `POST /v1/sessions/:id/send` |
| `kill_session` | `DELETE /v1/sessions/:id` |
| `approve_permission` | `POST /v1/sessions/:id/approve` |
| `reject_permission` | `POST /v1/sessions/:id/reject` |
| `escape_session` | `POST /v1/sessions/:id/escape` |

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/heartbeat-template.md (reported line 41)May include surrounding context.

md
STALLED=$((ELAPSED - STALL_START))
        if [ "$STALLED" -gt "$STALL_THRESHOLD" ]; then
          echo "STALL detected (${STALLED}s without progress). Sending nudge."
          curl -sf -X POST http://127.0.0.1:9100/v1/sessions/$SID/send \
            -H "Content-Type: application/json" \
            -d '{"text":"Continue. What is blocking you?"}'
          STALL_START=$ELAPSED  # reset stall timer

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · scripts/health-check.sh (reported line 33)May include surrounding context.

sh
fi

# Best-effort MCP config check
USER_CFG="$HOME/.claude/settings.json"
PROJECT_CFG=".mcp.json"
HAS_MCP=0

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · scripts/setup-mcp.sh (reported line 3)May include surrounding context.

sh
#!/usr/bin/env bash
# Configure Aegis MCP server in Claude Code settings.
# Adds an "aegis" MCP entry to ~/.claude/settings.json or project .mcp.json.
set -euo pipefail

SCOPE="${1:-user}"

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

This code writes to $HOME/.claude/settings.json, modifying a user-wide Claude Code configuration file to add a new MCP server entry. While this is the stated purpose of the setup script and not inherently malicious, it changes a trusted config location that can cause future automatic execution of the configured command, increasing persistence and trust-boundary risk if the package or bridge is compromised.

Content

Scanner excerpt · scripts/setup-mcp.sh (reported line 12)May include surrounding context.

sh
if [ "$SCOPE" = "project" ]; then
  CONFIG_FILE=".mcp.json"
else
  CONFIG_FILE="$HOME/.claude/settings.json"
  mkdir -p "$(dirname "$CONFIG_FILE")"
fi

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill clearly instructs use of shell commands and system-affecting operations, but it does not declare any explicit tool scope such as allowed tools or permissions. That omission weakens policy transparency and increases the chance the skill is invoked in contexts where shell/network-capable behavior is broader than intended.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Broad trigger phrases like 'aegis', 'parallel agents', and 'send to CC' can cause accidental invocation in unrelated contexts, increasing the chance that session orchestration, shell commands, or permission-handling guidance is surfaced when not intended. For a skill that can lead to command execution and approval of actions, over-broad activation materially raises misuse risk.

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 · SKILL.md (reported line 12)May include surrounding context.

md
## Prerequisites

1. Aegis server running: `curl -s http://127.0.0.1:9100/v1/health`
2. MCP configured (optional, for native tool access): see [scripts/setup-mcp.sh](scripts/setup-mcp.sh)
3. Verify health: `bash scripts/health-check.sh`

External Transmission

Medium
Category
Data Exfiltration
Confidence
78% confidence
Finding

This transmits arbitrary task text to a local HTTP service that brokers Claude Code sessions, potentially including sensitive source code, secrets, or internal instructions. Although the destination is localhost and aligned with the skill's purpose, the skill does not include guidance to minimize sensitive data exposure or verify the local bridge's trustworthiness.

Content

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

MCP: send_message(sessionId, text) HTTP:

bash
curl -s -X POST http://127.0.0.1:9100/v1/sessions/$SID/send \
  -H "Content-Type: application/json" \
  -d '{"text":"Your task here"}'

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs operators to approve permission prompts, bash approvals, and trust-folder actions as part of normal workflow without an upfront safety warning or strict decision criteria. This can normalize unsafe approvals and lead to arbitrary command execution, workspace trust changes, or other system-impacting actions being authorized too casually.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
81% confidence
Finding

Reading full transcripts from the local bridge can expose sensitive code, credentials, command output, and user inputs to whatever process or operator is invoking the skill. In this context transcript access is part of core functionality, but without safeguards it expands the exposure surface for sensitive session data.

Content

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

md
### Step 5: Read Transcript

**MCP**: `get_transcript(sessionId)`
**HTTP**: `curl -s http://127.0.0.1:9100/v1/sessions/$SID/read`

Returns `{ messages[], status, statusText }`. Each message: `{ role, contentType, text, timestamp }`.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The template explicitly tells agents to commit changes when done, but it does not require user approval, a review checkpoint, or any warning that commits are state-changing actions. In an orchestration skill designed to spawn coding agents, this increases the risk of unauthorized or premature repository mutations, especially when combined with broad implementation scopes.

Content

No source excerpt is available for this finding.

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The quick reference documents high-risk endpoints for arbitrary bash execution, slash-command execution, session interruption, approval, and deletion without any adjacent warnings, authorization notes, or operator-safety guidance. In the context of an orchestration skill that can spawn and control Claude Code sessions, this normalizes dangerous actions and increases the chance that downstream agents or users invoke destructive capabilities without understanding their impact.

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/heartbeat-template.md (reported line 41)May include surrounding context.

md
STALLED=$((ELAPSED - STALL_START))
        if [ "$STALLED" -gt "$STALL_THRESHOLD" ]; then
          echo "STALL detected (${STALLED}s without progress). Sending nudge."
          curl -sf -X POST http://127.0.0.1:9100/v1/sessions/$SID/send \
            -H "Content-Type: application/json" \
            -d '{"text":"Continue. What is blocking you?"}'
          STALL_START=$ELAPSED  # reset stall timer

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The template automatically approves permission prompts and plan-mode decisions without any trust check, user confirmation, or command inspection. In a workflow that drives an autonomous coding agent, this can authorize file modifications, command execution, or other sensitive actions that a human would normally review, materially increasing the risk of unsafe or unintended operations.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This sends an unconditional reply of 'Proceed with your best judgment' whenever the agent asks a question, bypassing human review at the point where the agent explicitly needs clarification or approval. In context, this increases unsafe autonomy and can cause the agent to continue with risky assumptions, including sensitive changes or commands the operator never intended.

Content

Scanner excerpt · references/heartbeat-template.md (reported line 63)May include surrounding context.

md
QUESTION=$(echo "$RESP" | jq -r '.messages[-1].text' 2>/dev/null)
      echo "Agent asks: $QUESTION"
      # Default: approve. Customize per use case.
      curl -sf -X POST http://127.0.0.1:9100/v1/sessions/$SID/send \
        -H "Content-Type: application/json" \
        -d '{"text":"Proceed with your best judgment."}'
      ;;

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

Documenting permission handling as 'Auto-approve' normalizes unsafe autonomous authorization in a tool specifically designed to orchestrate coding-agent sessions. In this context, operators may adopt the insecure default and unknowingly allow execution or approval of actions that should require human scrutiny.

Content

Scanner excerpt · references/heartbeat-template.md (reported line 103)May include surrounding context.

md
| `MAX_WAIT` | 600s | Maximum time before timeout |
| `POLL_INTERVAL` | 5s | How often to check status |
| `STALL_THRESHOLD` | 150s | Time without progress before nudging |
| Permission handling | Auto-approve | Change to log/reject for untrusted commands |

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The example promotes autonomous approval of permission prompts, effectively delegating trust decisions to automation without operator validation. In a multi-agent workflow tool, this materially increases risk because the spawned session may request capabilities that enable code changes, command execution, or access to sensitive data, and automatic approval bypasses the intended guardrail.

Content

Scanner excerpt · references/workflow-examples.md (reported line 9)May include surrounding context.

  1. Create session with issue prompt.
  2. Poll status with heartbeat loop.
  3. Auto-approve permission prompts.
  4. Read summary and transcript tail.
bash

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The workflow explicitly instructs users to auto-approve permission prompts, removing a key human safety checkpoint before privileged or potentially destructive actions. In an orchestration skill that spawns and drives coding agents, this can let an agent perform filesystem, network, or code-modifying operations without meaningful review, increasing the chance of unsafe changes or abuse.

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/agent-template.md (reported line 44)May include surrounding context.

  1. Read summary and transcript tail.
bash
SID=$(curl -s -X POST http://127.0.0.1:9100/v1/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "workDir": "/repo/aegis",

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/heartbeat-template.md (reported line 85)May include surrounding context.

  1. Read summary and transcript tail.
bash
SID=$(curl -s -X POST http://127.0.0.1:9100/v1/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "workDir": "/repo/aegis",

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/workflow-examples.md (reported line 13)May include surrounding context.

  1. Read summary and transcript tail.
bash
SID=$(curl -s -X POST http://127.0.0.1:9100/v1/sessions \
  -H "Content-Type: application/json" \
  -d '{
    "workDir": "/repo/aegis",