Back to skill

Security audit

Flux

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it gives agents networked delete and admin configuration power over shared persistent state with weak scoping and token-safety warnings.

Install only if you trust the Flux endpoint and the operators of the shared state service. Use narrowly scoped tokens, avoid setting FLUX_ADMIN_TOKEN unless an admin action is explicitly needed, do not publish secrets or personal data, and treat delete, batch-delete, and admin-config updates as privileged actions requiring human confirmation.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/flux.sh:3
Finding

Unrestricted API Endpoint Can Expose Bearer Credentials over Untrusted or Plaintext Connections

Content
View full analysis

Vulnerability Details

File Location: scripts/flux.sh:3-24, scripts/flux.sh:145-148
Vulnerability Type: Unrestricted credential transmission to a caller-controlled endpoint
Risk Level: Medium

Vulnerable Code

bash
FLUX_URL="${FLUX_URL:-https://api.flux-universe.com}"
FLUX_TOKEN="${FLUX_TOKEN:-}"
FLUX_ADMIN_TOKEN="${FLUX_ADMIN_TOKEN:-}"

# Helper function for API calls
api_call() {
    local method=$1
    local endpoint=$2
    local data=$3
    local auth_header=""

    if [[ -n "$FLUX_TOKEN" ]]; then
        auth_header="-H \"Authorization: Bearer ${FLUX_TOKEN}\""
    fi

    local -a cmd=(curl -s -X "$method" "${FLUX_URL}${endpoint}" -H "Content-Type: application/json")

    if [[ -n "$FLUX_TOKEN" ]]; then
        cmd+=(-H "Authorization: Bearer ${FLUX_TOKEN}")
    fi

    if [[ -n "$data" ]]; then
        cmd+=(-d "$data")
    fi

    "${cmd[@]}"
}

The administrative request has the same endpoint-trust issue:

bash
curl -s -X PUT "${FLUX_URL}/api/admin/config" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer ${FLUX_ADMIN_TOKEN}" \
    -d "$2" | format_output

Technical Analysis

FLUX_URL is accepted directly from the process environment and used as the destination for authenticated curl requests. The script does not validate the URL scheme, hostname, port, embedded user information, or whether the destination is an approved Flux deployment.

Consequently, both FLUX_TOKEN and the more privileged FLUX_ADMIN_TOKEN can be transmitted to an arbitrary destination selected through FLUX_URL. The project documentation explicitly supports HTTP for local deployments, but the implementation does not restrict plaintext HTTP to loopback addresses. A value such as http://attacker.example would therefore cause the script to send bearer credentials and request data without transport encryption to that server.

This issue req ...[truncated 2127 chars]

Remediation
View remediation

Remediation Suggestions

  1. Parse and validate FLUX_URL before making any request. Permit only https:// for remote hosts.
  2. Allow plaintext http:// only for explicitly recognized loopback destinations such as localhost, 127.0.0.1, and [::1].
  3. Reject unsupported schemes, embedded credentials, malformed URLs, and unexpected URL components.
  4. Consider an allowlist of trusted Flux hostnames, especially before transmitting FLUX_ADMIN_TOKEN.
  5. Require a deliberate opt-in such as FLUX_ALLOW_INSECURE_LOCAL_HTTP=1 for development-only plaintext connections, and emit a prominent warning.
  6. Separate administrative endpoint configuration from ordinary API configuration so changing the normal endpoint cannot silently redirect an administrative credential.
  7. Avoid sending any authorization header until endpoint validation succeeds.
  8. Configure short-lived, narrowly scoped tokens and provide a documented revocation and rotation process for credentials that may have been exposed.
  9. Add automated tests confirming that remote HTTP URLs, non-HTTP schemes, embedded URL credentials, and unapproved hosts are rejected.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description frames the skill as a coordination/state-sharing utility, but the documented behavior includes destructive deletion, connector credential handling, diagnostics, and admin configuration updates. This mismatch can mislead agents and users into granting or invoking broader authority than intended, increasing the chance of unauthorized or unsafe actions.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

Documenting direct entity-deletion endpoints in a broadly described coordination skill creates a high-risk path for parameter abuse, such as deleting arbitrary entities, namespaces, or prefixes if an agent passes attacker-influenced identifiers. Because the state is shared and persistent, misuse can disrupt other agents and erase operational data.

Content

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

md
- `GET /api/state/entities/:id` — Get specific entity

**Entity Management:**
- `DELETE /api/state/entities/:id` — Delete single entity
- `POST /api/state/entities/delete` — Batch delete (by namespace/prefix/IDs)

**Real-time Updates:**

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

Connector token storage/removal endpoints are sensitive administrative functions, and exposing them in a general-purpose skill increases the chance that attacker-controlled connector names or prompts trigger credential manipulation. This can disable integrations, rotate out valid secrets, or facilitate credential misuse if combined with shell/network access.

Content

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

md
**Connectors:**
- `GET /api/connectors` — List connectors and status
- `POST /api/connectors/:name/token` — Store PAT credential
- `DELETE /api/connectors/:name/token` — Remove credential

**Admin:**
- `GET /api/admin/config` — Read runtime config

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
96% confidence
Finding

The tool exposes a direct DELETE operation over shared state using user-controlled entity IDs, enabling destructive actions through a general-purpose coordination skill. In this skill context, the danger is elevated because agents expecting benign publish/query access could be induced to erase critical shared entities or operational state.

Content

Scanner excerpt · scripts/flux.sh (reported line 127)May include surrounding context.

sh
encoded_id=$(echo "$entity_id" | sed 's|/|%2F|g')
        echo "Deleting entity ${entity_id}..."
        api_call DELETE "/api/state/entities/${encoded_id}" | format_output
        ;;

    batch-delete)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documented purpose of the skill is shared-state publishing/querying, yet the code can read and modify administrative runtime configuration. Hidden admin functionality materially expands the trust boundary: an agent granted this skill for coordination could unexpectedly gain control over system-wide behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Administrative runtime configuration management is not justified by the stated use case of event publishing and state querying. Exposing config mutation in a general-purpose coordination skill increases the blast radius from ordinary state updates to platform-wide reconfiguration, enabling outages, policy bypass, or unsafe connector behavior if misused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README encourages agents and users to publish observations into a persistent, shared, event-sourced system, but it does not warn that submitted data may be durable, broadly visible to other agents, and difficult or impossible to retract. In a multi-agent shared-state context, this increases the risk of leaking secrets, personal data, internal infrastructure details, or other sensitive operational information through normal documented use.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill exposes shell-based operational capabilities but does not declare any tool scope or permission boundaries. That omission makes it easier for an agent or caller to invoke networked and potentially destructive actions without clear policy gating, especially because the documented commands include reads, deletes, and admin functions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill documents deletion and admin-update workflows as normal operations without warnings, safeguards, or confirmation guidance. In a shared persistent state system, that increases the risk of accidental data loss, service misconfiguration, or unsafe automated use by agents that interpret the examples as routine and approved.

Content

No source excerpt is available for this finding.

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/flux.sh (reported line 19)May include surrounding context.

sh
auth_header="-H \"Authorization: Bearer ${FLUX_TOKEN}\""
    fi

    local -a cmd=(curl -s -X "$method" "${FLUX_URL}${endpoint}" -H "Content-Type: application/json")

    if [[ -n "$FLUX_TOKEN" ]]; then
        cmd+=(-H "Authorization: Bearer ${FLUX_TOKEN}")

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill metadata describes publish/query behavior, but the implementation also exposes destructive delete and batch-delete operations. This capability mismatch is dangerous because downstream agents or users may invoke the skill under the assumption it is read/write state coordination only, while it can actually remove shared state and disrupt other systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Admin configuration updates are executed immediately with whatever JSON is passed, without warning, preview, or confirmation. For a sensitive operation that can alter runtime behavior, this raises the risk of accidental or coerced destructive changes by agents, scripts, or users operating under incomplete context.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
91% confidence
Finding

This outbound request sends arbitrary admin configuration changes to a remote service using an administrative bearer token. Because this operation is hidden within a non-admin skill context and accepts raw unvalidated JSON, misuse could remotely reconfigure the platform and impact all connected users or agents.

Content

Scanner excerpt · scripts/flux.sh (reported line 158)May include surrounding context.

sh
echo "Error: FLUX_ADMIN_TOKEN not set"
                exit 1
            fi
            curl -s -X PUT "${FLUX_URL}/api/admin/config" \
                -H "Content-Type: application/json" \
                -H "Authorization: Bearer ${FLUX_ADMIN_TOKEN}" \
                -d "$2" | format_output

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents HTTP endpoints for publishing events and querying entity state, which inherently transmit user or system data to a remote service. The reference does not include any warning about data sensitivity, privacy implications, or ensuring appropriate handling before sending or retrieving potentially sensitive payloads.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The help text says FLUX_TOKEN is an auth token for write operations, implying read-style commands do not use it. In practice, api_call attaches FLUX_TOKEN to every request when set, including GET requests such as get, list, connectors, admin-config read, and health.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.