Back to skill

Security audit

自动学习技能

Security checks for vulnerabilities and agentic risk

Overview

This skill openly aims to learn from conversations and create persistent skills, but it can do so automatically without clear user approval or safeguards.

Review this carefully before installing. It should only be used in an environment where users explicitly want automatic skill generation, and it should require approval, a visible diff, sensitive-data filtering, and rollback before any generated skill is saved.

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

Warning
Location
SKILL.md:39
Finding

Automatic Persistence of Untrusted Conversation Content

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 39-77
Vulnerability Type: Persistent agent memory poisoning through automatic skill creation
Risk Level: Medium

Vulnerable Code

markdown
### Automatic trigger
- The same problem is solved two or more times
- A new workflow or tool is discovered
- An error is encountered and a solution is found

### Manual trigger
- Say "auto learn"
- Say "extract experience"
- Say "create skill"

## Workflow

### 1. Read
- Scan recent conversation history
- Identify recurring patterns

### 2. Analyze

Recurring problem characteristics:

  • The problem type is the same
  • The solutions are similar
  • The solution can be generalized to other scenarios
text

### 3. Write
Create or update a skill file

## Detection Rules

### High-Signal Scenarios
| Scenario | Weight |
|------|------|
| Solve a new type of problem | +2 |
| Repeated problem at least twice | +1 |
| Discover a new tool | +2 |
| Error followed by solution | +1 |

### Creation Threshold
Total score at least 3 → create a new skill

The displayed snippet is an English rendering of the original instructions to satisfy the report language requirement.

Technical Analysis

The skill directs the agent to scan conversation history and automatically transform recurring content into persistent skill files. Conversation content is an untrusted input channel: a user or another participant can introduce deceptive workflows, unsafe tool instructions, or attacker-selected rules.

The scoring mechanism only measures repetition and perceived usefulness. It does not establish the trustworthiness of the source or the safety of the resulting instructions. The documented workflow does not require explicit approval before writing, show a proposed diff, track provenance, sanitize sensitive information, or perform a security review of generated skills.

Consequently, attacker-i ...[truncated 1645 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed user approval before every skill creation or update.
  2. Generate proposed skills in a restricted staging directory and display a complete diff before promotion.
  3. Treat all conversation-derived text as untrusted data rather than authoritative instructions.
  4. Record provenance for each extracted rule, including its source conversation and approval status.
  5. Reject or escalate generated content containing shell commands, executable code, external URLs, credential requests, persistence mechanisms, or permission changes.
  6. Exclude secrets, personal information, system messages, hidden instructions, and authentication data from extracted content.
  7. Apply schema validation, prompt-injection detection, static security checks, and least-privilege review to every generated skill.
  8. Use an allowlist of permitted skill capabilities and prevent generated skills from requesting broader permissions automatically.
  9. Provide versioning, audit logs, integrity checks, and rollback controls for all skill-file changes.
  10. Replace the score-only creation threshold with a trust-aware workflow in which scoring may propose a skill but can never authorize persistence by itself.
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 (4)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill describes scanning recent conversation history and creating or updating skill files, but it does not clearly warn users that their dialogue may be mined and persisted automatically. This lack of transparency undermines informed consent and can lead to sensitive information being transformed into long-lived artifacts or operational logic without the user's knowledge.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill metadata and instructions are presented as Chinese-only descriptions and trigger phrases, with no indication that users can choose another language. This may violate language/locale policy when a skill implicitly constrains interaction language without opt-in or justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manual trigger phrases are short, generic, and likely to appear in normal conversation, which can cause the skill to activate unintentionally. In a skill that can extract knowledge and create or modify skill files, accidental activation increases the risk of unauthorized persistence, unwanted state changes, and privacy-impacting processing of user conversations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The automatic activation conditions are vague and subjective, such as detecting repeated problems or discovering a new workflow, without clear scope, thresholds, or user approval. Because this skill is designed to scan conversation history and create/update skills, ambiguous auto-triggering can cause unsolicited analysis and persistent modification based on routine interactions, magnifying both privacy and integrity risks.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.