Back to skill

Security audit

Keep Learning Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is a learning and memory framework, but it asks agents to run unreviewed local PowerShell scripts and can promote conversation-derived notes into persistent agent instructions.

Review this skill before installing. It may be acceptable in a controlled personal setup, but only enable the PowerShell startup scripts after auditing them, locking down their file permissions, and requiring explicit approval before any learning record is promoted into AGENTS.md or other persistent agent instruction files.

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:72
Finding
Untrusted Learning Content Can Be Promoted into Persistent Agent Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:72`, `SKILL.md:138`, `SKILL.md:182` **Vulnerability Type**: Persistent memory poisoning through unvalidated promotion **Risk Level**: High ### Vulnerable Code Snippets `SKILL.md:72` permits learning records to originate from conversations and user feedback: ```markdown **Source**: conversation | error | user_feedback | self_discovery ``` `SKILL.md:138` explicitly permits promoted records to be written into an authoritative Agent instruction file: ```markdown | **promoted** | 已提升到更高层 | 如写入 AGENTS.md | ``` `SKILL.md:182` directs later sessions to load the affected persistent files: ```powershell Read SOUL.md, AGENTS.md, MEMORY.md ``` ### Technical Analysis The Skill establishes a workflow in which content derived from conversations or user feedback can be stored as a learning record and subsequently promoted into `AGENTS.md`. It also instructs the Agent to read `AGENTS.md` during future session startup. The documented workflow does not define a trust boundary between untrusted conversational content and authoritative persistent instructions. It provides no mandatory trusted-user approval, provenance enforcement, instruction filtering, schema validation, or separation between descriptive knowledge and executable Agent directives. An attacker can therefore submit content framed as feedback or a reusable lesson that includes instructions intended to alter future Agent behavior. If that content passes through the documented promotion workflow into `AGENTS.md`, it can influence subsequent sessions whenever the file is loaded. The risk is persistent rather than limited to the session in which the content was supplied. The audit found no evidence that promotion is automatically performed by executable code in this package. Exploitation depends on an Agent or operator following the documented workflow and promoting attacker-controlled content. ### Attack Path 1. An attacker provides crafted con ...[truncated 1302 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Prohibit direct promotion of raw conversation, error, or user-feedback content into `AGENTS.md`, `SOUL.md`, or equivalent authoritative instruction files. 2. Store descriptive knowledge separately from executable Agent instructions. Treat `.learnings` content as untrusted data when it is read. 3. Require explicit approval from an authenticated, trusted operator before modifying persistent instruction files. 4. Preserve provenance for every promoted record, including its original source, author, timestamp, content hash, reviewer, and approval decision. 5. Restrict promoted records to a predefined schema that contains factual summaries rather than free-form instructions. 6. Detect and reject imperative language, tool directives, role changes, requests to ignore prior instructions, encoded payloads, and attempts to modify security constraints. 7. Present an exact diff before promotion and require confirmation for every destination file. 8. Keep versioned backups and an append-only audit log so unauthorized changes can be identified and rolled back. 9. Apply least-privilege filesystem controls so routine learning operations cannot write to authoritative Agent configuration files. 10. Add adversarial tests demonstrating that malicious user feedback cannot become a persistent instruction. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:186
Finding
Automatic Startup Execution Relies on Unbundled and Unverified External PowerShell Scripts<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:186-189`, `README.md:51-53`, `_meta.json:17-20` **Vulnerability Type**: Unverified execution of external local scripts **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:186-189` directs the Agent to execute two scripts during session startup: ```powershell # 2. 运行自我修复 G:\clawbot\config\self-repair.ps1 # 3. 加载配置 G:\clawbot\config\autoload-configs.ps1 ``` `README.md:51-53` repeats the automatic execution instruction: ```powershell # 会话启动自动运行 G:\clawbot\config\self-repair.ps1 ``` `_meta.json:17-20` registers the same external paths: ```json "integration": { "self_repair_script": "G:\\clawbot\\config\\self-repair.ps1", "autoload_script": "G:\\clawbot\\config\\autoload-configs.ps1", "learnings_dir": ".learnings/" } ``` ### Technical Analysis The Skill instructs the Agent to run PowerShell scripts located at fixed paths outside the reviewed package. Neither script is present in the supplied project, whose audited contents consist only of `README.md`, `SKILL.md`, and `_meta.json`. Consequently, the scripts' behavior, provenance, update process, access controls, and integrity cannot be verified from this artifact. The effective behavior of the Skill can therefore change without any modification to the reviewed package. Any process or user capable of replacing or editing either external script can cause arbitrary PowerShell commands to execute when an Agent follows the documented startup workflow. This is an insecure trust-boundary and integrity-control issue. The package itself does not contain a malicious payload, and the audit found no evidence that these paths are currently attacker-controlled. Exploitation requires write access to one of the referenced scripts or a deployment process that installs an untrusted script at the expected path. ### Attack Path 1. The Skill is installed in an environment that follows its documented session-startup procedure. 2. An attacker, com ...[truncated 1335 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Include all required scripts inside the reviewed Skill package rather than referencing mutable files outside it. 2. Review the bundled scripts and pin their expected cryptographic hashes in signed package metadata. 3. Before execution, resolve each path canonically and verify its hash, signature, ownership, and filesystem permissions. 4. Refuse execution when verification fails or when the script is writable by untrusted users or processes. 5. Avoid automatic session-startup execution. Require explicit operator consent or a narrowly scoped, documented enablement setting. 6. Execute scripts with the least-privileged account and constrain filesystem, network, registry, and process access where the platform permits. 7. Use an allowlisted PowerShell execution policy and signed scripts from a trusted publisher; do not rely on execution policy alone as a security boundary. 8. Record the verified script hash, signer, path, invocation time, and result in an audit log. 9. Remove hardcoded machine-specific paths and use a controlled installation directory whose permissions are established by the installer. 10. If external scripts must remain supported, clearly classify them as separate trusted dependencies and audit them before enabling this integration. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The primary descriptive text for the skill is presented in Chinese, and the document does not indicate that other languages are supported or that Chinese is optional. This can violate a language/locale policy when users are not given a choice of language or informed that the skill is region- or language-specific.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The file's descriptive and operational content is predominantly written in Chinese, with no indication that users may choose another language. Under the language/locale policy, forcing a specific language without explicit opt-in or documented justification is a natural-language policy concern.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill explicitly documents automatic execution of local PowerShell scripts during session startup, including a self-repair script and autoloaded configuration. Even though this file is markdown, embedding startup automation that runs local scripts without consent, validation, or safety constraints can normalize unsafe behavior and lead an agent or operator to execute system-impacting code implicitly. The context makes this more dangerous because the automation is framed as a default workflow for every session, increasing frequency and blast radius if the referenced scripts are modified or malicious.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The natural-language description is presented only in Chinese and does not offer any user language choice or explain a region-specific requirement. That can indicate a language or locale policy issue when the skill appears to impose a specific language without user opt-in.

Vague Triggers

Low
Confidence
81% confidence
Finding
This manifest describes the skill in broad terms as a continuous-learning and self-improvement framework, but it does not indicate when the skill should activate, what phrases invoke it, or any exclusions. In a manifest file, that lack of trigger specificity can lead to overly broad matching or unintended invocation.

Static analysis

No suspicious patterns detected.