Back to skill

Security audit

meta-calibrated-autonomy

Security checks for vulnerabilities and agentic risk

Overview

The skill is not overtly malicious, but it asks agents to store user/task history and even rewrite its own instructions without adequate boundaries.

Install only if you are comfortable with local cross-session memory. Keep it out of sensitive workspaces unless persistence is disabled or tightly reviewed, and do not allow automatic SKILL.md writeback without human approval.

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:11
Finding

Untrusted Notes Can Poison Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: scripts/learner.py:11-17, with unsafe reuse instructions in SKILL.md:96-108
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: Medium

Vulnerable Code

scripts/learner.py:11-17:

python
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

SKILL.md:96-108 instructs the agent to persist and later apply stored preferences, and potentially write accumulated experience back into the Skill:

markdown
### Iteration Rules
- **Errors accumulated ≥3 times** → proactively add pre-check/fallback steps and write the experience back into this SKILL.md.
- **Operations ≥10 times** → analyze frequently used capabilities and prioritize improving examples and quality; evaluate low-frequency capabilities for simplification or merging.
- **Important user preferences** → write them into `learned_patterns.json` and apply them directly on the next invocation to reduce repeated questions.

> The more it is used, the better it understands you: the first use provides generic capabilities, while by the tenth use it has accumulated personalized best practices.

Technical Analysis

The record function accepts arbitrary command-line text and appends it to the persistent patterns array without schema validation, provenance tracking, content restrictions, size limits, or separation between passive data and executable agent instructions. The resulting JSON file persists across invocations.

This becomes an agent-memory poisoning risk because SKILL.md directs future agents to reuse stored preferences and to write accumulated experience back into SKILL.md. An attacker-controlled note can therefore be phrased as an instruction rathe ...[truncated 1942 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat all persisted memory as untrusted data and never insert it directly into agent instructions or system-level prompts.
  2. Replace free-form patterns with a strict schema containing narrowly defined fields, types, permitted values, provenance, timestamps, and confidence levels.
  3. Allow only explicitly approved preference categories; reject instruction-like content and unknown keys.
  4. Apply maximum lengths and entry-count limits to prevent oversized or abusive memory records.
  5. Require explicit user or administrator approval before a stored item affects a later session.
  6. Remove automatic or agent-directed modification of SKILL.md. Generate a separate review proposal or patch that a trusted human must approve.
  7. Clearly delimit retrieved memory as quoted, non-authoritative data and instruct the consuming agent not to follow commands found inside it.
  8. Use atomic file replacement, restrictive file permissions, and integrity checks to reduce local tampering and state corruption.
  9. Record the origin of every memory entry and provide deletion, expiration, and revocation mechanisms.
  10. Add tests using instruction-like notes to confirm they remain inert and cannot alter later agent policy.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill markets itself as a self-verifying, self-reflective, orchestrated autonomy controller, but the documented mechanics mainly amount to policy text plus logging/persistence claims rather than enforceable controls. This mismatch is dangerous because operators may trust it as a safety gate or oversight mechanism when those protections are not actually implemented, leading to over-delegation and unsafe automation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documents file-writing behavior via learner persistence and rewriting skill artifacts, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where an agent may perform persistent writes without clear boundary enforcement, increasing the chance of unintended file modification or abuse if the skill is invoked in sensitive environments.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documentation says critical-risk tasks must be deferred and never acted on, yet it also tells users to directly call the skill to complete tasks. This conflicting guidance can cause unsafe operator assumptions about when the skill will act autonomously versus when it should block, weakening the reliability of the safety boundary.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill claims to be a calibrated autonomy gate, but it also directs persistent cross-session storage of user preferences, error history, and operational patterns. That broadens the data-handling surface beyond task gating into profiling and retention, creating privacy and data-minimization risks if users are not expecting long-lived memory.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes automatic persistence of user preferences and operational history without an explicit privacy warning or informed consent flow. Silent cross-session storage can expose sensitive preferences or task traces and may violate user expectations or policy requirements in shared or regulated environments.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language workflow directs long-term collection of user preferences, usage counts, failure patterns, and derived insights across sessions. Persistent behavioral logging increases surveillance and privacy risk, and in combination with file-write capability it can create durable records that outlive the user’s immediate task context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example command records 输出语言 --val 中文, which encodes a fixed language preference in natural language. There is no accompanying statement that language should be chosen by the user or that this is only an example, so it can be read as enforcing a specific locale without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs writing learned experience back into SKILL.md, meaning the executable policy/instruction file can be modified as part of normal operation. Self-modifying instruction files are dangerous because they can corrupt trusted behavior, introduce prompt-injection persistence, or silently expand future capabilities without review.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire report is written in Chinese with no indication that users can choose another language or locale. Under the policy rule for natural-language violations, forcing a single language without opt-in is a reportable issue unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script persists operational metadata and arbitrary note content to a local JSON file without any notice, consent, retention control, or validation. While this is not an overt code-execution issue, it creates a privacy and data-handling risk because user- or task-derived notes may contain sensitive information and are stored indefinitely on disk in cleartext.

Content

No source excerpt is available for this finding.