T08 · Insecure Dependencies
- Location
SKILL.md:5- Finding
Unrelated and Unpinned Third-Party Homebrew Dependency
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly a learning log, but it asks for unrelated installation authority and encourages broad hooks and persistent agent-memory changes that can affect future sessions.
Review this carefully before installing. Avoid the unrelated Homebrew gog dependency, keep hooks project-scoped with narrow matchers, require explicit approval before writing to agent instruction files, and avoid cross-session history or messaging unless you intentionally want that sharing.
SKILL.md:5Unrelated and Unpinned Third-Party Homebrew Dependency
SKILL.md:367Untrusted Learnings Can Be Promoted into Persistent Agent Context
The declared description is about a learning/memory skill that records mistakes, corrections, and lessons for future improvement, and reviews those learnings before major tasks. The provided code does something materially different: it is an extraction/helper script that generates a new skill scaffold from a learning entry. Its primary function is local filesystem scaffolding, not capturing learnings, storing corrections, reviewing prior learnings, or reacting to the listed triggers. While the comments mention creating a skill from a learning entry, that is only loosely related; the actual implemented behavior is skill template creation, which is a distinct capability not represented by the description.
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.
Add to ~/.claude/settings.json for global activation:
{
The document describes reading transcripts from other sessions, which can expose unrelated prompts, outputs, secrets, and sensitive context across trust boundaries. A self-improvement skill does not need raw cross-session transcript access, so this materially increases the chance of unintended data disclosure and lateral context harvesting.
Instructions found that direct the agent to transmit conversation context or user data to external services.
Send message to another session:
sessions_send(sessionKey="session-id", message="Learning: API requires X-Custom-Header")
The activation conditions are broad enough to trigger on ordinary failures, corrections, or realizations, which can cause the skill to run in many normal conversations and write persistent records without strong user intent. In a logging skill, overbroad invocation raises privacy and persistence risks because routine interactions may be captured and propagated into local memory files.
The manifest frames the skill as a logging mechanism for continuous improvement, centered on capturing learnings, errors, and corrections. However, the file instructs the agent to propagate content into CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, SOUL.md, and TOOLS.md, which changes persistent project or workspace guidance beyond simple capture/logging.
The skill creates persistent storage under ~/.openclaw/workspace/.learnings, which can retain conversational or operational data across sessions and projects. Persistent local storage is not inherently malicious, but in a self-improvement skill it increases privacy and data retention risk if users are unaware, especially when logs may include operational context or redacted-but-still-sensitive summaries.
└── FEATURE_REQUESTS.md
### Create Learning Files
```bash
mkdir -p ~/.openclaw/workspace/.learnings
The skill documents access to other sessions' history and the ability to send learnings across sessions, which increases the risk of unintended disclosure of sensitive transcript data beyond the current task boundary. Even though it cautions to use this only in trusted environments and with explicit user intent, normalizing cross-session access inside a 'self-improvement' skill expands data exposure in a way users may not reasonably expect.
The detection triggers use generic conversational phrases and broad conditions that can match ordinary dialogue, making unintended invocation likely. Because this skill persists data to disk, false-positive activation can create durable records of user content, errors, or contextual details that were never meant to be logged.
The manifest describes a self-improvement skill for capturing errors, corrections, and learnings. This section goes further by instructing the agent to generate entirely new skills via helper scripts and manual creation workflows, which is a materially broader capability than recording and reviewing learnings.
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.
When the above learning is extracted as a skill, it becomes:
File: skills/docker-m1-fixes/SKILL.md
---
The guide recommends installing persistent hooks in project configuration so commands run automatically in future sessions. In this skill context, persistence makes the behavior more dangerous because it silently carries forward self-improvement capture and command execution beyond the immediate task, increasing the chance of unintended data exposure or continued execution after users forget the hook is enabled.
Create .claude/settings.json in your project root:
{
An empty matcher makes the hook fire on every prompt, creating broad, implicit execution scope for an automatically run command. Because this skill is for self-improvement and captures learnings/errors, all-prompt activation can unnecessarily expose sensitive prompt contents or normalize unattended command execution in every session.
The user-level configuration places an always-on hook in ~/.claude/settings.json with an empty matcher, causing automatic execution across all sessions and projects. That persistence and breadth increase the blast radius of any script flaw, script replacement, or misuse, making this materially more dangerous than a project-local example.
The Codex CLI setup also uses an empty matcher, creating an all-prompts trigger that automatically runs a shell command for every interaction. In an agent tooling context, broad automatic invocation increases privacy risk and execution surface, especially if users copy-paste the configuration without understanding its scope.
The document states that the hook scripts 'only output text' and 'don't modify files or run commands,' yet the configuration explicitly invokes shell scripts via hook commands. This is a misleading security claim that can cause operators to underestimate the trust and execution risk of those scripts, especially because hook commands run automatically in response to prompts or tool use.
The integration guide broadens a narrowly scoped self-improvement skill into workspace prompt injection, hook-driven behavior changes, and multi-agent coordination. Even though framed as documentation, this expands the trust boundary and encourages operators to grant the skill influence over injected context and lifecycle events unrelated to simply recording learnings.
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.
openclaw hooks enable self-improvement
### 3. Create Learning Files
Create the `.learnings/` directory in your workspace:
Promoting background sub-agent spawning expands the skill from passive learning capture into active task delegation and autonomous execution. That increases operational scope and risk, especially if spawned agents inherit broad workspace context or can access tools without tight limits.
The trigger conditions are broad and ambiguous, which can cause excessive or automatic logging of ordinary interactions, errors, or corrections. In a system that writes persistent memory or promotes content into injected workspace files, over-triggering can capture sensitive or low-quality data and amplify prompt-injection or persistence risks.
Although presented as a lower-overhead minimal setup, the example still uses an empty matcher, so the hook executes on every prompt. In this reduced form the impact is somewhat lower because fewer hooks are installed, but the example still promotes unconstrained automatic command execution.