Back to skill

Security audit

xhs-blogger-track

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to do what it says, but it handles a reusable API token and saved research outputs in ways users should review before installing.

Install only if you are comfortable sending Xiaohongshu keywords, target URLs, and your Guaikei API token to the Guaikei service. Use a scoped or disposable token if possible, monitor quota use, and delete or protect the generated logs because they may contain research targets, comments, author data, and xsec_token URLs.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
src/utils/request.js:76
Finding

Reusable API Token Exposed in URL Query Strings

Content
View full analysis
{ return await postJson( "/api/xiaohongshu/note-search/keyword", { _: Date.now(), token: token }, ...[truncated 3130 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
src/utils/log.js:5
Finding

Automatic Plaintext Persistence of Retrieved Records and Access-Bearing URLs

Content
View full analysis
|]/g, "_") .replace(/\.\.+/g, "_") .replace(/^\.+|\.+$/g, ""); if (safeFilename.length > 200) { safeFilename = safeFilename.substring(0, 200); } if (safeFilename === "") { safeFilename = `log_${Date.now()}`; } const outputFilename = path.join( path.dirname(__filename), "..", "..", "logs", safeFilename, ); try { await fs.promises.mkdir(path.dirname(outputFilename), { recursive: true }); await fs.promises.writeFile(outputFilename, content); utils.printSuccess(` → 已保存到 ${outputFilename}`); } catch (error) { utils.printError(`日志写入失败: ${error.message}`); } } ``` Successful commands automatically persist the complete output rather than requiring an explicit output option. For example: ```js const finalOutput = { status: "success", error_code: "OK", message: "详情任务完成", timestamp: new Date().toLocaleString(), request: { command: "detail", url: url, limit: limit, }, skill_metadata: { skill_version: constants.VERSION, runtime_version: process.versions.node, execution_time: Date.now() - startTime, }, ...[truncated 3677 chars]
Remediation
View remediation
` or `--save`. 2. If automatic storage is retained, create the directory and files with restrictive permissions: ```js await fs.promises.mkdir(logDirectory, { recursive: true, mode: 0o700, }); await fs.promises.writeFile(outputFilename, content, { mode: 0o600, flag: "wx", }); ``` 3. Redact or remove `xsec_token` query parameters before writing URLs to disk. 4. Allow users to select a minimal result format that excludes unneeded user and request metadata. 5. Define and document a retention period, and provide an automatic cleanup mechanism. 6. Warn users before saving data that may be synchronized, backed up, or stored in shared workspaces. 7. Avoid writing into the package installation directory; use an operating-system-appropriate per-user data directory. 8. Add tests verifying that output files are not readable by group or other users on supported Unix-like systems. 9. Consider encryption at rest when datasets must be retained and can contain sensitive research or user-linked information. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (51)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

该代码片段仅实现了通用 CLI 参数处理辅助函数(parseArgs、readValueAfterFlag、buildHelp),属于基础输入解析层。它没有网络请求、站点访问、数据抓取、内容解析、评论提取、博主作品遍历或任何与小红书相关的专用逻辑。因此,这段代码的实际行为与声明描述的核心功能存在明显且实质性的不一致,应判定为描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是小红书公开内容检索与数据抓取分析能力;而这段代码实际只实现了本地日志写入功能,使用了文件系统和路径模块,将给定内容保存到本地 logs 目录。该行为与搜索/抓取小红书内容没有直接对应关系,属于不同的主要用途和资源访问类型(本地文件系统而非网络内容抓取)。虽然日志可能是辅助功能,但在仅给出的代码片段中,看不到任何与小红书搜索、详情、评论或博主作品抓取相关的实现,因此该代码块与声明用途不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Yes, this is a mismatch based on the supplied code chunk. The declared description promises Xiaohongshu public content retrieval and analysis-related data access, but the actual code shown merely uses fs/path to locate package.json and return its name. While utility code can be a supporting detail, this chunk by itself does not implement or evidence any of the declared capabilities such as searching notes, fetching details/comments, scraping creator posts, or handling Xiaohongshu links. Its observed behavior is unrelated package metadata lookup via local file access.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 64)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 225)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 262)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 39)May include surrounding context.

md
- "看这个小红书博主最近20条作品发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 63)May include surrounding context.

md
- "看这个小红书博主最近20条作品发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 112)May include surrounding context.

md
- "看这个小红书博主最近20条作品发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 217)May include surrounding context.

md
- "看这个小红书博主最近20条作品发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 262)May include surrounding context.

md
- "看这个小红书博主最近20条作品发什么: node src/xiaohongshu/post-cli.js --url 'https://www.xiaohongshu.com/user/profile/xxx?xsec_token=yyy' --limit 20"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 62)May include surrounding context.

md
| 笔记详情 | `src/xiaohongshu/detail-cli.js` | 笔记 URL | 笔记详情、作者信息、评论 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 111)May include surrounding context.

md
| 笔记详情 | `src/xiaohongshu/detail-cli.js` | 笔记 URL | 笔记详情、作者信息、评论 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 209)May include surrounding context.

md
| 笔记详情 | `src/xiaohongshu/detail-cli.js` | 笔记 URL | 笔记详情、作者信息、评论 |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 262)May include surrounding context.

md
| 笔记详情 | `src/xiaohongshu/detail-cli.js` | 笔记 URL | 笔记详情、作者信息、评论 |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are intentionally broad: the skill may activate even when the user does not explicitly say '小红书', including aliases like xhs/rednote or merely providing matching links. Over-broad activation can cause unintended third-party data transmission and unnecessary execution of an external integration when the user's intent is ambiguous, especially in a research workflow handling URLs and keywords.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill relies on a third-party API (guaikei.com) and, by design, sends user-supplied keywords and URLs there, yet this disclosure is not prominent where users decide to invoke the skill. That creates a privacy and consent risk: users may provide competitor research targets, note URLs, or sensitive business queries without realizing those inputs are being transmitted off-platform to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README states that all task results are automatically saved to a local logs/ directory, but it does not clearly warn users that saved artifacts may contain sensitive business intelligence such as searched keywords, competitor account URLs, note links, and harvested comment data. In this skill’s context, the output is likely to include market research targets and potentially user-generated content, so silent persistence increases the risk of unintended disclosure on shared machines, CI runners, or improperly secured workspaces.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file is entirely written as operational guidance in Chinese and frames the skill's usage and invocation examples exclusively in Chinese. There is no indication that users may choose another language or that the Chinese-only constraint is required for a region-specific compliance reason, which can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code sends an API token and a user-supplied note URL to a remote endpoint via postJson, but the function contains no confirmation prompt and no user-facing disclosure beyond developer-oriented parameter comments. For code files, network calls that transmit user or system data should have some visible warning unless clearly covered elsewhere, and this file does not show such disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The getCommentTask function makes a network request containing the API token, URL, and limit parameters, but there is no confirmation prompt or user-facing notice about this transmission. The existing JSDoc describes parameters for developers, not a safety disclosure to users about sending potentially sensitive data to an external service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language documentation in this file is exclusively in Chinese, which imposes a specific language on users or maintainers without offering any language choice. Under the stated policy, forcing a language without opt-in is a locale/language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:15