Back to skill

Security audit

Use Self-Improving

Security checks for vulnerabilities and agentic risk

Overview

This skill is read-only and purpose-aligned, but it automatically searches persistent local agent knowledge across many ordinary tasks without clear user consent or tight scope limits.

Install only if you want the agent to consult ~/.agent-knowledge/ automatically during many tasks. Keep sensitive records out of that knowledge base or require an operational rule that the agent asks before opening local knowledge for unrelated projects, external-impact actions, or referenced original files.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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 (1)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:10
Finding

Broad Automatic Access to Persistent Local Agent Knowledge

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 10–14 and 27–29
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: Medium

Complete Relevant Snippet

The following is an English translation of the relevant Skill instructions:

markdown
- Automatic trigger: When receiving a task with a clear objective and target, before beginning substantive processing, extract short phrases based on the task object or domain, objective or action, and key issue, and lightly search the experience/current INDEX for relevant experience.
- Automatic trigger: Existing project locations, file summaries, historical decisions, stable rules, failure guardrails, or similar experience may materially affect the current judgment or action.
- Automatic trigger: Before using an external tool to send, publish, modify, delete, deploy, authorize, or approve something, or when an external tool returns an abnormal result and a retry is being prepared, extract short phrases based on the tool or product, action, and key object, and search the experience index.
- Automatic trigger: The message or context contains a project, path, or file name, or retrospective clues such as “previously,” “before,” “similar,” “rules,” “history,” or “why it was done this way.”
- Automatic trigger: The current conclusion may conflict with an old conclusion, existing responsibility, or existing practice, requiring a search before judgment.
markdown
- The data root consists of Markdown files, CSV files, original file paths, and current system state under `~/.agent-knowledge/`; the INDEX.md file in each of the four knowledge and experience directories is read first, while `archive/` is not read by default.
- Use the host's native read-only file API, fixed-string search, and safe Markdown/CSV parsers; do not depend on a particular command, runtime, or network connection.
- For long files, read only the relevant headings, para
...[truncated 3160 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit user approval before accessing ~/.agent-knowledge/, except when the user directly requests a historical or knowledge-base lookup.
  2. Remove the automatic trigger for every task with a clear objective and target. Trigger retrieval only when persistent knowledge is necessary to fulfill the request.
  3. Limit searches to the current project, workspace, customer, or tenant scope. Reject entries whose scope cannot be conclusively matched.
  4. Present candidate source names and scopes before opening their full contents, particularly when they reference files outside the current workspace.
  5. Introduce a default-deny policy for credentials, personal data, private keys, environment files, security incident records, and other sensitive paths.
  6. Prevent persistent information from being reproduced in responses unless it is directly relevant and the user is authorized to receive it.
  7. Keep the existing read-only restrictions and enforce them at the tool-permission layer rather than relying solely on natural-language instructions.
  8. Record provenance internally for retrieved facts so that current workspace evidence can take precedence over historical material without exposing unrelated source content.
  9. Apply strict per-task retrieval limits and clear retrieved context when the task or project scope changes.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

描述中写明“找不到、证据不足或存在多个对象时会用普通话说明”,这会在特定情形下强制输出特定语言,而未体现用户选择或事先同意。根据语言/locale 政策,未经用户选择即强制特定语言属于自然语言策略违规。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The auto-trigger conditions are broad and overlap with ordinary task phrasing such as references to prior work, project paths, history, rules, or any externally impactful tool action. This can cause the skill to run in many routine contexts without explicit user intent, expanding access to local knowledge sources and potentially influencing decisions with irrelevant or sensitive historical context.

Content

No source excerpt is available for this finding.