Back to skill

Security audit

Ganglion

Security checks for vulnerabilities and agentic risk

Overview

This skill is an operational manual for Ganglion, but it broadly activates and documents powerful unauthenticated local HTTP operations that can read project source, write executable code, alter pipelines/prompts, run jobs, and roll back changes.

Install only in a trusted development environment. Keep the HTTP bridge bound to 127.0.0.1 unless you add authentication, TLS, firewalling, and access control yourself. Do not expose the bridge or MCP endpoints to a network casually, and require explicit review before using tool/agent registration, prompt updates, pipeline patches, MCP connection, run, or rollback commands. Prefer a virtual environment and pinned package versions.

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

Warning
Location
SKILL.md:67
Finding

Unpinned Third-Party Package Installation

Content
View full analysis
= 3.11, `LLM_PROVIDER_API_KEY` set (used by the LLM runtime). **Install:** `pip install ganglion` ``` `references/operations.md:3-8`: ```markdown ## First-Time Setup 1. **Install Ganglion:** ```bash pip install ganglion ``` ``` `references/troubleshooting.md:48-54`: ```markdown **Cause:** The `openai` Python package is not installed. **Fix:** ```bash pip install openai>=1.0 # or reinstall ganglion with all deps pip install ganglion ``` ``` ### Technical Analysis The installation instructions retrieve mutable third-party packages from the user's configured Python package index without pinning exact versions, validating package hashes, or using a reviewed lockfile. Consequently, the code ultimately executed by the Skill can change independently of the audited files. The repository does not contain the Ganglion implementation or a dependency lockfile that would allow the installed package and its transitive dependencies to be compared against a known-good artifact. The broad `openai>=1.0` constraint similarly permits future releases that were not part of this audit. This is not evidence that the named packages are currently malicious. The vulnerability is the absence of reproducible, integrity-verified dependency resolution. Relevant compromise scenarios include: - A future package release is compromised. - A transitive dependency is compromised. - The user has a malicious or incorrectly configured package index. - DNS, proxy, or repository credentials are compromised. - An unexpected package version introduces unsafe behavior. ### Attack Path 1. An attacker compromises a permitted package release, transiti ...[truncated 1226 chars]
Remediation
View remediation
" ``` 2. Generate and distribute a lockfile containing all transitive dependencies. 3. Require cryptographic hashes during installation: ```bash python3 -m pip install --require-hashes -r requirements.lock ``` 4. Document the expected package index and prevent unintended fallback to untrusted indexes: ```bash python3 -m pip install \ --index-url https://pypi.org/simple \ --require-hashes \ -r requirements.lock ``` 5. Publish expected package signatures or checksums and verify release provenance where supported. 6. Install the packages in a dedicated, non-privileged virtual environment rather than globally or as root. 7. Add automated dependency scanning and periodically regenerate the lockfile only after reviewing updates. 8. Quote the OpenAI version specifier in shell examples: ```bash python3 -m pip install "openai==" ``` Quoting also prevents the shell from interpreting `>` in `openai>=1.0` as output redirection. ]]>

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/commands.md:267
Finding

HTTP Bridge Can Expose Source, Mutation, and Code-Execution Operations Without Documented Authentication

Content
View full analysis
[--bot-id ] [--host ] [--port ] ``` | Argument | Required | Default | Description | |----------|----------|---------|-------------| | `project_dir` | Yes | — | Path to project directory (must contain `config.py`) | | `--bot-id` | No | `None` | Bot identifier for multi-bot knowledge | | `--host` | No | `127.0.0.1` | Host to bind | | `--port` | No | `8899` | Port to bind | ``` `references/commands.md:178-184` defines the bridge without documenting an authentication requirement: ```markdown ## HTTP Bridge API Base URL: `http://:` (default `http://127.0.0.1:8899`). All endpoints are under the `/v1/` prefix. Unversioned routes (e.g. `/status`) still work for backward compatibility but are deprecated. **Response envelope:** All successful responses are wrapped in `{"data": }`. Errors return `{"detail": {"error": {"code": "ERROR_CODE", "message": "..."}}}` with an appropriate HTTP status code (400, 403, 404, 500). Interactive API docs are available at `/v1/docs` (Swagger UI). ``` `references/commands.md:250-260` exposes project source files: ```markdown #### GET /v1/source/{path} Read any file in the project directory. Path traversal (`..`) is blocked. | Path Param | Description | |------------|-------------| | `path` | Relative path within project root | **Re ...[truncated 6022 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (48)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description claims this skill covers virtually all Ganglion project operations across CLI, API, pipeline execution, knowledge queries, configuration, and workflows. The supplied code, however, is a narrowly scoped healthcheck shell script. It only inspects environment prerequisites, local project structure, CLI status loading, remote health/readiness endpoints, running-state detection, and tool/agent counts. While some declared phrases like 'check status' overlap partially, the actual code does not support most of the declared capabilities. This is a material description-to-behavior mismatch due to overstating the skill's scope and primary purpose.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill says to use it for 'every task involving this project' and includes many generic trigger phrases, making accidental invocation likely. In a security-sensitive agent environment, overbroad activation increases the odds that an agent will reach for this skill in situations involving shell access, server startup, remote API calls, mutation, or rollback without sufficiently narrow user intent.

Content

No source excerpt is available for this finding.

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

sh
pass "Readiness probe OK at $GANGLION_URL/readyz"

        # Check if running
        RUNNING=$(curl -s "$GANGLION_URL/v1/status" 2>/dev/null | python3 -c "import sys,json; print(json.load(sys.stdin).get('data', {}).get('running', 'unknown'))" 2>/dev/null || echo "unknown")
        if [ "$RUNNING" = "False" ]; then
            pass "No pipeline currently running"
        elif [ "$RUNNING" = "True" ]; then

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

sh
fi

        # Check tool count
        TOOL_COUNT=$(curl -s "$GANGLION_URL/v1/tools" 2>/dev/null | python3 -c "import sys,json; print(len(json.load(sys.stdin).get('data', [])))" 2>/dev/null || echo "?")
        pass "Tools registered: $TOOL_COUNT"

        # Check agent count

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

sh
pass "Tools registered: $TOOL_COUNT"

        # Check agent count
        AGENT_COUNT=$(curl -s "$GANGLION_URL/v1/agents" 2>/dev/null | python3 -c "import sys,json; print(len(json.load(sys.stdin).get('data', [])))" 2>/dev/null || echo "?")
        pass "Agents registered: $AGENT_COUNT"

    elif [ "$HTTP_CODE" = "503" ]; then

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises and demonstrates shell execution (ganglion, curl, jq) but does not declare an explicit tool scope such as permissions or allowed-tools. In an agent setting, that increases the chance of unintended command execution against local systems or remote Ganglion endpoints because the activation scope is broad and the skill includes state-changing operations.

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 107)May include surrounding context.

ganglion run ./my-subnet --stage plan

Remote

curl -s -X POST "$GANGLION_URL/v1/run/pipeline" -H "Content-Type: application/json" -d '{}' | jq .data curl -s -X POST "$GANGLION_URL/v1/run/stage/plan" -H "Content-Type: application/json" -d '{}' | jq .data

text

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 · examples/common-workflows.md (reported line 260)May include surrounding context.

ganglion run ./my-subnet --stage plan

Remote

curl -s -X POST "$GANGLION_URL/v1/run/pipeline" -H "Content-Type: application/json" -d '{}' | jq .data curl -s -X POST "$GANGLION_URL/v1/run/stage/plan" -H "Content-Type: application/json" -d '{}' | jq .data

text

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 108)May include surrounding context.

Remote

curl -s -X POST "$GANGLION_URL/v1/run/pipeline" -H "Content-Type: application/json" -d '{}' | jq .data curl -s -X POST "$GANGLION_URL/v1/run/stage/plan" -H "Content-Type: application/json" -d '{}' | jq .data

text

### Mutate at Runtime (Remote Only)

External Transmission

Medium
Category
Data Exfiltration
Confidence
92% confidence
Finding

This example sends arbitrary tool code to a remote API for registration at runtime, effectively documenting remote code introduction into the system. In combination with broad activation scope and absent tool restrictions, this materially increases the risk of an agent facilitating code injection, persistence, or unsafe capability expansion on a Ganglion server.

Content

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

bash
# Register a tool
curl -s -X POST "$GANGLION_URL/v1/tools" -H "Content-Type: application/json" \
  -d '{"name":"my_tool","code":"<code>","category":"training"}' | jq .data

# Patch pipeline

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This example patches the pipeline over the network, changing execution behavior remotely. In an agent context, that is a sensitive state-changing action that can alter what code or agents run next, potentially leading to unauthorized workflow manipulation or service disruption if invoked accidentally or against an untrusted endpoint.

Content

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

-d '{"name":"my_tool","code":"","category":"training"}' | jq .data

Patch pipeline

curl -s -X PATCH "$GANGLION_URL/v1/pipeline" -H "Content-Type: application/json"
-d '{"operations":[{"op":"add_stage","stage":{"name":"validate","agent":"Validator","depends_on":["train"]}}]}' | jq .data

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documentation exposes destructive rollback commands, including undoing all mutations, without an explicit warning or confirmation requirement. In an agent-assisted workflow, such examples normalize dangerous administrative actions and could lead to accidental service disruption or loss of intended configuration state.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This example dynamically connects an external MCP server using a stdio command, which can expand the tool surface by launching or trusting external tooling at runtime. That creates a meaningful supply-chain and command-execution risk, especially in a broadly activated skill that may be used automatically by agents.

Content

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

md
# mcp_clients = [MCPClientConfig(name="weather", transport="stdio", command=["python", "-m", "weather_server"])]

# Dynamic: add at runtime via API
curl -s -X POST "$GANGLION_URL/v1/mcp/servers" -H "Content-Type: application/json" \
  -d '{"name":"weather","transport":"stdio","command":["python","-m","weather_server"]}' | jq .data

# Check connected MCP servers

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This workflow walks users through remotely mutating server state by registering executable tool code, patching pipeline stages, and then running the pipeline, but it gives no warning about side effects, authorization requirements, or the risk of executing untrusted code. In a system that exposes an HTTP bridge for live mutation, these actions can materially alter behavior and trigger code execution or destructive operations if used against the wrong instance.

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 · examples/common-workflows.md (reported line 100)May include surrounding context.

  1. Register a new tool:
    bash
    curl -s -X POST "$GANGLION_URL/v1/tools" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "evaluate_model",
    

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 · examples/common-workflows.md (reported line 111)May include surrounding context.

  1. Add a new stage to the pipeline:
    bash
    curl -s -X PATCH "$GANGLION_URL/v1/pipeline" \
      -H "Content-Type: application/json" \
      -d '{
        "operations": [{
    

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/operations.md (reported line 207)May include surrounding context.

  1. Add a new stage to the pipeline:
    bash
    curl -s -X PATCH "$GANGLION_URL/v1/pipeline" \
      -H "Content-Type: application/json" \
      -d '{
        "operations": [{
    

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/operations.md (reported line 225)May include surrounding context.

  1. Add a new stage to the pipeline:
    bash
    curl -s -X PATCH "$GANGLION_URL/v1/pipeline" \
      -H "Content-Type: application/json" \
      -d '{
        "operations": [{
    

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/operations.md (reported line 232)May include surrounding context.

  1. Add a new stage to the pipeline:
    bash
    curl -s -X PATCH "$GANGLION_URL/v1/pipeline" \
      -H "Content-Type: application/json" \
      -d '{
        "operations": [{
    

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 · examples/common-workflows.md (reported line 164)May include surrounding context.

  1. Run alpha:

    bash
    curl -s -X POST "http://127.0.0.1:8899/v1/run/pipeline" -H "Content-Type: application/json" -d '{}' | jq .data.success
    
  2. Run beta:

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 · examples/common-workflows.md (reported line 169)May include surrounding context.

  1. Run beta:

    bash
    curl -s -X POST "http://127.0.0.1:8900/v1/run/pipeline" -H "Content-Type: application/json" -d '{}' | jq .data.success
    
  2. Check shared knowledge from either bot:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The rollback section instructs users to revert the last mutation or all mutations back to index 0 without warning that these state changes may discard configuration history or undo desired runtime modifications. Broad rollback actions can cause operational disruption, especially in shared or long-running environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The sample requests include state-changing operations such as registering tools, patching the pipeline, and updating prompts, but provide no warning that these actions modify the running project and may introduce executable code or alter system behavior. In an agent skill meant to be used operationally, omission of side-effect warnings can cause unsafe copy-paste execution and unintended reconfiguration or code injection into the local Ganglion instance.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This example submits Python source code to the /v1/tools endpoint for registration, resulting in a file being written into the project tool directory. In the context of an agent skill that users may copy verbatim, demonstrating remote code registration without an explicit danger notice normalizes code injection into the local automation environment and could lead to arbitrary code execution if the endpoint is exposed or misused.

Content

Scanner excerpt · examples/sample-requests.md (reported line 200)May include surrounding context.

Register a Tool

bash
curl -s -X POST "$GANGLION_URL/v1/tools" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "analyze_results",

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

Even though this example shows a validation failure, it still demonstrates sending raw code to a tool-registration endpoint that processes and potentially persists executable content. In this skill context, the example lowers operator caution around a powerful mutation surface that can become an arbitrary-code-execution path if validation is bypassed or incomplete.

Content

Scanner excerpt · examples/sample-requests.md (reported line 214)May include surrounding context.

Register a Tool (Validation Failure)

bash
curl -s -X POST "$GANGLION_URL/v1/tools" \
  -H "Content-Type: application/json" \
  -d '{"name": "bad_tool", "code": "def bad_tool(x):\n    pass", "category": "misc"}' | jq

Static analysis

No suspicious patterns detected.