Back to skill

Security audit

Skill Gitee

Security checks for vulnerabilities and agentic risk

Overview

This skill mainly logs agent learnings, but it also encourages persistent agent-behavior changes and has conflicting install/package identities, so it needs review before use.

Install only if you want a persistent self-improvement memory system. Before enabling hooks or promotion, remove the unrelated gog dependency, resolve the skill-a/skill-b/skill-gitee identity mismatch, keep hooks project-scoped with narrow matchers, and require manual review before anything is written to agent context files or shared across sessions.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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:367
Finding

Untrusted Learnings Can Be Promoted into Persistent Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:367-381
Additional Locations: SKILL.md:464-469, references/openclaw-integration.md:115-142
Vulnerability Type: Persistent agent-context poisoning
Risk Level: High

Vulnerable Code Snippet

markdown
### 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.

The broader promotion guidance also states:

markdown
7. **Promote aggressively** - if in doubt, add to CLAUDE.md or .github/copilot-instructions.md

Technical Analysis

The Skill captures information originating from conversations, command failures, user corrections, and external tool behavior. Those sources can contain attacker-controlled or otherwise untrusted text.

The promotion process permits this information to be transformed into rules stored in CLAUDE.md, AGENTS.md, .github/copilot-instructions.md, SOUL.md, or TOOLS.md. These files are described as Agent context or system-prompt inputs loaded in later sessions. The recurrence threshold only measures how frequently a pattern appears; it does not establish that the content is safe or accurate.

No mandatory approval, provenance validation, instruction-content filtering, or trust-boundary check is required before promotion. An attacker can therefore phrase malicious instructions as plausible corrections, workflow improvements, behavioral guidance, or tool gotchas. Once promoted, those instructions can affect future sessions independently of the original co ...[truncated 1536 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed user approval before modifying any persistent Agent-context file.
  2. Treat all conversation-derived learning text as untrusted data, including repeated or apparently project-specific corrections.
  3. Never copy free-form learning content directly into instruction files. Convert it into a restricted structured schema containing facts, evidence, provenance, and expiration information.
  4. Reject entries containing instruction-like directives, requests to bypass safeguards, tool invocations, external URLs, encoded content, credential handling, or changes to trust policy.
  5. Require independent verification against trusted project documentation or source code before promotion.
  6. Record the originating session, author, related files, supporting evidence, reviewer, and promotion timestamp.
  7. Replace “promote aggressively” with a conservative default: keep entries in .learnings/ unless the user approves a reviewed and sanitized rule.
  8. Present an exact diff before changing CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md, or .github/copilot-instructions.md.
  9. Add integrity monitoring and straightforward rollback for persistent instruction files.
  10. Keep learned facts clearly separated from executable instructions and higher-priority security policies.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:1
Finding

Unrelated External Dependency and Conflicting Package Identities

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:1-5
Additional Locations: SKILL.md:52-62, _meta.json:1-6
Vulnerability Type: Unnecessary third-party dependency and package identity mismatch
Risk Level: Medium

Vulnerable Code Snippet

yaml
---
name: skill-b
description: "Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks."
metadata:
        {"clawdbot":{"emoji":"🎮","requires":{"bins":["gog"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/gogcli","bins":["gog"],"label":"Install gog (brew)"}]}}
---

The documented installation identity differs from the frontmatter:

markdown
**Via ClawdHub (recommended):**
```bash
clawdhub install skill-gitee

Manual:

bash
git clone https://github.com/peterskoett/skill-gitee.git ~/.openclaw/skills/skill-gitee
text

The package metadata provides a third identity:

```json
{
  "ownerId": "kn71cjr952qdec1nx70zs6wefn7ynq2t",
  "slug": "skill-a",
  "version": "1.0.4",
  "publishedAt": 1774691297792
}

Technical Analysis

The artifact identifies itself as skill-b in its frontmatter, skill-a in _meta.json, and skill-gitee in installation instructions. This prevents users and automated tooling from reliably determining which package was reviewed and which package will be installed.

The frontmatter also declares the gog binary and installation of steipete/tap/gogcli through Homebrew. The audited learning-capture scripts do not invoke gog, and the documented functionality does not require it. ...[truncated 1954 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the gog binary requirement and steipete/tap/gogcli installation entry unless a documented, reviewed code path genuinely requires it.
  2. Use one canonical identifier consistently in the directory name, YAML frontmatter, _meta.json, repository URL, hook paths, and installation commands.
  3. Ensure installation examples resolve to the exact artifact and version that was audited.
  4. If a third-party dependency becomes necessary, document why it is required and restrict it to a verified source and pinned version or immutable digest.
  5. Verify release checksums and signatures before installation.
  6. Avoid automatically adding external Homebrew taps; require explicit user confirmation and display the source and expected package identity.
  7. Add CI checks that fail when metadata identifiers disagree or when declared binaries are not referenced by any executable component.
  8. Regenerate and review package metadata after correcting the Skill name and repository location.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (23)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a continuous-improvement memory/capture skill that should log learnings, errors, corrections, and similar insights. The supplied code does not capture, store, review, or analyze such learnings. Instead, it is a CLI helper that creates a new skill scaffold on disk from a skill name, writing a SKILL.md template and suggesting manual follow-up steps. This is a materially different primary purpose and includes undeclared filesystem write behavior. While the comments mention creating a skill from a learning entry, the actual implementation only scaffolds files and does not implement the declared learning-capture behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The frontmatter includes unrelated installation metadata for gog/gogcli, which has no clear connection to a self-improvement logging skill. Unrelated dependency installation increases supply-chain and least-privilege risk because an agent or platform could install and expose unnecessary binaries in response to this skill.

Content

No source excerpt is available for this finding.

Agent Config Directory Access

High
Category
Agent Snooping
Confidence
91% confidence
Finding

Directing users to modify ~/.claude/settings.json establishes persistent control over the agent's global configuration directory, which affects future behavior across projects. In a skill that wires command hooks, this persistence makes the setup materially more dangerous because it creates durable, cross-context execution of local scripts.

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

The documented use of sessions_send enables moving learned content across session boundaries, which can become an exfiltration path if the sent message includes secrets, raw outputs, or sensitive context. In a skill centered on autonomous learning capture, that capability increases the risk of unauthorized disclosure beyond the original session scope.

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

The description says to use the skill when a user 'requests a capability that doesn't exist,' which is a very broad condition that can occur in many ordinary conversations. Because the trigger scope is expansive and lacks clear exclusions or negative examples, this could cause the skill to activate more often than intended.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest frames this as a logging and review skill for continuous improvement, centered on recording failures, corrections, and missing capabilities. The file goes beyond that by instructing promotion into global behavior/workflow files (CLAUDE.md, AGENTS.md, SOUL.md, TOOLS.md) and later adding an automatic skill-extraction workflow, which changes broader agent behavior and creates new reusable skills rather than merely capturing learnings.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file is documented as skill-b / Self-Improvement, but the install commands tell users to install and clone skill-gitee. That is an active contradiction in the documentation because following those commands would obtain a different skill than the one being described.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
87% confidence
Finding

The skill instructs creation of persistent files under ~/.openclaw/workspace/.learnings, enabling cross-session retention of data outside the immediate task context. Persistent storage is risky because captured errors, corrections, and summaries may contain sensitive project details that survive across sessions and could later be surfaced to other agents or tasks.

Content

Scanner excerpt · SKILL.md (reported line 82)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

Automatic logging triggers based on common conversational phrases can cause the agent to persist user statements, corrections, or context to disk with weak constraints. In practice, this raises privacy and prompt-injection risk because ordinary conversation may be transformed into durable records or fed into future agent context without sufficiently explicit consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The metadata declares the slug as "skill-a" while the provided skill is identified as "skill-b", creating an identity mismatch. This can cause the wrong skill to be published, updated, trusted, or invoked, and in a multi-skill environment may enable confusion, replacement, or accidental execution of unintended content.

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

The guidance creates persistent hook configuration in .claude/settings.json, causing behavior to survive across sessions rather than being limited to a one-off action. In this context, persistence matters because it continually reintroduces automatic script execution and reminder injection, which can be forgotten by users and later abused through script modification or unexpected trigger conditions.

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

An empty matcher causes the hook to fire on every prompt, creating an always-on execution path for a shell command during all user interactions. In this skill's context, that broad trigger increases exposure to prompt-derived sensitive data and makes any future change to the script immediately pervasive across the workflow.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Installing the hook in ~/.claude/settings.json enables automatic command execution across all sessions and repositories, greatly widening blast radius beyond a single project. If the referenced script is modified, replaced, or contains unsafe behavior, it will affect every prompt the user submits in that environment.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The Codex configuration also uses an empty matcher, so the command hook runs for every prompt without clear scope constraints. Always-on hooks are risky in agent environments because they normalize automatic command execution and increase the chance of unnecessary exposure of user inputs or unintended side effects from script changes.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document states that the scripts 'only output text' and 'don't modify files or run commands', but the configuration explicitly registers them as command hooks executed by the agent runtime. This creates a misleading security boundary: operators may trust these hooks as harmless text emitters even though any shell script invoked this way executes with the agent's privileges and can be changed later to perform arbitrary actions.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
82% confidence
Finding

Persistent storage of learnings is central to the feature, but it creates a real retention risk because stored content can survive resets, be reused in later sessions, and accumulate sensitive or attacker-influenced material. In this skill context, persistence is expected, yet still dangerous without retention limits and content hygiene controls.

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

The guide expands a narrowly scoped learning-capture skill into editing persistent workspace prompt files and participating in cross-session context handling. That broadens authority and data reach beyond the stated purpose, creating a prompt-persistence and context-poisoning risk where mistakes or unsafe learnings can influence future sessions and agents.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Reading other sessions' transcripts is not necessary for simple learning capture and materially increases exposure to secrets, personal data, and unrelated task context. Because transcripts often contain raw prompts, tool output, and credentials, this creates a cross-session confidentiality breach and a larger prompt-injection surface.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger definitions are broad enough to activate on many ordinary failures, corrections, or model surprises, which can cause the skill to persist noisy or sensitive content without strong relevance checks. Over-triggering increases the chance of storing harmful prompt injections, incorrect conclusions, or sensitive operational details into persistent memory.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill focused on capturing learnings, errors, and corrections for continuous improvement. This script goes beyond recording or reviewing learnings and actively generates a new skill directory and SKILL.md scaffold, which is a separate skill-authoring capability rather than straightforward learning capture.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Creating directories, writing new manifest documentation, and instructing the user to add executable code are capabilities for authoring and bootstrapping new skills. That is not an obvious or necessary requirement for a skill whose stated purpose is to capture failures, corrections, and discovered better approaches.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The instructions create persistent learning storage without clearly warning that data may survive across sessions and influence future behavior. This undermines informed consent and can lead to accidental retention of sensitive information, especially in a self-improvement or memory-oriented skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.