Back to skill

Security audit

super-agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it asks for broad agent-loop authority while persisting user goals and running other local skill scripts without strong scoping or verification.

Install only if you are comfortable with a broad, experimental agent-loop skill that can run other local skill scripts and retain task details across sessions. Avoid putting secrets, customer data, credentials, regulated information, or sensitive business plans in goals or notes, and review or delete the generated memory/state files after use. Use particular caution in shared, synced, or backup-managed skill directories.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Error
Location
scripts/loop.py:15
Finding

Unverified Execution of Scripts from Predictable Sibling Skill Paths

Content
View full analysis

Vulnerability Details

File Location: scripts/loop.py:15-40 (execution sites at lines 58-59, 88-89, and 110-111)
Vulnerability Type: Untrusted local dependency execution
Risk Level: High

Vulnerable Code

python
SKILLS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
SELF_DIR = os.path.dirname(__file__)

# Capability to script-path mapping
CAP_SCRIPTS = {
    "long-horizon-planner": os.path.join(SKILLS_DIR, "long-horizon-planner", "scripts", "planner.py"),
    "reason-verify": os.path.join(SKILLS_DIR, "reason-verify", "scripts", "verify.py"),
    "rag": os.path.join(SKILLS_DIR, "rag", "scripts", "rag_query.py"),
}

def _run(py, args, timeout=60):
    try:
        r = subprocess.run([sys.executable, py] + args, capture_output=True,
                           text=True, timeout=timeout)
        return r.returncode == 0, r.stdout + r.stderr
    except Exception as e:
        return False, str(e)

The mapped files are executed at the following call sites:

python
ok, out = _run(planner, ["init", "--goal", goal, "--horizon", "60", "--out", road])
python
ok, out = _run(rag, ["--index", idx, "--question", goal, "--topk", "1", "--out", tmp])
python
ok, out = _run(rv, ["reason", "--question", goal, "--answer", plan_text,
                    "--out", outp])

Technical Analysis

The Skill derives dependency locations from a shared parent directory and treats the existence of a Python file at the expected path as sufficient authorization to execute it. It does not verify the dependency's package identity, version, cryptographic hash, file ownership, permissions, trusted installation root, or provenance.

Although the subprocess command uses an argument list rather than a shell and is therefore not directly vulnerable to shell command injection, the Python script itself is an executable dependency. Any actor who can create or r ...[truncated 1687 chars]

Remediation
View remediation

Remediation Suggestions

  1. Install external Skills through an authenticated package-management process and pin exact versions.
  2. Maintain an allowlist containing an expected cryptographic hash or signed manifest for every executable dependency.
  3. Verify each dependency immediately before execution, including its resolved path, package identity, hash, ownership, and permissions.
  4. Reject symlinks and ensure the canonical dependency path remains inside an explicitly trusted, non-user-writable installation directory.
  5. Do not infer trust solely from a file's presence at a conventional path.
  6. Require explicit user approval before first use of an external Skill or when its identity or hash changes.
  7. Run dependencies in a sandbox with a minimal environment, restricted filesystem access, disabled network access unless required, resource limits, and reduced operating-system privileges.
  8. Prefer a narrow, validated data interface over executing arbitrary Python files. Validate all returned JSON against a strict schema.
  9. Record the verified dependency identity and version in the generated report to support auditing and incident response.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/loop.py:156
Finding

Persistent Plaintext Storage of Complete User Goals

Content
View full analysis

Vulnerability Details

File Location: scripts/loop.py:156-166
Vulnerability Type: Plaintext persistence of potentially sensitive user input
Risk Level: Medium

Vulnerable Code

python
def memorize(events, reflection, goal):
    """Persist this run's experience in agent_memory.jsonl."""
    mem = os.path.join(SELF_DIR, "agent_memory.jsonl")
    entry = {
        "ts": now(), "goal": goal,
        "n_events": len(events),
        "reflection": reflection.get("assessment"),
        "improve_intent": reflection.get("improve_intent"),
    }
    with open(mem, "a", encoding="utf-8") as f:
        f.write(json.dumps(entry, ensure_ascii=False) + "\n")

Additional caller-controlled output and state paths are written without explicit restrictive permissions at scripts/loop.py:181-185 and scripts/loop.py:201-207.

Technical Analysis

The goal value is direct user input from the required --goal command-line argument. memorize() appends that value in full to scripts/agent_memory.jsonl on every non-plan-only run.

No consent check, sensitivity classification, redaction, encryption, expiration policy, size limit, or deletion mechanism is applied. The file is created using ordinary process defaults, so its effective permissions depend on the runtime umask rather than an enforced owner-only policy.

Because the memory file is stored inside the Skill's script directory, it may also be unintentionally copied when the Skill directory is archived, synchronized, backed up, shared, or repackaged. The same goal is also included in the generated report, whose location may be selected by the caller.

Attack Path

  1. A user supplies a goal containing confidential information, such as an internal project description, customer information, infrastructure details, or a credential copied by mistake.
  2. The Skill completes its execution and calls memorize().
  3. The complete goal is appended in ...[truncated 1026 chars]
Remediation
View remediation

Remediation Suggestions

  1. Obtain explicit user consent before enabling cross-session memory.
  2. Do not persist the complete goal by default. Store a minimal, redacted summary containing only fields necessary for future operation.
  3. Detect and remove common secret formats and sensitive identifiers before persistence.
  4. Move runtime state out of the package directory into a dedicated per-user application-data directory.
  5. Create storage files atomically with owner-only permissions, such as mode 0600 on supported systems, rather than relying on the process umask.
  6. Encrypt sensitive persistent state using a platform-backed credential or key-management facility when confidentiality at rest is required.
  7. Add configurable retention limits, expiration, memory inspection, selective deletion, and complete purge functionality.
  8. Warn users not to include credentials or regulated data in goals and provide a no-memory execution option.
  9. Apply equivalent controls to reports and checkpoint files, including restrictive permissions and clear handling of caller-selected output paths.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The supplied code does not implement the declared 'super agent closed loop' behavior. Instead, it provides a generic persistence and analytics helper for skills: it records operations and failures, stores preferences, summarizes top capabilities and recurring errors, and emits simple heuristic suggestions once counts cross thresholds. While it loosely relates to 'continual memory' and 'self-reflection' in a minimal sense, it lacks the core declared functionality: no autonomous planning, no execution engine, no orchestration of other tools, no retrieval pipeline, no reasoning/verifier, no proactive goal management, and no end-to-end agent loop. Therefore the description materially overstates what the code actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill advertises and documents shell execution, subprocess orchestration, and file/state writes, but does not declare any explicit tool scope or permission boundaries. In an autonomous closed-loop agent, missing scope controls increases the risk of unrestricted command execution, unintended file modification, and unsafe chaining of capabilities beyond what a user expects.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation guidance is broad enough to match many ordinary requests for complex task completion, increasing the chance that this highly autonomous skill is invoked when a narrower, safer skill would suffice. Because the skill includes planning, tool orchestration, memory, and self-improvement, over-broad activation can amplify privileges and autonomy without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly describes cross-session memory that makes the agent 'stronger over time' without a privacy warning or consent mechanism. Cross-session memory can accumulate sensitive preferences, failures, goals, and behavioral patterns, which raises confidentiality and compliance concerns if users are not clearly informed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documents state persistence to disk for resumable execution but does not provide a clear warning that user data, task history, or derived artifacts may be stored. Persistent state in an autonomous agent can retain sensitive goals, intermediate outputs, or operational context longer than users expect, creating privacy and data handling risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The self-evolution section says learned behavior patterns are written to disk automatically after each run, but there is no explicit warning or control over what behavioral data is retained. This creates risk of silently storing sensitive task characteristics, user preferences, or failure traces that may later influence behavior in ways users did not authorize.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module persistently stores user-provided notes and preferences in learned_patterns.json without any visible consent, disclosure, retention control, or sanitization. In this skill context, the file is a generic cross-skill learning store, so notes may contain sensitive operational details or personal preferences that accumulate over time and create a privacy and data exposure risk if the filesystem is accessed by other local users, backups, or adjacent tools.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/loop.py (reported line 32)May include surrounding context.

python
def _run(py, args, timeout=60):
    try:
        r = subprocess.run([sys.executable, py] + args, capture_output=True,
                           text=True, timeout=timeout)
        return r.returncode == 0, r.stdout + r.stderr
    except Exception as e:

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The module docstring and command-line description are presented only in Chinese, which imposes a specific language on all users without opt-in or documented locale scoping. This matches the policy concern for language or locale restrictions that are not user-selectable.

Content

No source excerpt is available for this finding.