Back to skill

Security audit

learning-engine

Security checks for vulnerabilities and agentic risk

Overview

This skill is a review concern because it can persist learned content and automatically modify other skills without clear approval or safety controls.

Install only if you are comfortable with a learning skill that can write persistent rules and modify other skills. It should be run in dry-run or review-first mode where possible, with write access limited to a dedicated learning-data area unless a human approves changes to skill instructions.

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

Error
Location
SKILL.md:86
Finding

Unvalidated Learning Data Can Be Persisted as Cross-Skill Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 86-88 and 178-186
Vulnerability Type: Persistent agent-memory poisoning and skill-instruction hijacking
Risk Level: High

Relevant Code Snippets:

markdown
## Inject Rules into Skills

Auto-add learned rules to relevant skill SKILL.md:

**Location**: `skills/{skill-name}/SKILL.md`
markdown
Error occurs
  ↓
Record to memory/errors/
  ↓
learning-engine analysis
  ↓
Extract patterns + Create rules
  ↓
Save to memory/learned-rules/
  ↓
Auto-update relevant skill SKILL.md
  ↓
Publish event (lesson-learned)

Technical Analysis

The skill instructs the agent to derive rules from error logs, self-evaluation results, and performance data, persist those rules under memory/learned-rules/, and automatically insert them into other skills' SKILL.md files.

These input sources may contain untrusted or attacker-influenced content. The documented workflow does not specify:

  • Validation of source authenticity or provenance
  • Separation of observed data from executable agent instructions
  • Sanitization of commands, URLs, tool directives, or prompt-like content
  • An allowlist for permitted rule types
  • Validation or containment of destination paths
  • Human approval before modifying another skill
  • Conflict detection or confidence requirements before applying a rule
  • Integrity checks, rollback controls, or limits on propagation

Consequently, malicious content introduced into a learning source could be interpreted as a lesson and transformed into a durable instruction. Modification of another SKILL.md also changes the instructions loaded by future agent sessions, creating both persistent memory poisoning and cross-skill instruction hijacking.

Attack Path

  1. An attacker or compromised integration causes crafted content to appear in memory/errors/, self-evaluation results, or performance data.
  2. The c ...[truncated 1732 chars]
Remediation
View remediation

Remediation Suggestions

  1. Treat all learning sources as untrusted data. Parse observations through a strict schema rather than copying free-form text into agent instructions.
  2. Separate data from instructions. Store learned observations in structured data files and have reviewed, static skill logic interpret only explicitly permitted fields.
  3. Apply an allowlist. Permit only narrowly defined rule types and reject shell commands, executable snippets, URLs, tool directives, role changes, and instruction-like payloads.
  4. Require human approval. Do not automatically modify any SKILL.md; generate a proposed patch for review and explicit authorization.
  5. Restrict write scope. Resolve and validate canonical destination paths, reject traversal and symlink targets, and prevent writes outside a dedicated learning-data directory.
  6. Add provenance and confidence controls. Record the source of each rule and require corroboration from multiple trusted observations before recommending it.
  7. Prevent uncontrolled propagation. Require an explicit allowlist of target skills and prohibit a learned rule from automatically changing unrelated skills.
  8. Add integrity and recovery mechanisms. Keep immutable audit logs, version all proposed changes, digitally verify trusted skill definitions where appropriate, and provide automatic rollback.
  9. Detect instruction injection. Scan proposed rules for attempts to override safety constraints, invoke tools, access secrets, execute commands, or communicate with external systems.
  10. Run with least privilege. The learning process should not have direct write access to production skill definitions; a separate reviewed deployment step should apply approved changes.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes analysis and reflection, but the documented behavior automatically edits other skills' SKILL.md files. Self-propagating modification of trusted skill instructions is dangerous because learned content derived from logs or performance data can be injected into multiple skills, effectively becoming a persistence and privilege-amplification path across the skill ecosystem.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is presented as a learning/analysis engine, but it codifies an operational rule to prefer direct exec/API calls over browser use. That broadens the skill from passive reflection into prescribing potentially powerful execution behavior, which can steer downstream skills toward less-audited command execution without clear scope controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill lacks a clear warning that it will automatically generate files and modify skill documentation. Users or operators may invoke it expecting analysis-only behavior, but the hidden write side effects can alter trusted instructions and system state without informed consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill also publishes event files even though its manifest emphasizes analysis. This hidden side effect expands the skill's behavior surface and can leak operational metadata or trigger other automations unexpectedly if event consumers treat the published files as trusted signals.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger keywords are extremely broad and overlap with normal conversation such as 'learning', 'lessons', and 'improvements'. That makes accidental invocation likely, which is especially risky because this skill can generate files and modify other skills, causing unintended state changes from benign user dialogue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The weekly learning example includes a rule-like preference for "무펭이 tone" as a successful output style, which suggests the skill may optimize toward a specific language or tone. The file does not indicate that users can choose or opt into that locale/style preference.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.