Back to skill

Security audit

Thinking - 深度思考与规划

Security checks for vulnerabilities and agentic risk

Overview

This planning skill is not clearly malicious, but it needs review because it can search and show prior memories or session history after broad trigger phrases.

Install only if you are comfortable with the agent using prior memory and historical sessions to plan tasks. Prefer invoking it explicitly with /thinking, avoid using it around sensitive prior conversations, and review any generated related-memory section before sending results to chats, documents, or external tools.

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:336
Finding

Overbroad Access to Persistent Memory and Historical Sessions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 336–351
Vulnerability Type: Unnecessary access to persistent agent memory and historical sessions
Risk Level: Medium

Vulnerable Code Snippet

typescript
// Search MEMORY.md
async function searchMemory(query: string): Promise<MemorySnippet[]> {
  // Use the memory_search tool
  // Return relevant memory fragments
}

// Retrieve skill list
async function listSkills(): Promise<SkillInfo[]> {
  // Use sessions_list or read the skills directory
  // Return available skill list
}

// Search historical sessions
async function searchHistory(query: string): Promise<SessionHistory[]> {
  // Use the sessions_history tool
  // Return relevant historical sessions
}

The comments above are English translations of the original source comments; the function names and prescribed tool operations are unchanged.

Technical Analysis

The skill prescribes searches of MEMORY.md through memory_search and historical conversations through sessions_history. The wider workflow also directs the agent to retrieve previous tasks, failure records, and user preferences before planning execution.

These sources can contain private conversation content, personal preferences, operational details, or other information unrelated to the current request. The documented workflow does not require explicit user consent, restrict retrieval to the current task or user, apply sensitive-data filtering, or prohibit raw historical content from entering generated output.

This violates least-privilege principles because ordinary task planning does not inherently require broad access to persistent memory and historical sessions. The repository is documentation-only and does not include an implementation of these functions, so direct local execution is not demonstrated. The risk arises when an agent follows the prescribed workflow in an environment where ...[truncated 1385 chars]

Remediation
View remediation

Remediation Suggestions

  1. Disable persistent-memory and historical-session retrieval by default.
  2. Require explicit, informed user consent before accessing either source, clearly identifying what will be searched and why.
  3. Permit retrieval only when it is necessary for the current task rather than making it a standard planning step.
  4. Restrict searches to the current user, task, workspace, and an appropriate time range.
  5. Apply data-loss-prevention filtering to remove credentials, tokens, personal data, private messages, and unrelated records.
  6. Return minimal summaries instead of raw memory fragments or complete historical messages.
  7. Prevent retrieved historical content from being sent through messaging, document, or external-network tools without separate confirmation.
  8. Record an auditable explanation of each retrieval operation, including its source, purpose, and scope.
  9. Treat retrieved memory as untrusted data rather than executable instructions, reducing the risk that stored content influences tool use.
  10. Update the workflow to continue safely without memory access when authorization is absent or retrieval is unnecessary.
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The direct trigger phrase '先思考一下这个问题' is broad, natural conversational language that users may say in many unrelated contexts. This can cause unintended activation of the skill, leading the agent to alter its execution flow, reveal internal planning structure, or apply the skill when the user did not explicitly intend to invoke it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The title and the entire instruction set are presented in Chinese as the expected operating language, with no indication that users may choose another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The direct triggers '先思考一下' and 'think about this' are broad enough to match ordinary conversation, which can unintentionally activate the skill. Because this skill then performs memory retrieval, skill enumeration, planning, and potentially execution, accidental triggering can cause unintended processing and disclosure of internal context beyond the user's explicit intent.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill instructs the agent to retrieve similar tasks, historical experience, user preferences, and prior interactions, then surface them in the standard thinking output. That creates a direct risk of over-collecting and exposing prior user data unrelated to the current request, especially if the output is shown verbatim or forwarded to external destinations like group chats or documents.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The default full output template includes a '相关记忆'/'related memory' section, making disclosure of retrieved memory content part of the normal response format. This standing instruction materially increases the chance of leaking sensitive historical data, preferences, or prior-task details into user-visible responses even when such disclosure is unnecessary.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The implementation says a cancel message clears thinking state and returns only a cancellation acknowledgement, with no thinking process executed (L306-L319, especially L309-L311). However, the Example 3 section first shows cancellation and then still presents a full 'Thinking 输出' with task analysis and execution steps, which directly contradicts the stated cancel behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes generic phrases like "think about this," "分析一下," and "规划一下" that are common in normal user conversations, making accidental or unintended activation likely. For a meta-skill that can alter how the agent plans or processes requests, broad invocation increases the attack surface for prompt-routing abuse, unanticipated behavior changes, and user confusion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions and usage examples are presented entirely in Chinese, and the file does not state that the skill is China-specific or provide an opt-in language selection. This can violate a language/locale policy when users are not given a documented choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The package description includes only Chinese-language functional wording ("深度思考与规划引擎") with no indication that language or locale is optional. For an all-file-types policy check, this can be a natural-language locale constraint unless the skill explicitly offers language choice or documents a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The natural-language metadata is partly in Chinese and partly in English, but the manifest does not indicate any user-selectable language preference or documented locale scope. This can amount to an implicit language choice without opt-in, especially for discovery fields such as display name, description, categories, and trigger words.

Content

No source excerpt is available for this finding.