Back to skill

Security audit

Error-Driven Evolution

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent learning purpose, but it creates persistent agent rules from corrections and imports community guidance without enough approval, validation, or containment.

Install only if you are comfortable with the agent keeping workspace-level behavioral rules that affect later decisions. Review every new lesson before it is saved, avoid storing secrets or project-specific sensitive details, and pin or manually review any community rule files before using them as guidance.

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:12
Finding
Unvalidated Corrections Can Poison Persistent Agent Memory<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:12-16`, `SKILL.md:47-77`, and `SKILL.md:87-100` **Vulnerability Type**: Persistent memory poisoning through untrusted rule creation **Risk Level**: High ### Vulnerable Code Snippets ```markdown When an agent makes an error or gets corrected, it must: 1. Extract a **rule** (not a story) 2. Write it to `lessons.md` in its workspace 3. Scan relevant rules **before** future decisions in that domain 4. Optionally share anonymized rules to the community repo ``` ```markdown ## When to Record Record a rule when: 1. **User corrects you** — explicit feedback 2. **User overrides your output** — they redo your work 3. **Same error twice** — second occurrence MUST become a rule 4. **Near miss** — you catch yourself about to repeat a mistake Do NOT record: one-off technical glitches, user preference changes (those go in MEMORY.md). ## How to Record 1. Stop. Don't apologize at length. 2. Identify the category. 3. Write the rule in imperative form. 4. Append to lessons.md (never overwrite). 5. Confirm briefly: "Added to lessons: [title]" ``` ```markdown 3. Add to your startup instructions: ```markdown - On startup: skim top-100.md titles (pre-installed community lessons) - On correction/failure: append rule to lessons.md - Before decisions: scan lessons.md + top-100.md for [CATEGORY] rules ``` ``` ### Technical Analysis The skill treats user corrections, output overrides, and perceived mistakes as sources of persistent executable guidance. It directs the agent to append extracted rules to `lessons.md` and consult those rules before future decisions and on subsequent startups. The process does not require: - Approval before persistence. - Verification that a correction is accurate or trustworthy. - Provenance identifying the user or session that supplied the rule. - Restrictions preventing rules from weakening security or tool-use policies. - Project, user, or trust-boundary isolation. - Conflict detect ...[truncated 2081 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat every proposed lesson as untrusted data rather than authoritative instruction. 2. Require explicit, informed user approval before writing a new persistent rule. 3. Store provenance with each lesson, including source user, session, timestamp, affected project, and approval status. 4. Reject lessons that attempt to modify security controls, permission boundaries, confirmation requirements, credential handling, or instruction precedence. 5. Validate proposed lessons against a strict schema and an allowlist of acceptable behavioral domains. 6. Isolate lesson files by workspace, project, and user to prevent cross-context contamination. 7. Load lessons as advisory context only; explicitly state that they cannot override system, developer, safety, access-control, or tool-use policies. 8. Implement conflict detection and present conflicting rules for human review. 9. Add versioning, expiration, rollback, and audit logging for all lesson changes. 10. Provide a review queue so corrections are not automatically persisted during an adversarial interaction. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:79
Finding
Unpinned Community Rules Create an External Instruction Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:79-83` and `SKILL.md:93-111` **Vulnerability Type**: Unverified external behavioral dependency **Risk Level**: Medium ### Vulnerable Code Snippets ```markdown ## Community Sharing Share anonymized lessons to help other agents: https://github.com/anthropic-ai/agent-lessons See references/community-sharing.md for the anonymization and submission process. ``` ```markdown 2. Copy `community/top-100.md` to your workspace as `top-100.md` — this is your pre-installed immune system. Small enough to skim on startup, covers the most common and costly mistakes across all agent deployments. 3. Add to your startup instructions: ```markdown - On startup: skim top-100.md titles (pre-installed community lessons) - On correction/failure: append rule to lessons.md - Before decisions: scan lessons.md + top-100.md for [CATEGORY] rules ``` ## Loading Strategy Your agent has two rule files: | File | Source | Load on startup | Size target | |------|--------|-----------------|-------------| | `lessons.md` | Your own mistakes | Yes, fully | Grows organically | | `top-100.md` | Community top picks | Yes, skim titles | ~8KB, curated | For deeper community search (beyond top-100), query `community/{category}.md` files on-demand when facing an unfamiliar situation. ``` ### Technical Analysis The skill instructs users or agents to copy community-maintained Markdown into the workspace and consult it during startup and before decisions. It also recommends querying additional community category files on demand. No pinned commit, immutable release, cryptographic hash, signature, trusted-maintainer policy, or mandatory local review process is specified. Because the imported files contain behavioral rules, they operate as an external instruction dependency rather than passive documentation. If the external repository, a maintainer account, or its contribution process is compromised, malicious instructions could be insert ...[truncated 1810 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin community content to a reviewed immutable commit or signed release rather than a mutable branch. 2. Publish and verify cryptographic hashes for every imported rule file. 3. Require signed commits or release artifacts from explicitly trusted maintainers. 4. Review imported rules locally before making them available to the agent. 5. Enforce a strict machine-readable schema instead of loading arbitrary Markdown as guidance. 6. Reject external rules that discuss credentials, permission escalation, safety-policy changes, instruction precedence, or bypassing confirmation. 7. Mark imported rules as untrusted advisory content that cannot override system, developer, safety, or local access-control policies. 8. Maintain an allowlisted local snapshot and update it only through a controlled review process. 9. Record the source URL, commit identifier, hash, import date, and reviewer for each community file. 10. Add rollback and revocation mechanisms for compromised community releases. 11. Avoid on-demand retrieval of mutable category files during active decision-making; retrieve, validate, and approve them before use. ]]>
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 (4)

Anti-Refusal Statement

High
Category
Anti-Refusal
Content
## How to Record

1. Stop. Don't apologize at length.
2. Identify the category.
3. Write the rule in imperative form.
4. Append to lessons.md (never overwrite).
Confidence
55% confidence
Finding
Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Missing User Warnings

High
Confidence
97% confidence
Finding
The community-sharing feature encourages sending lessons to an external repository but does not require explicit user consent, preview, or strong safeguards against leaking sensitive operational details. 'Anonymized' is underspecified and can fail in practice, so mistakes, project names, internal paths, or user data could be disclosed externally.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The activation criteria are broad enough to trigger during many normal interactions, including generic corrections or routine decision-making. That increases the chance the skill will run unexpectedly, causing unsolicited file reads/writes and behavior changes without an explicit user request.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill instructs the agent to write to `{workspace}/lessons.md` automatically after errors or corrections, but it does not foreground that this modifies user workspace state. In environments where agents should minimize side effects, silent persistence can create integrity, privacy, and auditability issues.

Static analysis

No suspicious patterns detected.