Back to skill

Security audit

guaikei-xhs-comment-data

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a real Xiaohongshu data tool, but its published comment-only description understates broader search, note-detail, and profile-post collection features and it handles its API token in a risky way.

Review this before installing if you expected a narrowly scoped comment-only skill. Installing it gives an agent a tool for broader Xiaohongshu public-data collection, sends keywords or links and your Guaikei API token to guaikei.com, and stores returned results locally in logs. Use a low-privilege, rotatable token and avoid running it on links or keywords that would reveal sensitive business research unless that third-party data flow is acceptable.

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
src/utils/request.js:76
Finding

API Credential Exposed in URL Query Strings

Content
View full analysis

Vulnerability Details

File Location: src/utils/request.js:76-77, 104-106; affected call sites include src/api/comment.js:20-23, 46-50, src/api/detail.js:20-23, 46-50, src/api/post.js:20-23, 46-50, and src/api/search.js:23-26, 52-59
Vulnerability Type: Sensitive credential exposure through URL query parameters
Risk Level: Medium

Complete Code Snippet

The affected API modules include the credential in parameter objects:

js
return await postJson(
  "/api/xiaohongshu/comment/url",
  { _: Date.now(), token: token },
  { url, limit },
);
js
const res = await getJson("/api/xiaohongshu/comment/info", {
  _: Date.now(),
  token: token,
  url,
  limit,
});

The shared request implementation serializes those parameters into the request URL:

js
params.skill_name = skillName();
const fullPath = `${path}?${querystring.stringify(params)}`;
const jsonData = JSON.stringify(data);
js
const fullPath = `${path}?${querystring.stringify(params)}`;
const options = {
  host: constants.BASE_URL,
  path: fullPath,
  method: "GET",
  headers: {
    "Content-Type": "application/json",
  },
};

Equivalent token-bearing parameter objects are used by the detail, post, and search API modules.

Technical Analysis

GUAIKEI_API_TOKEN is an authentication credential. Every command reads it from the environment and passes it to the API layer, where it is included as the token query parameter. The shared transport then constructs a request target resembling:

text
/api/xiaohongshu/comment/info?token=<credential>&url=<value>&limit=<value>

HTTPS protects the request target while it travels over the network, but it does not prevent the URL from being recorded at HTTPS termination points or within server-side infrastructure. Reverse proxies, API gateways, web servers, observability platforms, and access logs commonly retain complete request targets. Query parameters may also receive weaker redaction treatment than authorizat ...[truncated 1491 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove token from every query-parameter object in:

    • src/api/comment.js
    • src/api/detail.js
    • src/api/post.js
    • src/api/search.js
  2. Transmit the credential through a standard authorization header:

js
headers: {
  "Content-Type": "application/json",
  "Authorization": `Bearer ${token}`,
}

A dedicated secret header such as X-API-Key is also acceptable if required by the server protocol.

  1. Refactor postJson() and getJson() so authentication is passed separately from ordinary query parameters. This reduces the risk that future call sites accidentally serialize credentials into URLs.

  2. Configure proxies, gateways, application servers, and observability systems to redact authorization headers and sensitive query parameters.

  3. Review existing request logs for token-bearing URLs. Restrict access, securely delete retained copies where permitted, and rotate all potentially exposed credentials.

  4. Add automated tests that fail if generated request paths contain token, api_key, authorization, or other credential fields.

  5. Document token rotation, expiration, least-privilege scope, and incident-response procedures.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (79)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises comment-only analysis but supports keyword search with filtering by type, sort, and time. That is a platform-wide discovery capability unrelated to a user-provided comment target and can be used for bulk content reconnaissance. In context, this makes the skill substantially more dangerous than described because it enables broader scraping and profiling.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest claims a narrowly scoped comment-only purpose, but the body documents unrelated search, note-detail, and creator-post retrieval. This is a classic scope-deception problem: reviewers, orchestrators, and users may approve a low-risk skill while it operationally supports much broader data collection. The mismatch is especially concerning because the skill sends data to a third-party API service.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation says the skill only retrieves comments and not note details, but examples and routing instruct use of non-comment scripts including detail-cli.js. This creates misleading user expectations and can cause unnecessary collection of note text and related metadata, contrary to stated boundaries. In a data-exfiltration and privacy context, misleading documentation materially increases risk.

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/detail-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 54)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/detail-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 58)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/detail-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 76)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/detail-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 149)May include surrounding context.

md
- "分析这条小红书笔记评论区的主要观点: node src/xiaohongshu/detail-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 55)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 76)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 152)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 40)May include surrounding context.

md
- "只拉这条笔记的评论数据做观点归纳: node src/xiaohongshu/comment-cli.js --url 'https://www.xiaohongshu.com/explore/xxx?xsec_token=yyy' --limit 100"

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:16