Back to skill

Security audit

hermes-learning-loop

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent self-learning workflow, but it tells the agent to automatically save and promote task details and user corrections into persistent memory and skills without clear approval or privacy limits.

Review this skill before installing in any environment with writable shared memory or skills. Use it only with explicit approval for persistent writes, redaction of secrets and personal or business data, audit history, and human review before updating MEMORY.md or creating/modifying skills; unattended Heartbeat rewrites should be disabled or constrained.

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

Unvalidated User Instructions Are Persisted and Propagated Across Sessions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:42-55, with related propagation behavior at SKILL.md:98-109 and SKILL.md:125-137
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: High

Vulnerable Skill Instructions

The following is an English translation of the relevant segment at SKILL.md:42-55:

text
Step 2: Determine whether it is worth persisting
  - If it involves only one or two simple tool calls, do not persist it.
  - If there is a clear "if...then..." pattern, it is worth persisting.
  - A process corrected by the user must be persisted.
  - Cross-step or cross-tool orchestration is worth persisting.

Step 3: Extract it as a skill item
  Write it to the current daily log at memory/YYYY-MM-DD.md:
  ## Skill Persistence: [Skill Name]
  - Scenario: When to use it
  - Core Steps: Brief description in three to seven steps
  - Pitfalls: Where errors can easily occur
  - Optimization: How it can be improved next time

Step 4: Evaluate whether it should be promoted to a formal Skill
  If the same pattern appears three or more times, consider creating
  an independent SKILL.md.

The error-propagation instructions at SKILL.md:98-109 state:

text
When an error or user correction occurs:

Step 1: Record it immediately
  Write it to the current day's memory/YYYY-MM-DD.md:
  [Error description]
  Cause: [Why it was wrong]
  Correction: [What is correct]
  Lesson: [How to avoid it in the future]

Step 2: Check whether it affects existing knowledge
  Search MEMORY.md and the related Skill for entries requiring updates.
  If any exist, correct them immediately.

Step 3: Propagate it to related contexts
  If the error concerns a specific platform, update the related notes.
  If it is a general methodology, write it to the "Lessons" section
  of MEMORY.md.

The recurring review instructions at SKILL.md:125-137 state:

text
Periodic s
...[truncated 4030 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove mandatory persistence of user corrections. Treat corrections as untrusted observations until independently validated.
  2. Require explicit approval before persistent writes. Display the exact proposed entry, destination file, and reason, then require informed user or administrator confirmation.
  3. Separate data from instructions. Store historical observations in a non-executable format that cannot automatically become Agent policy or Skill guidance.
  4. Introduce provenance and trust metadata. Record the source, timestamp, validation status, reviewer, and confidence for every proposed lesson.
  5. Prohibit automatic promotion. Repetition alone must not promote content into MEMORY.md or a formal Skill. Require trusted review and successful validation.
  6. Restrict writable locations. Apply an allowlist of files and sections the Skill may update. Prevent direct modification of existing Skills or high-trust memory by default.
  7. Validate proposed knowledge. Check corrections against trusted documentation, deterministic tests, or administrator-approved sources before persistence.
  8. Sanitize stored content. Reject embedded commands, role-changing instructions, tool directives, secrets, credentials, personal data, and content attempting to modify security constraints.
  9. Disable unattended Heartbeat rewrites. Recurring reviews may generate recommendations, but they should not alter MEMORY.md or Skills without approval.
  10. Add rollback and audit logging. Preserve version history and provide a straightforward method to inspect and revert poisoned memory or Skill changes.
  11. Use least privilege. Run the review process with read-only access and delegate approved writes to a narrowly scoped component.
  12. Define retention controls. Avoid persisting sensitive conversation content and provide expiration, deletion, and user-consent mechanisms.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest description says the skill applies when a complex task is completed, during periodic skill reviews, or when extracting lessons from errors. These conditions are high-level and common across many sessions, without explicit boundaries or exclusion conditions, so they are likely to overlap with routine agent behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Several trigger conditions depend on qualitative judgments such as whether a task is 'complex' or a workflow is 'non-trivial,' which can vary widely between situations. Although one item includes a tool-count example, the set as a whole lacks precise scope and negative examples to prevent over-invocation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill directs the agent to write task-derived content and user corrections into persistent memory files without any notice, consent gate, or data-minimization rule. This is dangerous because operational details, sensitive prompts, or user-provided confidential information may be silently retained on disk and later reused or exposed in future sessions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The '技能沉淀' workflow encourages storing scenario details, steps, pitfalls, and improvements from completed tasks, which can easily include sensitive user data, internal procedures, or confidential context. Because this information is copied into persistent memory for later retrieval, the skill creates a durable secondary data store that increases the chance of unintended resurfacing and cross-task leakage.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The guidance to record 'all valuable operations' in daily logs promotes broad collection of interaction details without narrowing what qualifies as safe to retain. In practice, valuable operations often contain filenames, commands, outputs, user corrections, or business context that may be sensitive and become searchable later.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The error-handling flow explicitly tells the agent to persist error descriptions, causes, corrections, and then propagate updates across MEMORY.md and related skills. User corrections frequently contain sensitive facts, environment specifics, or confidential constraints, so spreading them across multiple knowledge stores materially raises the risk of future disclosure and contamination of broader memory.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Periodic review and summarization of recent logs into MEMORY.md compounds risk by aggregating previously stored details into a more durable and easily retrievable form. Aggregation increases discoverability and can transform isolated sensitive fragments into a concise summary that is more likely to leak or influence unrelated future tasks.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.