Back to skill

Security audit

keep-learning

Security checks for vulnerabilities and agentic risk

Overview

This skill is not overtly malicious, but it needs review because it can pull repository changes, read a user-selected directory, and persist extracted knowledge into agent memory.

Install only if you are comfortable with the agent reading the selected directory, running git pull in it, and retaining summaries/indexes in agent memory. Prefer a pinned release or verified commit, avoid using the -y install flag, review the repository before learning, and do not point it at directories containing secrets or private data you do not want remembered.

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

Warning
Location
SKILL.md:78
Finding

Untrusted Repository Content Can Poison Persistent Agent Memory

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 78-125
Vulnerability Type: Persistent ingestion of untrusted repository content
Risk Level: Medium

Vulnerable Code Snippet:

markdown
### Step 2: Git Pull (If Applicable)

Check if knowledge base is a git repository and pull latest changes before learning.

### Step 3: Scan Files

Scan for supported files. Exclude: .git, node_modules, .obsidian, __pycache__, .venv
markdown
### Step 5: Read and Extract Knowledge

For each file: read content, identify theme/concepts/conclusions, extract key knowledge.

### Step 6: Store L1 Core Memory

Create L1 memory entries using update_memory with appropriate category:
- expert_experience: Domain expertise, best practices
- project_introduction: Project/product overviews
- learned_skill_experience: Reusable methods, procedures

Title format: [Domain] Concise Topic Description

### Step 7: Build L2 Knowledge Index

Create knowledge index with file path, theme, keywords mappings.

Technical Analysis

The workflow pulls remote Git changes and subsequently treats supported repository files as trusted knowledge suitable for persistent agent memory. It does not define a trust boundary between source data and agent instructions, require review of newly pulled changes, detect instruction-like content, or obtain confirmation before writing extracted material through update_memory.

An attacker who can modify the configured repository can add adversarial text that appears to be documentation or domain guidance. The learning workflow may summarize that content into L1 memory or include it in the L2 index. Because L1 memory is designed to surface automatically in later conversations, attacker-controlled rules or misleading conclusions may continue influencing the agent after the original learning session ends.

The issue does not directly grant operating-system privileges or establish code exe ...[truncated 1234 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat all repository contents, including documentation and comments, as untrusted data rather than executable agent instructions.
  2. Display the pulled commit, changed files, and proposed memory updates before ingestion, and require explicit user approval.
  3. Add detection and rejection rules for content that attempts to redefine agent behavior, request tool use, override safety policies, or instruct the agent to persist new rules.
  4. Store source provenance with every memory entry, including repository identity, commit hash, file path, and extraction timestamp.
  5. Provide a reviewable memory diff and rollback mechanism for every learning session.
  6. Allow users to configure file, directory, content, and secret-pattern exclusions.
  7. Prefer trusted branches or signed commits and warn when repository ownership, remote URLs, or signature status changes.
  8. Separate factual summaries from behavioral instructions and prohibit source files from creating persistent operating rules.

T08 · Insecure Dependencies

Warning
Location
README.md:25
Finding

Installation Instructions Use Mutable and Unpinned Upstream Sources

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 25-37
Vulnerability Type: Unpinned installation dependencies and mutable supply-chain sources
Risk Level: Medium

Vulnerable Code Snippet:

markdown
npx skills add nileader/keep-learning
markdown
npx skills add nileader/keep-learning -g -y
markdown
clawdhub install keep-learning
markdown
git clone https://github.com/nileader/keep-learning.git ~/.openclaw/skills/keep-learning

Technical Analysis

The documented installation methods do not pin the installer, skill release, or Git revision to a specific verified version or commit. The npx command can obtain and execute mutable package content, while the marketplace command resolves the current registry artifact. The Git command clones the repository's current default branch rather than a reviewed commit.

Consequently, the material installed by these commands can differ from the version covered by this audit. If an upstream package, registry entry, maintainer account, repository, or default branch is compromised, users may retrieve altered skill instructions or executable installer behavior.

The optional -y flag further reduces opportunities for users to inspect or reject package-manager prompts, although it is not independently a vulnerability.

Attack Path

  1. An attacker compromises an upstream installer package, marketplace release, repository, or authorized publisher account.
  2. The attacker publishes a malicious replacement under the same mutable package, skill, or branch reference.
  3. A user follows one of the documented unpinned installation commands.
  4. The package manager, marketplace client, or Git client retrieves content that was not part of the audited revision.
  5. Depending on the installation mechanism and malicious content, attacker-controlled installer behavior or skill instructions are installed with the invoking user's permissi ...[truncated 656 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the installer package and skill to explicit, reviewed versions.
  2. For Git installation, document checkout of a specific release tag or immutable commit hash.
  3. Publish SHA-256 checksums or cryptographic signatures for release artifacts and provide verification commands.
  4. Prefer signed tags and enforce signature verification before installation.
  5. Avoid presenting confirmation-bypass flags such as -y as a default installation path.
  6. Document the expected repository origin, release version, and checksum so users can detect source substitution.
  7. Re-audit each published release and ensure registry artifacts are reproducibly generated from the corresponding signed source revision.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README advertises automatic git pulls, incremental processing, and persistent runtime storage without prominently warning users that the skill may modify local repositories, read large amounts of local content, and retain derived knowledge in memory and config files. In a skill designed to ingest local directories, lack of clear disclosure materially increases the risk of unintended data exposure, repository state changes, and surprise persistence.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · README.md (reported line 29)May include surrounding context.

md
npx skills add nileader/keep-learning -g -y

- `-g` Install globally (available across all projects)
- `-y` Skip confirmation prompts

### Via ClawdHub

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger phrase keep learning is broad and naturally occurring, making accidental invocation plausible in ordinary conversation. In this skill's context, accidental activation is more dangerous because the skill can read local directories, store persistent memory, and perform git-related operations, so an ambiguous trigger can lead to unintended data processing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill is presented as learning from local directories, but it explicitly instructs performing a git pull, which introduces remote network interaction and mutates the target repository before analysis. This can surprise users, ingest unreviewed remote content, and alter the working tree or project state in ways not clearly disclosed by the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill omits clear up-front warning that it may both pull remote repository changes and persist extracted content into agent memory and local runtime files under ~/.keep-learning. This reduces informed user consent and can lead to unexpected data exfiltration into memory stores, retention of sensitive local content, or unintended local state changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The usage section includes the trigger phrase "持续学习知识" alongside English, but the document does not explain whether the skill expects or prioritizes a particular language or locale. This can create ambiguity around language behavior and may amount to an undocumented locale preference in natural-language instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language description hard-codes activation in specific languages (持续学习知识 and keep learning) and the usage section repeats those exact language-bound phrases. Under SQP-3, forcing specific language/locale behavior without opt-in can be a policy issue when no user choice or justification is documented.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
71% confidence
Finding

The instructions explicitly require halting until the user provides a valid path, emphasizing no further action before confirmation. The subsequent workflow is written as unconditional operational steps, which creates an intent-level contradiction about whether the skill must block or may proceed into repository and scan logic.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.