Back to skill

Security audit

Cluster

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local clustering tool that stores and exports clustering runs in ways that are disclosed and aligned with its purpose, though users should be careful with saved dataset metadata and export paths.

Install only if you are comfortable with clustering results and source input paths being saved locally in ~/.cluster. Avoid using it on highly sensitive datasets unless local retention is acceptable, and be careful when setting OUTPUT because an existing file at that path can be overwritten.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • 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 (11)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The export command writes to an arbitrary path supplied via the OUTPUT environment variable with open(output, "w"), allowing overwrite of any file the current user can access. In an agent setting, this can be abused to clobber shell profiles, application configs, or other sensitive files outside the skill's data directory.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill describes command execution that reads environment variables and persistently writes clustering results and configuration under the user's home directory, but it declares no explicit tool scope or permissions. That mismatch can cause users or orchestration systems to grant broader access than expected and makes the skill's file-write behavior less transparent, increasing the risk of unintended data exposure or modification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill persists clustering run data, including source input file paths, parameters, assignments, centroids, and metrics, in ~/.cluster/data.jsonl, but the high-level description does not warn users about that persistent local storage. In a data-analysis context, this is especially risky because clustering inputs and outputs may contain sensitive or proprietary dataset information that users may assume is processed ephemerally.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
92% confidence
Finding

Automatic session persistence is present through creation of ~/.cluster and durable storage of run history/configuration. In this skill context, persistent retention is more dangerous because clustering commonly operates on user datasets whose metadata and derived results may be sensitive and need not be kept after execution.

Content

Scanner excerpt · scripts/script.sh (reported line 11)May include surrounding context.

sh
CONFIG_FILE="$DATA_DIR/config.json"
VERSION="1.0.0"

mkdir -p "$DATA_DIR"
touch "$DATA_FILE"

if [ ! -f "$CONFIG_FILE" ]; then

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill automatically creates and uses persistent storage under ~/.cluster for run history and configuration, even though the manifest only describes clustering analysis. This expands the skill from one-shot analysis into local state management, which can retain sensitive input-derived metadata and surprise users who did not expect persistence.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script silently persists run data and configuration under ~/.cluster without warning the user that input-derived details, file paths, metrics, assignments, and centroids will be stored. This creates privacy and data-retention risk, especially when clustering sensitive datasets.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script includes broad import/export, configuration, listing, and statistics features that go beyond the stated purpose of performing clustering analysis. These extra data-management capabilities increase attack surface and enable handling of arbitrary local files and retained records unrelated to core clustering.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The export path is used directly and existing files are overwritten without confirmation, backup, or visibility into the target location. This can lead to destructive data loss or unintended modification of user files even without a sophisticated exploit.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The config command permits arbitrary key/value writes to a persistent JSON configuration file, not just a fixed safe schema for clustering parameters. While the current script consumes only a few settings, this pattern enables unbounded local state manipulation beyond core execution and can become risky as the tool evolves or if other components trust that file.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/script.sh (reported line 635)May include surrounding context.

sh
if not runs:
    print("No clustering runs found.")
    print("Use 'run' command to create a new clustering run.")
    sys.exit(0)

if sort_by == "k":

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The config command persistently modifies ~/.cluster/config.json without disclosing that the change is durable or documented in help output. This is primarily a transparency and user-expectation problem that can cause confusing behavior across future runs.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.