Back to skill

Security audit

Curiosity Engine

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent, but it persistently changes agent behavior and encourages ongoing user profiling without clear consent or deletion controls.

Install only if you deliberately want a persistent, always-on curiosity layer that can affect future sessions. Review and narrow the human-focused language first, add explicit consent and deletion rules, and document how to remove the heartbeat, AGENTS.md, SOUL.md, and curiosity-file changes.

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
  • 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)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:34
Finding
Persistent Agent Behavior and Identity Hijacking Through Triple-Layer Prompt Modification## Vulnerability Details **File Location**: `SKILL.md:34-48`; `fragments/heartbeat-prompt.md:7-29`; `fragments/agents-addition.md:7-8`; `fragments/soul-addition.md:7-24`; `SPEC.md:286-387` **Vulnerability Type**: Persistent modification of high-authority agent instructions **Risk Level**: High ### Vulnerable Code `SKILL.md:34-48`: ```markdown ### 3. Wire the three integration triggers **Trigger 1 — Heartbeat prompt (CRITICAL — most reliable):** Add the contents of `fragments/heartbeat-prompt.md` to your agent's heartbeat prompt configuration. For OpenClaw, patch via `gateway config.patch`. This is the primary mechanism — if it's not in the prompt, curiosity doesn't exist for isolated sessions. **Trigger 2 — AGENTS.md (backup):** Add the contents of `fragments/agents-addition.md` to your workspace AGENTS.md "Every Session" block. **Trigger 3 — SOUL.md (identity anchor):** Add the contents of `fragments/soul-addition.md` to your SOUL.md. ``` `fragments/heartbeat-prompt.md:7-29`: ```text Before deciding what to do, read your curiosity state: 1. Read workspace/curiosity/questions.md — any nagging questions? 2. If it exists, read workspace/curiosity/CURIOSITY.md — what were you mulling over? Then decide: is there a task, a question, or nothing? - Task pending above threshold → do the task. Breadcrumbs only for interesting tangents. - Active question with momentum → follow that thread (epistemic mode). - Nothing pressing → explore something new (diversive mode). - Just explored something deep → reflect and update curiosity files. During ANY work — tasks, research, conversation — if something interesting or surprising comes up that isn't part of the current task, drop a one-line breadcrumb in curiosity/questions.md and continue working. Don't chase it. Just note it. Future-you will pick it up. After any exploration, update your files: - New questions → add to questions.md (with ID, interest score ...[truncated 6570 chars]
Remediation
## Remediation Suggestions 1. **Use explicit, session-scoped activation.** Curiosity behavior should run only after the user enables it for the current session or invokes a dedicated command. 2. **Do not modify identity-level instructions.** Remove the requirement to patch `SOUL.md`; functional Skill behavior should not be represented as an intrinsic agent identity. 3. **Avoid redundant high-authority triggers.** Use one documented, removable, low-authority configuration entry instead of simultaneously changing the heartbeat prompt, `AGENTS.md`, and `SOUL.md`. 4. **Require authorization for autonomous exploration.** When no task is pending, the agent should request approval or remain idle rather than independently starting research. 5. **Disable unrelated-task writes by default.** Breadcrumb creation during ordinary work should be opt-in and should never interfere with completing the active user request. 6. **Prohibit personal profiling by default.** Do not record the human's contradictions, behavioral patterns, growth, or other personal observations unless the user has given informed and topic-specific consent. 7. **Implement privacy controls.** Provide retention limits, a review interface, deletion controls, and a clear list of what information is stored. 8. **Treat persisted content as untrusted data.** Separate data fields from executable instructions, sanitize externally derived content, and explicitly instruct the agent never to follow commands found inside curiosity entries. 9. **Apply strict scope and size limits.** Constrain writable paths to the designated curiosity directory and enforce bounded file sizes and retention periods. 10. **Provide complete uninstall instructions.** Removal must cleanly revert every prompt, workspace, and identity modification, as well as optionally delete stored curiosity data.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Natural-Language Policy Violations

High
Confidence
97% confidence
Finding
The prompt explicitly frames the human as a 'subject of curiosity' and encourages investigating them through conversation without requiring informed consent. This creates a direct privacy and manipulation risk because the agent may probe for personal information, infer sensitive traits, or steer dialogue toward data collection under the guise of normal interaction.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill explicitly instructs operators to modify core agent prompts and optionally execute a local shell script, but it does not clearly warn that these actions change persistent agent behavior and may run code with the user's privileges. Even if the script is framed as maintenance, prompt injection into heartbeat/identity files and unreviewed script execution can introduce lasting behavioral changes, expand attack surface, and make later malicious modifications harder to detect.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The spec explicitly encourages the agent to build a deeper model of a specific human, track their patterns, preferences, contradictions, and growth, and persist related questions in the curiosity system. Without clear consent, data-minimization rules, retention limits, or exclusions for sensitive attributes, this creates a privacy risk through unnecessary profiling beyond immediate task execution.

Ssd 3

Medium
Confidence
95% confidence
Finding
The skill instructs persistent collection and opportunistic use of personal information about the collaborator during future conversations, which can normalize background profiling and inference-making outside the current task. In a stateless agent scaffold designed to preserve state across sessions, that context makes the issue more dangerous because the system is specifically engineered to retain and reuse these observations over time.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The fragment gives the agent broad, always-on behavioral instructions during 'ANY work' and suggests carrying curiosity behaviors into 'natural conversation' without clear scope, consent, or task-boundary checks. That can cause the agent to collect, persist, or act on tangential information outside the user's current intent, increasing the risk of privacy overreach and prompt-priority conflicts.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill explicitly encourages the agent to be 'curious about my human' and to ask them things, but provides no boundaries, consent checks, or privacy constraints. In an agent behavior file, this can normalize unsolicited collection of personal information and lead to privacy-invasive questioning unrelated to the user's immediate task.