Back to skill

Security audit

123skill-display-name1

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly a self-improvement logger, but it asks agents to preserve and promote conversation-derived learnings into durable agent instruction files with broad triggers and limited approval gates.

Install only if you want persistent local learning logs and are comfortable reviewing what gets stored. Before enabling hooks or promotion, require explicit approval for every write to CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, or Copilot instructions; avoid global always-on hooks; do not use cross-session transcript or messaging features unless the workspace is trusted; and avoid running the extraction helper in untrusted directories until its output-path validation is symlink-safe.

Vulnerability Patterns
  • 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
  • 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
Findings (2)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:350
Finding

Persistent Agent Context Can Be Poisoned Through Untrusted Learning Promotion

Content
View full analysis
" .learnings/LEARNINGS.md` 4. If found: - Increment `Recurrence-Count` - Update `Last-Seen` - Add `See Also` links to related entries/tasks 5. If not found: - Create a new `LRN-...` entry - Set `Source: simplify-and-harden` - Set `Pattern-Key`, `Recurrence-Count: 1`, and `First-Seen`/`Last-Seen` ### Promotion Rule (System Prompt Feedback) Promote recurring patterns into agent context/system prompt files when all are true: - `Recurrence-Count >= 3` - Seen across at least 2 distinct tasks - Occurred within a 30-day window Promotion targets: - `CLAUDE.md` - `AGENTS.md` - `.github/copilot-instructions.md` - `SOUL.md` / `TOOLS.md` for OpenClaw workspace-level guidance when applicable Write promoted rules as short prevention rules (what to do before/while coding), not long incident write-ups. ``` `hooks/openclaw/handler.js:25-29`: ```javascript **Promote when pattern is proven:** - Behavioral patterns → \`SOUL.md\` - Workflow improvements → \`AGENTS.md\` - Tool gotchas → \`TOOLS.md\` ``` ### Technical Analysis The Skill instructs the agent to ingest learning candidates from task summaries and eventually convert them into durable prompt guidance. The destination files—such as `AGENTS.md`, `CLAUDE.md`, `SOUL.md`, and `TOOLS.md`—are persistent agent-context fil ...[truncated 2628 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/extract-skill.sh:107
Finding

Symlink Traversal Allows Skill Scaffolds to Be Written Outside the Workspace

Content
View full analysis
"$SKILL_PATH/SKILL.md" << TEMPLATE ``` ### Technical Analysis The script attempts to confine output to the current workspace by rejecting absolute paths and `..` path segments. This is only a lexical check. It does not resolve the destination to a canonical path or reject existing symbolic links in the output path. A relative path can therefore pass validation while resolving outside the workspace. For example, if `./external-link` is a symbolic link to `/tmp/external`, then: ```bash ./scripts/extract-skill.sh injected-skill --output-dir external-link ``` constructs the apparently relative path `./external-link/injected-skill`, but filesystem resolution follows the symbolic link and writes to `/tmp/external/injected-skill/SKILL.md`. The `-d` existence check also follows symbolic links and does not protect against this escape. There is additionally a time-of-check/time-of-use window in which a validated directory component could be re ...[truncated 1605 chars]
Remediation
View remediation
"$SKILL_PATH/SKILL.md" ``` or create a temporary file safely and atomically rename it after validation. 7. Document that the script must not be run in an untrusted workspace until symlink-safe path validation is implemented. 8. Add automated tests covering: - A direct relative symlink to an external directory. - A symlink in an intermediate path component. - A symlink swapped between validation and writing. - Existing destination files and directories. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about recording and reviewing learnings to improve future behavior after errors or corrections. The supplied code does not capture learnings, log corrections, review prior learnings, or manage a learning store. Instead, it is a utility that scaffolds a new skill directory and markdown template on disk based on a skill name. While its comments mention creating a skill from a learning entry, that is a different operational purpose from the declared behavior of capturing learnings themselves. This is a material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.

Content

Scanner excerpt · references/hooks-setup.md (reported line 48)May include surrounding context.

Option 2: User-Level Configuration

Add to ~/.claude/settings.json for global activation:

json
{

Exfiltration Commands

High
Category
Prompt Injection
Confidence
90% confidence
Finding

Instructions found that direct the agent to transmit conversation context or user data to external services.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 181)May include surrounding context.

sessions_send

Send message to another session:

text
sessions_send(sessionKey="session-id", message="Learning: API requires X-Custom-Header")

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation criteria are very broad and can trigger on many normal interactions, causing the agent to invoke this skill frequently and persist conversation-derived content unnecessarily. In a skill that writes to disk and encourages promotion into longer-lived memory files, overbroad triggering increases the risk of unnecessary data retention, prompt pollution, and accidental storage of sensitive contextual details.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

This skill explicitly instructs creation and use of persistent files under ~/.openclaw/workspace/.learnings, enabling retention of session-derived content across sessions. While persistence is part of the intended feature, it becomes security-relevant because the same document also encourages promotion and cross-session sharing, so mistakes in sanitization or over-triggering could propagate sensitive or private information beyond the original interaction.

Content

Scanner excerpt · SKILL.md (reported line 81)May include surrounding context.

└── FEATURE_REQUESTS.md

text

### Create Learning Files

```bash
mkdir -p ~/.openclaw/workspace/.learnings

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The listed trigger phrases are common conversational language and are too imprecise to safely drive automatic logging behavior. This can cause the agent to misclassify ordinary discussion as a persistence event, leading to unwanted writes, noisy long-term memory, and potential capture of user statements that were not intended for storage.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/examples.md (reported line 301)May include surrounding context.

When the above learning is extracted as a skill, it becomes:

File: skills/docker-m1-fixes/SKILL.md

markdown
---

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/hooks-setup.md (reported line 15)May include surrounding context.

Option 1: Project-Level Configuration

Create .claude/settings.json in your project root:

json
{

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The "matcher": "" configuration means the UserPromptSubmit hook activates for any prompt, which is an extremely broad trigger that overlaps with ordinary usage rather than a narrowly defined condition. The guide does not provide exclusions or negative examples for when this hook should not run, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The user-level setup instructs readers to enable global activation in ~/.claude/settings.json, and the included hook again uses an empty matcher. In a manifest-style configuration example, this creates an ambiguous and overly broad trigger scope across all sessions without explicit limits.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The Codex CLI example repeats the "matcher": "" pattern, which implies activation for all prompts rather than a clearly bounded set of cases. Because the file presents this as setup guidance, the trigger scope is insufficiently specific for safe invocation behavior.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

Creating persistent learning storage is core to the skill, but storing memory in the workspace or skill directory creates durable retention of potentially sensitive mistakes, outputs, and user data. In this context, persistence raises the risk that prompt-injected, confidential, or low-quality information becomes long-lived context and influences future sessions.

Content

Scanner excerpt · references/openclaw-integration.md (reported line 57)May include surrounding context.

openclaw hooks enable self-improvement

text

### 3. Create Learning Files

Create the `.learnings/` directory in your workspace:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide broadens a narrowly scoped self-improvement skill into a mechanism for managing injected workspace memory, behavioral files, and multi-session coordination. That scope expansion increases the chance that ordinary 'learning' actions can modify durable prompt context or influence other agents, creating an indirect prompt-injection and privilege-expansion path.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document exposes transcript-reading, message-sending, and agent-spawning capabilities that are not necessary for simple self-improvement logging. Even though it includes cautionary language, normalizing access to other sessions creates a path for unauthorized context access, propagation of poisoned instructions, and lateral movement across sessions.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions are broad enough that many normal events—errors, corrections, or perceived knowledge gaps—could activate persistence behavior without meaningful user intent. In a self-improvement context, ambiguous triggers are dangerous because they can cause over-collection of sensitive content and convert transient prompt input into durable memory.

Content

No source excerpt is available for this finding.

Ssd 3

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The example says all API responses should 'echo back' the X-Correlation-ID header from the request and to 'always include' this passthrough. While framed as observability guidance, it is still a plain-language instruction to reflect user-provided input into outputs, which can normalize data-leak behavior patterns in downstream agent skills.

Content

No source excerpt is available for this finding.