Back to skill

Security audit

guaikei-douyin-public-data-fetcher

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent public Douyin research tool, but it needs review because it sends an API token in URL parameters and automatically stores collected data locally.

Review before installing. Use this only if you are comfortable sending Douyin search terms, profile/video URLs, and your GUAIKEI API token to the Guaikei backend. Treat generated logs as potentially sensitive because they may contain research topics, public comments, profile identifiers, media URLs, and timestamps; delete or protect the logs directory as needed. Rotate the token if it may have been exposed through URL/query logging.

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:94
Finding

API Authentication Token Exposed in URL Query Strings

Content
View full analysis
{ const res = await getJson("/api/douyin/hot-search", { _: Date.now(), token: token, }); return res.data; }, constants.QUERY_MAX_ATTEMPTS, (attempt, err) => { utils.printError( `【获取抖音热榜重试】 ${attempt + 1}/${constants.QUERY_MAX_ATTEMPTS} 次 - ${err.message}`, ); }, ); } ``` The request utility serializes every parameter, including the token, into the URL: ```js async function postJson(path, params, data) { if (!path || typeof path !== "string") { throw new SkillError("PATH_INVALID", "path 必须是非空字符串"); } if (!params || typeof params !== "object") { throw new SkillError("PARAM_INVALID", "params 必须是对象"); } if (!data || typeof data !== "object") { throw new SkillError("DATA_INVALID", "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", ...[truncated 2932 chars]
Remediation
View remediation
``` 3. If the backend requires a custom header, use a clearly designated secret header such as `X-API-Token`. 4. Update both GET and POST request builders to accept authentication separately from ordinary parameters. 5. Configure origin servers, reverse proxies, API gateways, and monitoring systems to redact authentication headers. 6. Audit existing access and diagnostic logs for leaked tokens, then securely delete or redact affected records. 7. Rotate all tokens that may previously have appeared in query strings. 8. Add automated tests asserting that generated request paths never contain `token`, `GUAIKEI_API_TOKEN`, or the test credential value. 9. Avoid including full request URLs in future error messages or diagnostics. ]]>

T09 · Insecure Skill Coding Practices

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

Automatic Plaintext Retention of Queries and Fetched Douyin Data

Content
View full analysis
|]/g, "_") .replace(/\.\.+/g, "_") .replace(/^\.+|\.+$/g, ""); if (safeFilename.length > 200) { safeFilename = safeFilename.slice(0, 200); } if (!safeFilename) { safeFilename = `log_${Date.now()}`; } const outputFilename = path.join( path.dirname(__filename), "..", "..", "logs", safeFilename, ) ...[truncated 2674 chars]
Remediation
View remediation
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 (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill states it does not read or write private user files, yet it also says logs are automatically saved to logs/. Undeclared or under-emphasized local file writes can create privacy and operational risk, especially if command arguments, URLs, IDs, or error details are logged.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill states it does not read or write private user files, yet it also says logs are automatically saved to logs/. Undeclared or under-emphasized local file writes can create privacy and operational risk, especially if command arguments, URLs, IDs, or error details are logged.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill states it does not read or write private user files, yet it also says logs are automatically saved to logs/. Undeclared or under-emphasized local file writes can create privacy and operational risk, especially if command arguments, URLs, IDs, or error details are logged.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill states it does not read or write private user files, yet it also says logs are automatically saved to logs/. Undeclared or under-emphasized local file writes can create privacy and operational risk, especially if command arguments, URLs, IDs, or error details are logged.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill declares access to an environment variable token and instructs execution of Node.js commands, but it does not explicitly declare tool scope or permissions. This weakens least-privilege enforcement and can cause the host agent to grant broader capabilities than reviewers or users expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is designed to trigger even when the user does not mention Douyin, creating an overly broad activation boundary. In an agentic environment, this can cause the skill to run in contexts the user did not intend, leading to unnecessary external queries, token use, logging, or disclosure of queried topics to the third-party service.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Repeating that the skill should activate even without the user naming Douyin reinforces ambiguous routing behavior and increases the chance of unauthorized or surprising use. Because the skill uses an API token and writes logs, accidental activation is more risky than a purely local read-only helper.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The schema explicitly documents video_url as both playback and download addresses, which conflicts with the skill’s stated scope that excludes video downloading. This mismatch can enable downstream agents or integrators to treat download behavior as supported, increasing the risk of policy bypass, misuse of copyrighted content, or unintended collection/distribution workflows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The schema exposes a play_addr field explicitly described as both a playback address and a video download address, while the skill description states it is not intended for publishing/editing/downloading video. This creates a capability/scope mismatch: downstream agents or users can infer and use an undeclared download path, undermining policy boundaries and making misuse easier even if the skill itself is framed as public-data research only.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README states that collected data is automatically exported to local log files, including comment and account-related data, but it does not clearly warn users that these outputs may contain personal or sensitive public data that persists on disk. In this skill context, the risk is more credible because the tool is explicitly designed for bulk collection and analysis of user-generated content, which increases the chance of retaining regulated or privacy-sensitive data longer than intended.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language content in comments is entirely in Chinese, including user-relevant descriptions such as configuration labels and version notes. For a general-purpose skill file, this imposes a specific language without any indication of user opt-in or a documented region-specific justification, which conflicts with the language/locale policy rule.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

At L159-L162, the code saves the full output, including request metadata and comment results, to disk via log.taskWrite. Although the tool prints status messages about fetching comments, there is no user-facing disclosure that results will also be persisted locally, which is a safety-relevant side effect for a CLI handling potentially sensitive scraped data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code contains user-facing strings such as error messages and success messages entirely in Chinese, with no indication that the skill is region-specific or that users can opt into the locale. That creates a language/locale policy issue because the skill effectively forces one language for all users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The script reads an API token from process.env.GUAIKEI_API_TOKEN and uses it in post.createPostTask and post.getPostTask, which are network/API operations. This file does not include a clear user-facing warning that the provided Douyin URL and authentication token will be sent to an external service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The CLI persists fetched Douyin results to a local JSON file automatically, and those results can include public-profile data, post metadata, or comment-derived information that may still be sensitive in a user’s environment. Because the write happens without an explicit opt-in, warning, or configurable output path/disable flag in this file, it creates an avoidable data-retention and local exposure risk on shared systems or automated runners.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This JavaScript file contains user-facing natural-language strings and comments entirely in Chinese, including error messages and help output. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file contains user-visible error/output strings in Chinese, which imposes a specific language on users. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly justified, which is not shown here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest describes a skill for retrieving and analyzing public Douyin data, with explicit exclusions around other functionality. This utility creates directories and writes arbitrary content into a local logs folder, which is a persistent file-write capability not implied by a read-oriented data fetcher description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code performs outbound HTTPS requests and may send URL parameters and JSON body data to a remote host, but there is no confirmation prompt, user-facing log, or inline warning at the point of transmission. For code files, network calls that transmit user or system data should include some visible disclosure unless clearly covered elsewhere; this utility file itself provides none.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The user-facing warning and status messages are entirely in Chinese, including operational guidance and support instructions. This creates a language/locale policy concern because the file gives no indication that Chinese output is optional, user-selected, or required for a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This JavaScript file contains natural-language comments and error/output strings entirely in Chinese, including validation errors and formatted result messages. Under the stated policy, forcing a specific language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JSON schema contains user-facing title and description text exclusively in Chinese, which can impose a specific language on users without opt-in. Under the policy, language constraints should either provide a user choice or be clearly documented as region- or locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The schema title and description are written only in Chinese, which imposes a specific language on users and downstream consumers without offering a language choice or documenting that the schema is region-specific. This matches the policy category for language or locale constraints expressed in natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This JSON schema uses Chinese-only natural-language titles and descriptions throughout, such as the title on L04 and multiple property descriptions through L40. For a general-purpose skill artifact, that imposes a specific language/locale without any visible opt-in or justification, matching the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This manifest-format file contains all user-facing titles and descriptions in Chinese only, including the schema title and property descriptions. Because there is no indication that the skill is region-specific or that users can opt into another language, it may violate the language/locale policy for skills intended for a broader audience.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.