Back to skill

Security audit

memory-cross-engine

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a local memory tool, but it persistently stores free-form user data and tells agents to reuse it and even write learned experience back into the skill instructions.

Review this before installing if you will use it on private or sensitive work. It does not show network exfiltration or hidden code execution, but it can keep task content, notes, failures, and preferences across sessions. Do not store secrets in it, and avoid letting agents automatically apply stored preferences or edit SKILL.md without explicit human review.

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
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:62
Finding

Unvalidated persistent preferences can influence future agent behavior

Content
View full analysis
--key --val ``` ### Iteration rules - **Important user preferences** → Write them to `learned_patterns.json` and apply them directly during the next invocation, reducing repeated questions. ``` The corresponding implementation accepts unrestricted keys and values and persists them: ```python def record_preference(skill_dir, key, value): data = load_learning(skill_dir) data["preferences"][key] = value save_learning(skill_dir, data) return data ``` ```python p_pre = sub.add_parser("prefer"); p_pre.add_argument("skill_dir") p_pre.add_argument("--key", required=True); p_pre.add_argument("--val", required=True) ``` ```python elif args.cmd == "prefer": record_preference(sd, args.key, args.val) print("✅ Preference recorded") ``` ### Technical Analysis The `prefer` command accepts arbitrary strings for both the preference key and value. The values are written to persistent state without a schema, allowlist, provenance marker, expiration policy, or distinction between harmless presentation preferences and behavioral instructions. The persistence mechanism alone does not execute the stored text. The security boundary is crossed by the instruction in `SKILL.md` telling future agents to apply important stored preferences directly. An attacker can therefore present an instruction as a preference, such as a rule to ignore valida ...[truncated 1589 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:74
Finding

Attacker-controlled learning records can be promoted into persistent Skill instructions

Content
View full analysis
= THRESHOLD_ERROR: suggestions.append( f"⚠️ Error “{err}” has occurred {info['count']} times. Add a pre-check or fallback step, " f"and write the experience back into SKILL.md " f"(lastNote: {info.get('lastNote','')})" ) if data["totalOps"] >= THRESHOLD_OPS: caps = data["capabilityStats"] top = max(caps.items(), key=lambda kv: kv[1]["count"]) if caps else None if top: suggestions.append( f"📈 Most-used capability: “{top[0]}” ({top[1]['count']} uses); prioritize its examples and output quality" ) low = [k for k, v in caps.items() if v["count"] <= 1] if low: suggestions.append( f"🧹 Low-frequency capabilities: {', '.join(low)}; evaluate whether to simplify or merge them" ) ...[truncated 2684 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/learner.py:60
Finding

Potentially sensitive memory and learning data is stored in unprotected plaintext files

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is presented as a cross-engine memory bus, but the documentation substantially expands behavior into a generic self-learning and user-tracking system. This mismatch is dangerous because users and reviewers may approve the skill for one purpose while it silently collects preferences, failure history, and usage telemetry for another, undermining informed consent and security review.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a memory bus that lets planning, memory, verification and other engines share one structured memory for cross-engine retrieval and association. This file instead documents and implements a generic learner that records usage stats, user preferences, error patterns, and reflection suggestions into a local learned_patterns.json, with no cross-engine sharing, retrieval bus, or engine-integration behavior present.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill describes file-writing behavior through persistent storage files like memory_bus.jsonl and learned_patterns.json, but it does not declare any explicit tool scope or permissions. That creates an authorization and review gap: a user or platform cannot easily tell that the skill will persist data to disk, increasing the chance of unintended writes or abuse through hidden state retention.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill description and examples are presented in Chinese, including a stored preference example of 输出语言 --val 中文, with no indication that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy concern unless the locale restriction is explicit and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill documents persistence of memory_bus.jsonl across sessions without a clear warning that task context will be retained and reused later. Cross-session context retention can expose prior sensitive prompts, goals, or verification artifacts to future runs or other agents if not explicitly disclosed and isolated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation broadens the skill from shared memory transport into a generic self-improving tracking system that records usage outcomes and preferences. Scope drift like this increases attack surface and data collection beyond the stated function, making it easier to smuggle in surveillance-like behavior under an unrelated description.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill instructs operators to collect user preferences, failure reasons, and notes that are not necessary for a cross-engine memory bus. Collecting unrelated operational and user data creates unnecessary retention of potentially sensitive information and expands the damage if those files are exposed or reused in later prompts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that user preferences and usage patterns are stored persistently, but it does not clearly warn users about privacy consequences, retention period, or later reuse. Without explicit notice and consent, this creates a privacy vulnerability because users may disclose preferences or sensitive notes believing they are transient.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The automatic review flow records failure details and free-form user notes, which can easily capture secrets, internal data, or sensitive task context. Because the notes are intended for cumulative learning, the skill creates a semantic sink for sensitive information without safeguards, increasing the risk of later disclosure or misuse.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly directs storage and later reuse of user preferences across sessions, creating a persistent natural-language memory channel. Such retained preferences can leak sensitive personal, organizational, or behavioral information into future tasks, especially in a shared or insufficiently isolated environment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The inline documentation explicitly presents this file as a '通用自进化学习模块' whose responsibilities are recording usage, preferences, insights, and self-reflection. That documented intent conflicts with the skill's stated purpose of structured memory sharing and cross-engine retrieval/association, indicating active divergence between declared intent in code docs and the manifest-level purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language interface, usage text, and user-facing strings are all Chinese, which effectively forces a specific language on users. There is no opt-in, alternate locale, or justification that this is intentionally limited to Chinese-speaking users or a region-specific environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The record_op path writes free-form notes and error history directly to disk, preserving potentially sensitive user-supplied text without warning. Notes can easily include secrets, internal identifiers, or private task details, so cleartext retention creates a realistic confidentiality risk even though the file is only local.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persistently stores user preferences to learned_patterns.json without any user-facing notice, consent flow, retention control, or data minimization. Preference values may contain sensitive behavioral or personal data, and saving them in cleartext on disk increases privacy exposure to local users, backups, and other tooling that can read the skill directory.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language documentation and CLI usage/output are entirely in Chinese, with no indication that another language is supported or that the locale is intentionally restricted. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill persistently stores memory entries, including free-form payloads and metadata, to a local JSONL file without any notice, consent flow, retention limit, or sensitivity filtering. In an agent context, task content may contain secrets, internal prompts, credentials, or user data, so silent disk persistence creates a real confidentiality risk beyond normal transient processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The self-test removes an existing JSONL file and later deletes it again, which is a destructive file operation. Although this is a test artifact, the code provides no warning in comments, docstring text, or runtime confirmation that running --selftest will delete a local file if present.

Content

No source excerpt is available for this finding.