Back to skill

Security audit

guaikei-xhs-data-finder

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real Xiaohongshu public-data research skill, but it needs Review because it exposes the API token in request URLs and automatically saves collected datasets locally without clear retention or redaction controls.

Before installing, understand that your keywords, Xiaohongshu URLs, returned public data, and GUAIKEI API token are used with the guaikei.com API, and successful results are saved locally in logs. Use a scoped or disposable token if available, keep the workspace private, review or delete logs after use, and avoid submitting targets or URLs you would not want retained.

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

API Token Exposed in URL Query Strings

Content
View full analysis
{ return await postJson( "/api/xiaohongshu/note-search/keyword", { _: Date.now(), token: token }, { keyword, type, sort, time, limit }, ); }, constants.CREATE_MAX_ATTEMPTS, (attempt, err) => { utils.printError( `【创建任务重试】 ${attempt + 1}/${constants.CREATE_MAX_ATTEMPTS} 次 - ${err.message}`, ); }, ); } ``` ```js async function getSearchTask(token, keyword, type, sort, time, limit) { return await withRetry( async () => { const res = await getJson("/api/xiaohongshu/note-search/info", { _: Date.now(), token: token, keyword, type, sort, time, limit, }); ``` The shared request client serializes the complete parameter object, including `token`, into the URL: ```js async function postJson(path, params, data) { if (!path || typeof path !== "string") { throw new Error("path 必须是非空字符串"); } if (!params || typeof params !== "object") { throw new Error("params 必须是对象"); } if (!data || typeof data !== "object") { throw new Error("data 必须是对象"); } params.skill_name = skillName(); const fullPath = `${path}?${querystring.stringify(params)}`; const jsonData = JSON.stringify(data); const options = { host: constants.BASE_URL, path: fullPath, method: "POST", headers: { "Content-Type": " ...[truncated 2990 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
src/xiaohongshu/comment-cli.js:138
Finding

Automatic Plaintext Persistence of Retrieved User and Comment Data

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 }); ...[truncated 2665 chars]
Remediation
View remediation
` or `--save` before writing results. 3. Create files with owner-only permissions: ```js await fs.promises.writeFile(outputFilename, content, { mode: 0o600 }); ``` 4. Create the log directory with restrictive permissions such as `0700`. 5. Remove or redact sensitive URL query values, including `xsec_token`, before console output or storage. 6. Allow users to choose whether request metadata, returned data, or both are retained. 7. Implement configurable retention and automatic deletion of expired files. 8. Document the exact data fields persisted, storage location, permissions, and retention behavior. 9. Avoid storing complete comment/profile datasets when only summaries or derived statistics are required. 10. Consider encrypted storage when durable retention is a business requirement. ]]>
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 (75)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation advertises automatic log archival and the finding indicates local filesystem writes to a logs directory, but there is no mention of log minimization, retention, redaction, or opt-in controls. Logging user queries, URLs, returned content, or token-related error details can expose sensitive research activity or credentials on disk, especially in shared environments.

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 41)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 108)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 261)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 329)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 42)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 109)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 272)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 329)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 110)May include surrounding context.

md
| 看某篇小红书笔记的评论数据 | `src/xiaohongshu/comment-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 284)May include surrounding context.

md
| 看某篇小红书笔记的评论数据 | `src/xiaohongshu/comment-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 329)May include surrounding context.

md
| 看某篇小红书笔记的评论数据 | `src/xiaohongshu/comment-cli.js` | 笔记 URL | 该笔记的评论内容、评论者信息、互动数据 |

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This file implements comment-collection task creation and retrieval for Xiaohongshu, which materially exceeds the declared skill scope of keyword-based public note search and analytics. Scope expansion is dangerous because it enables collection of additional user-generated content not disclosed in the manifest, increasing privacy, compliance, and trust risks and potentially allowing operators to gather more data than users reasonably expect.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The CLI’s declared interface fetches a creator profile by direct URL, while the manifest says the skill is for keyword-based discovery of public notes and trend comparison. This scope mismatch is dangerous because it grants a materially different data-access capability than users and reviewers would expect, enabling targeted profile harvesting rather than simple keyword research.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code creates and retrieves a homepage-post task (createPostTask/getPostTask) instead of performing keyword popularity discovery described in the skill metadata. That discrepancy increases risk because the skill can be used for surveillance or bulk collection of a specific creator’s content under the guise of a benign trend-research tool.

Content

No source excerpt is available for this finding.