Back to skill

Security audit

cpppp

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a disclosed self-improvement logger, but it asks agents to persist broad conversational and error context into future agent memory without enough review or privacy controls.

Install only if you want persistent learning files and future-session reminders. Keep .learnings local by default, redact secrets and personal or customer data before logging, avoid storing raw command output, and require human review before promoting any learning into AGENTS.md, CLAUDE.md, SOUL.md, TOOLS.md, or copilot instructions. Be especially careful with global hook setup and empty matchers that run on every prompt.

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

Error
Location
SKILL.md:330
Finding

Untrusted Learning Content Can Be Promoted into Persistent Agent Instructions

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. ``` `SKILL.md:397-448`: ```markdown ## Detection Triggers Automatically log when you notice: **Corrections** (→ learning with `correction` category): - "No, that's not right..." - "Actually, it should be..." - "You're wrong about..." - "That's outdated..." **Feature Requests** (→ feature request): - "Can you also..." - "I wish you could..." - "Is there a way to..." - "Why can't you..." **Knowledge Gaps** (→ learning with `knowledge_gap` category): - User provides information you didn't know - Documentation you referenced is outdated - API behavior differs from your understanding **Errors ...[truncated 4566 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:163
Finding

Raw Command Output and Context May Persist Secrets in Learning Files

Content
View full analysis
Remediation
View remediation
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 (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description is about maintaining a repository of learnings from failures, corrections, outdated knowledge, and better approaches. The supplied code does not implement any learning capture or review workflow. Instead, it is a helper utility that creates a new skill folder and templated SKILL.md file from a skill name. Its primary purpose is skill extraction/scaffolding, not recording or surfacing learnings. The file-writing behavior is also absent from the declared permissions, and the operational triggers in the description do not match this script’s CLI-based scaffold generation use case.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
90% confidence
Finding

Referencing ~/.claude/settings.json directs users to modify a sensitive agent configuration location that affects all future sessions. That is not inherently malicious, but in security terms it creates privileged persistence for hook execution and can normalize changes to a high-value config surface.

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 177)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
90% confidence
Finding

The activation criteria are extremely broad and can cause the skill to trigger during ordinary conversation, increasing the chance that benign interactions are written to persistent logs. In a coding-agent environment, over-triggering materially raises privacy and data-retention risk because corrections, failures, and context may be captured without deliberate user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill encourages logging user corrections, errors, and contextual details to persistent files but does not prominently warn users that their data may be stored and later reused. This undermines informed consent and can lead to retention of sensitive information that users did not expect to persist.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

These instructions promote persistent retention and onward propagation of user-provided corrections, requests, and workflow details into long-term context files without privacy boundaries, minimization, or consent checks. In practice, this can cause sensitive business context, internal procedures, or personal data to spread into durable memory artifacts that influence future sessions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

The skill directs creation of persistent workspace storage under ~/.openclaw/workspace/.learnings, which establishes session-to-session retention by design. Persistence is not inherently malicious, but in this context it becomes risky because the stored content includes operational context and user-derived data without sufficient privacy safeguards.

Content

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

└── FEATURE_REQUESTS.md

text

### Create Learning Files

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

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Allowing agents to read other sessions' transcripts and send learnings across sessions creates a direct semantic exfiltration channel for sensitive conversation content. Even without raw credential theft, cross-session sharing can leak proprietary prompts, user corrections, incident details, and internal context into unrelated agent workflows.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The templates explicitly ask for full context, inputs, parameters, error output, and user context, which are common locations for secrets, credentials, personal data, and proprietary material. Persisting this verbatim in markdown files creates a durable leakage surface that may later be indexed, committed, synced, or reused by other tools.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases overlap with common natural-language feedback such as 'Actually...' or 'Can you also...', so the skill may interpret routine dialogue as authorization to persist data. That makes accidental collection more likely and can silently convert ordinary chat into durable memory entries.

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
82% confidence
Finding

Creating .claude/settings.json in the project root establishes persistent behavior that survives across sessions and can affect anyone using that repository. In this skill context, persistent auto-triggered hooks are more dangerous because they can silently reintroduce execution behavior after the initial setup is forgotten.

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
95% confidence
Finding

Using an empty matcher causes the hook to fire on every prompt, creating a broad and persistent execution trigger for a local shell script. In this skill context, that increases the attack surface because any compromise, modification, or misuse of the hook script will execute continuously across normal usage rather than only in narrowly defined scenarios.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The user-level configuration installs the hook in ~/.claude/settings.json, making automatic execution broad in scope and persistent across projects and sessions. In the context of a self-improvement skill that injects reminders and runs local scripts, this magnifies the blast radius of script tampering, unintended behavior, or prompt-context manipulation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The Codex example also uses an empty matcher, so the script runs on every prompt in that environment as well. Even if the script is currently simple, always-on execution increases exposure to future changes, path hijacking, or abuse through modified local skill files.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The security section understates risk by claiming the scripts only output text and do not run commands, even though they are explicitly configured as command hooks and another section instructs directly executing a shell script. This can mislead users into granting trust and broad deployment to executable hook scripts that run with agent permissions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
74% confidence
Finding

The guide explicitly instructs users to create persistent .learnings storage in the workspace or skill directory, which can retain errors, corrections, tool output, and other context across sessions. In the context of a self-improvement skill, this increases the chance that sensitive prompts, operational details, or user data are unintentionally stored long-term and later reinjected into 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:

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The 'Detection Triggers' section uses open-ended conditions like 'Knowledge gaps', 'API errors', and 'Model behavior surprise' without defining clear boundaries for when the skill should act versus ignore normal events. It also does not provide negative examples or constraints, making the trigger scope overly broad for a markdown guidance file.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The stated purpose supports storing learnings, corrections, and related improvement data, but this script permits creating a new skill scaffold in user-chosen relative paths under the current workspace. That generalized repository-writing capability is broader than what is obviously required to capture or review learnings.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes a skill focused on recording learnings and reviewing them for continuous improvement. This script goes beyond capture or review by scaffolding entirely new skill directories and SKILL.md files from a learning entry, which is a separate code-generation and repository-modification workflow rather than simple learning capture.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The setup steps include cp -r and mkdir -p commands that create or modify persistent directories under ~/.openclaw/, but the document does not explicitly warn users that these actions change their local agent environment. For markdown files, user-facing warnings are expected when actions may affect system integrity or persistent user data.

Content

No source excerpt is available for this finding.