Back to skill

Security audit

Lightweight Knowledge Base

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a local knowledge-base tool, but it includes under-scoped persistent user-profile collection and an unsafe documented shell template that could execute modified JSON as code.

Install only if you want a Chinese-language local memory/profile tool and are comfortable with persistent profile files. Review or disable the automated/deep-dialogue tasks before use, avoid the documented source <(jq ...) template, and treat query commands without keywords as potentially exposing the full stored profile or task schedule on screen.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
references/task_guidelines.md:73
Finding
Arbitrary Command Execution Through Sourcing JSON-Derived Shell Code<![CDATA[ ## Vulnerability Details **File Location**: `references/task_guidelines.md:73` **Vulnerability Type**: Shell command injection through dynamically generated shell code **Risk Level**: High ### Vulnerable Code ```bash source <(jq -r '.weekly[] | "task_\(.id)=\(.)"' data/task_rhythm.json) ``` ### Technical Analysis The documented task template converts entries from `data/task_rhythm.json` into shell source code and executes the result in the current shell with `source`. The JSON fields are interpolated into generated shell statements without shell escaping, type validation, or an allowlist. If an attacker can modify a weekly task entry, values containing command substitutions or other shell syntax may become executable when the documented template is used. This violates the data/code separation boundary: configuration data is treated as trusted shell code. Because `source` runs within the current shell rather than a restricted subprocess, injected commands inherit the invoking process's environment, permissions, working directory, and accessible credentials. ### Attack Path 1. An attacker obtains write access to `data/task_rhythm.json`, or supplies a modified configuration that is accepted by the Skill. 2. The attacker inserts shell syntax, such as a command substitution, into a field of a weekly task object. 3. A user or AI Agent follows the task execution template in `references/task_guidelines.md`. 4. `jq` interpolates the malicious field into text intended to represent a shell assignment. 5. `source` parses and executes that generated text in the current shell. 6. The injected command runs with the privileges and environment of the user or Agent executing the template. Exploitation depends on both modification of the configuration and execution of the documented template; the bundled scripts do not invoke this line automatically. ### Impact Assessment Successful exploitation permits arbitrary command execution as the account running the t ...[truncated 703 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove `source` and process substitution from the configuration-loading workflow. - Treat every JSON field as data and extract only the specific required values: ```bash task_id=$(jq -r '.weekly[] | select(.id == 35) | .id' data/task_rhythm.json) task_enabled=$(jq -r '.weekly[] | select(.id == 35) | .enabled' data/task_rhythm.json) ``` - Validate extracted values before use. Require task IDs to match `^[0-9]+$` and enabled states to equal only `true` or `false`. - Store values in explicitly named, quoted shell variables rather than constructing variable names or executable assignment statements dynamically. - Validate the entire JSON document against a strict schema before processing it. Reject unknown fields, incorrect types, and unexpected control characters. - Ensure configuration files are writable only by the trusted owner and are not populated directly from untrusted input. - If dynamic task dispatch is required, map allowed action names to predefined shell functions through a fixed `case` statement. Never evaluate an action field as a command. - Add negative security tests containing command substitutions, semicolons, newlines, redirections, and shell metacharacters to confirm that all values remain non-executable. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (17)

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The skill description and the operational content are presented entirely in Chinese, with no indication that users may opt for another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly documented and justified.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill explicitly describes '每日进化' and automatic user-profile/knowledge-base optimization, which implies persistent modification of user data. Without an explicit warning, consent model, or confirmation boundary, users may not realize their profile and stored knowledge will be altered automatically, creating integrity and privacy risks through silent data mutation.

Natural-Language Policy Violations

Medium
Confidence
79% confidence
Finding
This JSON file contains multiple human-readable descriptions entirely in Chinese, indicating a locale-specific language choice in the skill's metadata. Because the file provides no opt-in, alternative locale, or justification that the skill is intentionally region-specific, this appears to violate the language/locale policy for natural-language content.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The manifest uses Chinese-only natural-language labels and descriptions for user-facing scheduled tasks, which indicates a fixed language choice. There is no indication in this file that the user can choose a preferred language or that the locale restriction is explicitly justified.

Ssd 3

Medium
Confidence
93% confidence
Finding
The scheduled task explicitly instructs the system to collect user information through 'natural dialogue' and update a user profile, but the configuration shows no consent, scope limitation, minimization, retention, or review controls. In a memory-management skill, automated recurring profile enrichment can silently expand personal data collection beyond user expectations, creating privacy and compliance risk.

Vague Triggers

Medium
Confidence
87% confidence
Finding
This JSON manifest defines broad execution flexibility such as time drift, generic skip conditions, and automatic recovery, but it does not clearly constrain when tasks should or should not run beyond a few high-level examples. The lack of specific trigger scope or negative examples makes automated invocation behavior ambiguous, especially for catch-up execution in the next cycle.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This JSON profile embeds a Chinese locale and persona-specific language choices, including Chinese names, location set to China, and a role label written only in Chinese. Because SQP-3 applies to all file types, this is a natural-language policy concern when the skill behavior appears to force a specific language/locale without an explicit user choice or documented justification.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The document is entirely framed as a communication guide in Chinese and prescribes example responses and style norms without indicating that users may choose another language. This creates a natural-language locale policy issue because it appears to force a specific language/locale absent opt-in or a stated region-specific reason.

Context-Inappropriate Capability

Medium
Confidence
88% confidence
Finding
The manifest describes a lightweight knowledge base and task-management system built around structured JSON/Markdown storage and memory management. This guideline explicitly anticipates 'API 调用失败' and retry behavior, implying the skill may invoke external APIs, which is not an obvious or declared requirement for a local knowledge/memory store.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The manifest describes a lightweight knowledge base and task management system with '每日自动进化', implying meaningful maintenance or synthesis of stored knowledge. In practice, this script mostly touches JSON timestamps, counts markdown/JSON files, and echoes status messages; despite the '生成报告' section, no report file is actually written.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This shell script presents its title, status messages, errors, and usage guidance entirely in Chinese, which imposes a specific language on users. Under the policy, forcing a language without user opt-in or clear justification is a natural-language policy violation.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The function name and output text explicitly state that daily evolution is complete and direct the user to review generated reports in 'outputs/'. However, the function only prints console text and there are no file creation or write operations corresponding to a report, which is a direct contradiction between intent documentation and implementation.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The script's user-facing messages are entirely in Chinese and the generated default data hard-codes China-specific values such as "location": "中国" and "timezone": "UTC+8". There is no indication that the skill is region-specific or that the user can choose language/locale, which creates a natural-language locale policy issue.

Missing User Warnings

Medium
Confidence
82% confidence
Finding
When no keyword is provided, the script prints the full contents of user_profile.json and task_rhythm.json directly to stdout. Although the script has basic usage text, it does not warn the user that running these commands may reveal complete personal or behavioral data on screen.

Missing User Warnings

Low
Confidence
88% confidence
Finding
The initialization instructions direct the user to run a shell script that creates persistent files and directories, but the document does not clearly warn about those filesystem changes before execution. This can lead to unexpected writes in the environment, especially in agent contexts where users may assume a skill is informational rather than state-changing.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
This markdown file contains user-facing operational guidance exclusively in Chinese, and does not offer an alternative language or note that the skill is intended only for Chinese-speaking users. Under the language/locale policy check, forcing a single language without opt-in can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
Comments and user-visible output such as the usage instructions are presented only in Chinese. This imposes a fixed language on all users without opt-in or explanation, which matches the language-policy violation criteria.

Static analysis

No suspicious patterns detected.