Back to skill

Security audit

meta-interpretable-attribution

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it asks the agent to use cross-session learning and broad meta-agent loops without enough scoping or controls.

Install only if you are comfortable with a skill that can record local learning notes and is intended to plug into broader self-reflection or meta-agent workflows. Keep stored notes non-sensitive, review or clear learned_patterns.json if used, and do not let downstream agents treat those notes as trusted instructions without a separate approval step.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
scripts/learner.py:6
Finding

Unvalidated Notes Persisted as Cross-Session Agent State

Content
View full analysis

Vulnerability Details

File Location: scripts/learner.py:6-16; persistence directives in SKILL.md:27-31
Vulnerability Type: Persistent agent memory poisoning
Risk Level: Medium

The skill documentation directs the agent to record failure patterns in a learner and use them for cross-session evolution. The implementation accepts an arbitrary note from the command line and stores it persistently without validation, provenance tracking, size limits, or separation between untrusted observations and trusted instructions.

Complete Vulnerable Code

python
MEM = os.path.join(os.path.dirname(__file__), "learned_patterns.json")
def load():
    try:
        return json.load(open(MEM, encoding="utf-8"))
    except Exception:
        return {"total_ops": 0, "total_fails": 0, "patterns": []}
def record(op_ok=True, note=""):
    d = load(); d["total_ops"] += 1
    if not op_ok:
        d["total_fails"] += 1
    if note:
        d.setdefault("patterns", []).append(note)
    json.dump(d, open(MEM, "w", encoding="utf-8"), ensure_ascii=False, indent=2)
    return d

The externally supplied command-line value is passed directly to the persistent recorder:

python
if __name__ == "__main__":
    ok = (sys.argv[1] != "fail") if len(sys.argv) > 1 else True
    rec = (sys.argv[2] if len(sys.argv) > 2 else "")
    print(json.dumps(record(ok, rec), ensure_ascii=False))

Technical Analysis

record() appends the note value unchanged to the persistent patterns array in scripts/learned_patterns.json. The note can contain arbitrary text and is not subject to schema validation, length restrictions, trust labeling, sanitization, or user approval.

This behavior is security-relevant because SKILL.md:27-31 describes the stored material as input to reflection, learner, and meta-evolution workflows intended to affect future sessions. If a downstream agent or meta-evolver interprets stored ...[truncated 1870 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove mandatory cross-session learning from the attribution skill unless persistent state is necessary and explicitly approved by the user.
  2. Replace free-form notes with a strict structured schema containing allowlisted fields, such as an operation identifier, a bounded error code, and numeric outcome metrics.
  3. Enforce maximum lengths, entry counts, and total file size. Reject malformed or oversized records.
  4. Attach provenance and trust metadata to every record, distinguishing untrusted task content from administrator-approved guidance.
  5. Never insert stored notes directly into an agent system prompt or treat them as executable instructions. Render them as quoted, untrusted data and apply an explicit review or approval step before they can affect behavior.
  6. Store state outside the skill source directory in a permission-restricted application data location, and use atomic file replacement and file locking to prevent corruption.
  7. Define retention and deletion controls so users can inspect, clear, or disable persistent learning.
  8. If only operational telemetry is required, store aggregate counters and remove the arbitrary patterns text field entirely.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill claims advanced self-verification, self-reflection, orchestration, and continual evolution, but the described/observed behavior does not implement those controls and instead appears to persist local notes or metrics. This mismatch is dangerous because operators may trust the skill to perform safety or reliability checks that do not actually exist, while hidden persistence can introduce statefulness and cross-task influence without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises behaviors that imply persistence and state updates, yet it declares no explicit tool scope or permission boundaries. In an agent ecosystem, undocumented file-write capability increases the risk of unauthorized local state changes, hidden persistence, or abuse by downstream orchestration that assumes the skill is read-only.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill text explicitly promotes writing to learner/self-reflection/meta-evolver loops, implying persistent self-modification or cross-session memory, but it does not warn users about those behaviors. Undisclosed persistence is risky because it can retain sensitive data, alter future behavior in non-transparent ways, and make incident response or reproducibility much harder.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill's descriptive instructions are presented in Chinese, with no indication that the user can choose another language or that the locale restriction is intentional for a specific audience. This is a natural-language policy concern because it imposes a language choice without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file contains user-facing natural language solely in Chinese, and there is no indication that the skill is region-specific or that users can opt into this locale. Under the policy, forcing a specific language without user choice is a natural-language policy concern.

Content

No source excerpt is available for this finding.