Back to skill

Security audit

Curiosity Loop — Intrinsic Curiosity-Driven Continuous Learning

Security checks for vulnerabilities and agentic risk

Overview

This skill is not plainly malicious, but it should be reviewed because it directs the agent to persist learning data and modify memory or skills after researching external content without enough safeguards.

Review this skill carefully before installing. It is best used only if you explicitly want an agent to keep local learning records and propose or perform persistent memory and skill changes. Require confirmation before any memory write or skill patch/create action, restrict scan sources to trusted allowlisted feeds, treat all fetched content as untrusted, and avoid running the scanner from cron until the storage path and retention policy are clear.

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
SKILL.md:64
Finding
Untrusted Research Content Can Be Persisted into Agent Memory and Skills<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:64-76`; related untrusted content source in `scripts/scan_sources.py:25-59` **Vulnerability Type**: `T02: Agent Memory Poisoning` **Risk Level**: Medium ### Complete Code Snippets `SKILL.md:64-76`: ```markdown ### Step 4: RESEARCH Actively explore the missing concept. - Search docs, existing skills, external sources - Use web_search, browser, terminal, session_search - Validate the discovery's relevance ### Step 5: INTEGRATION Update knowledge/skills. - **If an existing skill is incomplete**: `skill_manage(action='patch')` with new info - **If a new pattern is discovered**: `skill_manage(action='create')` for a new skill - **If a stable fact is learned**: `memory(action='add')` for durable facts - **If a tool/command is discovered**: document in the appropriate skill ``` Related external-content retrieval in `scripts/scan_sources.py:25-59`: ```python def scan_youtube_channel(channel_id, last_scanned): """Scan a YouTube channel for new videos since last_scanned.""" import urllib.request import xml.etree.ElementTree as ET url = f"https://www.youtube.com/feeds/videos.xml?channel_id={channel_id}" headers = {"User-Agent": "Mozilla/5.0"} req = urllib.request.Request(url, headers=headers) try: html = urllib.request.urlopen(req).read().decode("utf-8") root = ET.fromstring(html) ns = {"atom": "http://www.w3.org/2005/Atom"} entries = root.findall("atom:entry", ns) new_videos = [] for entry in entries: published = entry.find("atom:published", ns).text vid = entry.find("atom:id", ns).text.replace("yt:video:", "") title = entry.find("atom:title", ns).text pub_date = datetime.fromisoformat( published.replace("Z", "+00:00") ).date() scan_date = datetime.fromisoformat(last_scanned).date() if pub_date > scan_date: n ...[truncated 2970 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat all web pages, feed fields, titles, descriptions, and search results as untrusted data rather than agent instructions. 2. Add an explicit rule forbidding the agent from following tool-use, memory-write, skill-update, or safety-override instructions found in researched content. 3. Require explicit user confirmation before any `memory(action='add')`, `skill_manage(action='patch')`, or `skill_manage(action='create')` operation derived from external material. 4. Separate research and integration into distinct stages. Store candidate findings in a non-executable review queue before promoting them into persistent state. 5. Record provenance for every persisted fact, including source URL, retrieval date, quoted evidence, confidence, and whether independent corroboration was performed. 6. Require corroboration from multiple trusted sources before persisting operational commands, security guidance, or behavioral rules. 7. Apply a strict schema to persistent entries and reject imperative content, tool-call syntax, embedded prompts, encoded instructions, and requests to override existing constraints. 8. Restrict automated skill updates to documentation-only changes where possible. Require manual review for changes that introduce commands, tool calls, network access, or file writes. 9. Configure an allowlist of trusted source domains and validate parsed channel identifiers before making requests. 10. Preserve an audit log and rollback mechanism for all memory and skill modifications so poisoned state can be identified and reverted. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill is presented as a curiosity-driven learning loop, but it also defines persistent local state management and proactive network scanning behavior that materially expands its operational footprint. This mismatch can mislead reviewers and users about what the skill actually does, reducing informed consent and increasing the chance that background collection or network activity is enabled unexpectedly.

Self-Modification

High
Category
Rogue Agent
Content
---
name: curiosity-loop
description: "Intrinsic curiosity-driven continuous learning: detect gaps between expected and actual results, treat them as curiosity signals, and update skills accordingly. Inspired by developmental AI from Flowers Lab, INRIA."
version: 1.0.0
author: Guillaume D
license: MIT
Confidence
97% confidence
Finding
The skill explicitly instructs updating or creating skills based on its own research loop, enabling self-modification of agent behavior. Self-modifying mechanisms are dangerous because they can amplify mistakes, incorporate untrusted external content into future behavior, and bypass normal review workflows over time.

Self-Modification

High
Category
Rogue Agent
Content
## Maintenance

### When to patch this skill
- If loop steps become redundant or obsolete
- If new activation signals are discovered
- If the delta tracking format changes
Confidence
94% confidence
Finding
The maintenance section normalizes patching the skill itself, reinforcing a self-modification workflow even if framed as upkeep rather than automation. In context of a learning loop, this increases the likelihood that behavior changes are made persistently without adequate security review.

Description-Behavior Mismatch

High
Confidence
95% confidence
Finding
The manifest describes a capability centered on detecting expectation gaps and updating skills accordingly. In contrast, this file implements a source polling utility that reads a local config, fetches YouTube feed entries, prints results, and updates last-scanned dates, with no observable curiosity-signal detection or skill adaptation behavior.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The README defines automatic activation triggers in broad terms such as 'result delta,' 'sub-optimal approach,' and 'knowledge scan,' which can cause the skill to invoke in situations the user did not explicitly request. In a self-improvement skill, ambiguous triggers are especially risky because they can initiate research or skill-updating behavior without clear user intent or approval, increasing the chance of unintended actions and policy bypass through overbroad scope.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README instructs users to configure and run periodic scanning of external sources, but it does not clearly warn about outbound network activity, content ingestion risks, or possible privacy implications. Because this skill is designed for continuous learning, external scanning can introduce untrusted content into the agent's workflow and may expose usage patterns or local configuration context without informed user consent.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill describes capabilities that involve file reads/writes and network access, but it does not declare any tool scope or permission boundaries. That makes the effective authority of the skill ambiguous and can lead to overbroad execution in environments that rely on manifest-level restrictions for policy enforcement.

Session Persistence

Medium
Category
Rogue Agent
Content
Structure learning as progressive milestones.
- Identify missing prerequisites
- Decompose the concept into progressive sub-concepts
- Create verifiable milestones (can I explain this? can I use it?)

## Delta Tracking
Confidence
80% confidence
Finding
The skill promotes progressive milestones and immediately follows with persistent delta tracking, indicating an intent to preserve learning state across sessions. Session persistence is not inherently unsafe, but here it contributes to durable accumulation of contextual interaction data and behavior adaptation without explicit boundaries or user consent.

Ssd 3

Medium
Confidence
96% confidence
Finding
The design encourages durable logging of failures and learned facts into files and memory without any minimization, classification, or retention controls. In practice, this creates a systematic pathway for sensitive user inputs, operational details, and environment-specific data to be retained far beyond the original interaction.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs storing delta records in a persistent file under the user's home directory without warning that contextual data may be sensitive. Because delta entries include freeform context, expectations, and actual outcomes, the log can easily accumulate secrets, personal data, or proprietary information that remains on disk indefinitely.

Context-Inappropriate Capability

Medium
Confidence
76% confidence
Finding
The stated purpose emphasizes internal gap detection and continuous learning mechanics, but this code introduces a concrete external-content collection capability by querying YouTube channel feeds. Without manifest language declaring source crawling or external feed monitoring as part of the skill, this looks broader than the stated purpose.

Missing User Warnings

Medium
Confidence
82% confidence
Finding
This code overwrites /home/openfang/.hermes/deltas.json on every run by updating all last_scanned dates. While the module docstring mentions reading the file and outputting results, it does not disclose that execution will also modify persistent state, and there is no prompt or user-facing warning near the write operation.

Static analysis

No suspicious patterns detected.