Back to skill

Security audit

Proactive Self Improving

Security checks for vulnerabilities and agentic risk

Overview

The skill is not overtly malicious, but it can automatically store task and user-derived details and promote them into persistent agent rules or new skills without a clear approval gate.

Install only if you want an agent that keeps durable local learning records and can change future agent behavior. Review or constrain writes to .learnings/, AGENTS.md, TOOLS.md, SOUL.md, and skills/; require explicit approval before promotion or skill creation; avoid using it around secrets, private customer data, or sensitive research unless redaction rules are added.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:53
Finding
Untrusted User Corrections Can Be Promoted into Persistent Agent Instructions## Vulnerability Details **File Location**: `SKILL.md`, lines 53–245 **Vulnerability Type**: Persistent agent memory poisoning **Risk Level**: Critical ### Vulnerable Code Snippets At line 53, user-controlled corrections are designated as learning records: ```markdown | 2 | User correction ("incorrect"/"should be..."/"Actually...") | `LEARNINGS.md` | `correction` | ``` At lines 205–218, sufficiently important learnings are written into permanent agent instruction files: ```markdown When a learning is sufficiently important and general, refine it and write it into a permanent file: | Learning type | Promote to | Example | |---|---|---| | Workflow improvement | `AGENTS.md` | "Spawn each paper independently during batch processing" | | Tool usage technique | `TOOLS.md` | "Use a 3-second interval for the Semantic Scholar API rate limit" | | Behavioral pattern | `SOUL.md` | "Use unclassified/ when classification is uncertain" | Promotion steps: 1. Refine: condense the lengthy learning into a concise rule 2. Write: add it to the appropriate section of the target file 3. Update the original entry: Status → `promoted`, and fill in `Promoted-To` 4. Record a log: append a `promote` record to CHANGELOG.md ``` At lines 221–229, repeated patterns trigger automatic promotion: ```markdown When recording a new entry, first search for similar old entries: ```bash grep -r "keyword" .learnings/ ``` - If a similar entry is found → add reciprocal `See Also` links - **If the same pattern occurs ≥3 times** → trigger automatic promotion and write it into a permanent file - Repeated occurrence indicates that it is not an isolated event and should be solidified as a rule ``` At lines 238–249, persisted learnings can also be converted into new Skills: ```markdown When a learning meets any of the following conditions, it can be extracted as an independent skill: | Condition | Description | |---|---| | Has 2+ See Also links | Similar problems repeatedly occur | | Status is r ...[truncated 3237 chars]
Remediation
## Remediation Suggestions 1. **Remove automatic promotion of user-derived content.** Never write corrections, external content, or task observations directly into `AGENTS.md`, `TOOLS.md`, `SOUL.md`, or another Skill without explicit human approval. 2. **Separate records from instructions.** Store learnings as inert data in a structured format that is not automatically loaded as agent policy. Do not interpret Markdown recorded from users as trusted instructions. 3. **Require approval for sensitive writes.** Present the proposed rule, its source, target file, and exact diff to an authorized reviewer. Require affirmative approval before modifying persistent agent-control files or creating Skills. 4. **Track provenance and trust.** Add mandatory fields identifying the source, author, session, trust level, and approval status. User corrections and externally sourced material must remain marked as untrusted. 5. **Enforce a policy allowlist.** Reject proposed rules that affect security controls, identity, permissions, secrets, data disclosure, external communications, command execution, or instruction precedence. 6. **Sanitize stored content.** Escape Markdown, XML, shell fragments, and prompt-like directives where appropriate. Apply strict size and character limits and prohibit embedded instructions from becoming executable context. 7. **Replace repetition with evidence-based validation.** Repetition must not establish trust. Require independent verification, tests, and reviewer approval regardless of how often a claim appears. 8. **Protect persistent files.** Restrict write permissions for `AGENTS.md`, `TOOLS.md`, `SOUL.md`, and `skills/` to a dedicated approval mechanism. The learning recorder should have append-only access solely to an inert audit store. 9. **Add rollback and audit controls.** Record immutable diffs, approving identities, timestamps, and provenance for every accepted promotion. Provide a reliable mechanism to revoke poisoned rules and identif ...[truncated 229 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Hidden Instructions

High
Category
Prompt Injection
Content
```markdown
# Changelog

<!-- SCHEMA: {"ts":"ISO-8601","action":"add|promote|extract|resolve","type":"learning|error|feature","id":"entry ID","summary":"≤100字","target":"晋升目标(可选)"} -->

\```jsonl
{"ts":"2026-03-02T11:00:00+08:00","action":"add","type":"learning","id":"LRN-20260302-001","summary":"Semantic Scholar API 需要 3s 间隔防限流"}
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill description directs automatic writes to multiple persistent files and changelogs but does not prominently warn that user corrections, failures, and contextual details may be stored long-term. This can lead to unintentional retention of sensitive user content, internal prompts, identifiers, or operational metadata.

Ssd 3

Medium
Confidence
97% confidence
Finding
The 'must write worthwhile experience to files' rule encourages broad capture of interaction details whenever the model judges something memorable. This semantic pressure toward over-collection makes accidental storage of sensitive context likely and can create a durable cross-session memory channel without proper governance.

Ssd 3

Medium
Confidence
98% confidence
Finding
The skill explicitly instructs the agent to persist user corrections and newly supplied information into local learning files and changelogs. Because these entries are natural-language summaries, they can easily include secrets, personal data, proprietary facts, or sensitive conversational context that later becomes accessible to other tasks or users with file access.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill makes post-task review a default trigger for recording learnings after every completed task, which can cause the skill to activate on nearly all interactions. This increases the attack surface for unintended file writes, excessive persistence, and capture of sensitive context even when no explicit user request to retain data was made.

Ssd 3

Medium
Confidence
95% confidence
Finding
The task-review guidance specifically calls for recording conclusions, classification decisions, scoring rationales, and search tactics from research workflows. In practice, this can cause protected source content, internal evaluation reasoning, or sensitive document summaries to be copied into persistent files outside the original data boundary.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
文件标题、描述、规则和示例几乎全部以中文撰写,并在触发词和输出结构上默认中文使用场景,但没有提供语言切换、用户偏好继承或明确说明这是仅限中文环境的技能。按规则,这构成潜在的语言/locale 强制要求。

Static analysis

No suspicious patterns detected.