Back to skill

Security audit

AI小白答疑

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent and not overtly malicious, but it needs Review because it persistently stores sensitive conversation records and uses unsanitized fan-derived names in file paths.

Install only if you are comfortable with the skill saving local records of your own conversations and fan/private-message content. Use a private, access-controlled folder, avoid pasting unnecessary sensitive details, sanitize fan names before file creation, and periodically delete old records and reply files.

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

Warning
Location
SKILL.md:288
Finding

Path Traversal Through Attacker-Controlled Fan Record Names

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 288–291, 319, and 373–376
Vulnerability Type: Path traversal in file read and write operations
Risk Level: Medium

Relevant Skill Instructions

Faithful English translation of the security-relevant instructions:

text
1. Locate {config.paths.chats}/{nickname}.md using the nickname.
2. If no nickname is supplied, read {config.paths.chats}/_overview.md.
3. For a new person, create a record and derive the nickname from
   "source + the first few characters of the original message."

Store one record per person at:
{config.paths.chats}/{nickname}.md

Write the reply verbatim to:
{config.paths.replies}/YYYY-MM-DD-{nickname}-RoundN.txt

Technical Analysis

The Skill directs the agent to derive a fan nickname partly from externally supplied message content and then interpolate that nickname directly into filesystem paths. It does not require normalization, separator removal, basename enforcement, or verification that the resolved path remains inside the configured chat or reply directory.

A fan is an independent external party in this workflow. Consequently, content supplied by that fan crosses a trust boundary when it is converted from conversational data into a filesystem path used under the account owner's agent permissions.

A nickname containing path separators or traversal components such as ../../MEMORY could cause the resulting path to resolve outside config.paths.chats or config.paths.replies. The forced .md or .txt extension limits the set of target filenames but does not prevent directory traversal. The instructions also require later reads and updates of these derived paths, making the unsafe path reachable through the documented workflow.

No evidence indicates that the project author deliberately intended this behavior. It is therefore classified as an exploitable coding flaw rather than malicious persistence or intention ...[truncated 1715 chars]

Remediation
View remediation

Remediation Suggestions

  1. Assign each fan an internally generated opaque identifier and use that identifier, rather than message content, as the filesystem basename.
  2. If readable names are required, apply a strict allowlist such as ASCII letters, digits, underscores, and hyphens.
  3. Reject absolute paths, path separators, . and .. components, control characters, null bytes, and platform-specific reserved names.
  4. Resolve the configured base directory and candidate destination to canonical absolute paths before every read or write.
  5. Verify that the resolved destination is a descendant of the configured base directory; abort if containment validation fails.
  6. Maintain an internal mapping between display names and safe record identifiers rather than reconstructing paths from display text.
  7. Use collision-safe file creation and avoid silently replacing an existing record belonging to another fan.
  8. Apply the same validation to chat records, overview updates, reply drafts, clipboard source paths, and every later operation that reuses the nickname.
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 (15)

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This section specifies detailed transcript-style storage of each person's original messages, reply drafts, inferred '题型/底子/线索', conversation stage, and pending questions. That is a rich profile of both explicit and inferred personal data, including potentially sensitive financial or mental-health-adjacent context, and centralizing it materially increases exposure if the files are accessed or mishandled.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation is entirely written in Chinese and all example invocations, prompts, filenames, and expected interactions assume Chinese-language use. There is no statement that the skill is Chinese-only, no justification for a locale restriction, and no option for users to choose another language, which creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

The README instructs users to run npx skills add iamzifei/xiaobai-qa -g without pinning a package version or integrity source. That can cause users to execute whatever package version is currently served under skills, creating a supply-chain risk if the package is updated maliciously, compromised, or typo-confused.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README states that user conversations are stored persistently in local files, including per-user records and overview files, but does not prominently warn about privacy, retention, or access implications. Because this skill handles sensitive life/work questions and fan private messages, silent persistence increases the risk of exposing personal data to other local users, backups, synced folders, or later unintended processing.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list includes broad natural-language phrases such as '这条评论怎么回' and '他回我了' that can appear in ordinary conversation, making accidental invocation plausible. In this skill’s context, unintended activation is more dangerous because the skill can read/write files, maintain records, and steer sensitive conversations, so a false trigger may start data collection or draft generation without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill directs the agent to append user conversation summaries and '摸底卡' data into a persistent file in the user's home directory, but it does not require a clear upfront privacy notice or explicit consent. This is risky because the stored content can include employment status, financial stress, constraints, and other sensitive personal context that users may not expect to be retained locally.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Persisting structured conversation notes in the user's home directory creates a concrete data retention surface for sensitive personal information. Even without obvious exfiltration, such records can be exposed through local compromise, shared devices, backups, or later unintended reuse, and the skill does not impose minimization or retention limits.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The reply-fan workflow instructs the agent to identify individuals and continue their histories across sessions, which creates longitudinal records tied to named or quasi-named persons. In this context, the data spans multiple fan interactions and can reveal patterns about vulnerable users, making accidental disclosure or misuse more harmful.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The per-person chat record and summary workflow stores raw messages, drafts, inferred attributes, status, and a centralized overview across multiple people without any user-facing consent language. In the context of fan DMs and comments, this can capture third-party personal data at scale, increasing privacy and unauthorized profiling risks.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The centralized overview aggregates active conversations and theme statistics across people, broadening visibility beyond the original one-to-one context. Aggregation increases the blast radius of any disclosure and may enable unnecessary profiling of recurring issues among followers.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Writing reply content to files and then copying it to the clipboard creates multiple secondary copies of potentially sensitive conversation-derived text. In a workflow handling private fan messages and crisis-adjacent content, these extra copies raise the likelihood of leakage through local files, backups, clipboard history, or other apps.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The crisis-response section hardcodes China-specific hotlines (12356, 110, 120) while the skill elsewhere explicitly contemplates users being in different cities or countries. For a user outside that region, this can delay access to appropriate emergency help during a self-harm crisis, making the safety guidance incomplete and potentially unsafe.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The configuration hard-codes locale-specific language behavior, including using the Chinese currency word “块” in public and requiring Chinese punctuation/style such as curved Chinese quotes and '说人话'. This appears to force a specific language/locale convention without any user opt-in or documented justification, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger guidance includes very broad natural-language phrases like '第一次进来什么都没说' and generic expressions such as '怎么用' or '我是小白想问个问题', which can cause unintended activation in unrelated conversations. In a skill that steers multi-turn conversations and may handle fan messages or private messages, accidental invocation can disrupt workflows, confuse users, and cause the agent to respond in the wrong mode without clear user intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Automatically copying generated replies to the system clipboard exposes content to other applications, clipboard history tools, and anyone with access to the device, yet the skill gives no warning or opt-in. This is especially relevant here because replies may include sensitive fan context or emotionally charged conversations.

Content

No source excerpt is available for this finding.