Back to skill

Security audit

Guaikei Kuaishou Hashtag Video Fetcher

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Kuaishou public-data tool, but it automatically stores full collected results in local plaintext log files without opt-in, retention controls, or restrictive permissions.

Review this skill before installing if your searches, target accounts, video URLs, or collected comments are sensitive. It will use your Guaikei API token to send requests to www.guaikei.com and will automatically save full result files locally under logs; delete or protect those files and avoid using confidential research targets unless that retention 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
scripts/utils/log.js:5
Finding

Automatic Plaintext Retention of Complete API Results

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}`); } } ``` Every successful search automatically passes the complete response to this utility. The search term and options are also embedded in the filename: ```js const finalOutput = { status: "success", error_code: "OK", message: "搜索任务完成", timestamp: new Date().toLocaleString(), request: { command: "search", keyword: keyword, sort: sort, time: time, duration: duration, limit: limit, }, skill_metadata: { skill_version: constants.VERSION, runtime_version: process ...[truncated 3818 chars]
Remediation
View remediation
` or `--save`. - Continue returning JSON through standard output when no persistence option is supplied. 2. **Use restrictive permissions** - Create the output directory with mode `0o700`. - Create output files with mode `0o600`. - Where supported, use exclusive creation to avoid overwriting files or following unexpected filesystem state: ```js await fs.promises.mkdir(outputDirectory, { recursive: true, mode: 0o700, }); await fs.promises.writeFile(outputFilename, content, { encoding: "utf8", mode: 0o600, flag: "wx", }); ``` 3. **Remove sensitive values from filenames** - Do not include raw search keywords, account identifiers, or video identifiers in filenames. - Use a random identifier or timestamp, such as `search__.json`. - Keep request metadata inside the protected file only when needed. 4. **Support data minimization and redaction** - Allow users to omit request metadata, commenter identifiers, creator identifiers, or other unnecessary fields. - Avoid retaining the complete remote response when only an aggregate or subset is needed. 5. **Implement retention controls** - Provide a configurable expiration period. - Add a cleanup command and document the storage location. - Consider deleting generated files automatically at process completion when they are only temporary. 6. **Clearly disclose persistence** - Document exactly what is written, where it is stored, how long it remains, and how users can disable or delete it. - Obtain explicit user consent before storing complete result datasets. 7. **Consider encryption where archival storage is required** - For sensitive research environments, support encryption using a user-managed key. - Do not embed encryption keys in the Skill package or store them beside encryp ...[truncated 17 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (28)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly depends on a third-party API service and sends user-supplied keywords, profile URLs, video URLs, and comment data off-platform, but the user-facing description does not clearly warn that these inputs will be transmitted to an external provider during execution. This can cause unintended data disclosure, especially when users paste sensitive research targets, internal investigation terms, or regulated content into the tool under the assumption processing is local.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The package presents itself as a data analysis and monitoring tool, but the manifest exposes active engagement capabilities via posting and commenting scripts. This mismatch can mislead reviewers or users about the true behavior surface of the skill, increasing the chance that automation with write-side effects is enabled without adequate scrutiny or consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description is broad marketing language and does not define operational boundaries, trigger conditions, or exclusions. In an agent skill context, vague scope increases the risk of overbroad invocation or misuse, especially when the package also includes actions that may affect third-party accounts or content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all user-facing instructions, parameter descriptions, and examples exclusively in Chinese. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is clearly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

No manifest is available to justify the skill's capabilities, so the only stated intent comes from the CLI's code-level framing as a comment-fetching command. Reading a credential from process.env introduces a sensitive capability that is not itself described in the file's user-facing help or documentation and is not inferable from a purely local CLI parser/output wrapper.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script automatically writes fetched comment data to a local JSON file after successful execution, without any visible opt-in, warning, retention control, or redaction. Persisting externally sourced content can expose potentially sensitive or regulated data to other local users, backups, or later unintended reuse, especially because the filename is predictable and derived from the target URL.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code writes comment results to disk without any explicit user warning in this file, which creates a privacy and data-handling risk for users who may expect stdout-only output from a CLI. Because comments may include personal data or sensitive content, silent persistence increases the chance of accidental disclosure through shared systems, logs, or backups.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The argument description and help text claim the tool accepts either a Kuaishou profile URL or a creator USER_ID, but the implementation validates the input solely with validator.isProfileUrl(url) and exits on failure. This means a plain USER_ID such as the documented 123456 example is contradicted by actual behavior, creating an intent/behavior mismatch in the documented interface.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The usage string and examples explicitly show invoking the script with a bare USER_ID, which documents expected accepted input. However, the runtime check at lines L079-L083 rejects anything that is not a profile URL, so the inline documentation actively contradicts the executable behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script persists retrieved results to a local JSON file automatically, without explicit user consent or warning. If the fetched post data contains sensitive, regulated, or proprietary information, this can create unintended local data retention, increasing the risk of disclosure through shared systems, backups, or weak filesystem permissions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This JavaScript file contains natural-language comments, error messages, and help text entirely in Chinese, including the primary user-facing CLI output. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in, and there is no indication here that the tool is intentionally region-specific or offers an alternative locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code contains natural-language strings shown to users in Chinese, such as error messages, without any indication that the skill is intentionally locale-specific or that users can opt into another language. That can violate a language/locale policy requiring user choice or documented justification for a fixed language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The success and failure output strings are fixed to Chinese, which imposes a specific language on all users. Because the file does not offer a language choice or explain that the skill is region- or locale-specific, this is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code sends request payload data to a remote host and includes a TOKEN header, but there is no confirmation prompt, user-visible logging, or explanatory comment/docstring disclosing that user or system data may be transmitted off-box. For a utility request helper, this network transmission behavior is safety-relevant and not surfaced to the user within the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

The code accepts a token and places it into the outbound TOKEN header, but the file provides no warning, comment, or user-facing notice that a credential is being used and transmitted to an external service. This is a sensitive operation under the warning criteria for code files.

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 info messages are written only in Chinese, which can impose a specific language on users without opt-in. The file does not indicate that this skill is intended only for a Chinese-speaking or region-specific environment, nor does it provide a language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The manifest description and the rest of the skill instructions are predominantly in Chinese and the trigger examples are framed around Chinese-language requests, but there is no explicit note that the skill is Chinese-only or any opt-in choice of language. This can conflict with language/locale policy expectations when a skill implicitly constrains interaction language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The only natural-language description in the manifest is written in Chinese, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking audience. This may violate language/locale policy when a skill implicitly enforces a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The README states that all task results are automatically saved to the logs/ directory, but it does not clearly warn users that collected keyword, profile, comment, and analysis data will be persisted locally. In a data-collection tool, silent local retention increases the risk of unintended disclosure through shared machines, backups, source control, or insecure file permissions, especially because the tool handles potentially sensitive competitive intelligence and comment datasets.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code sends user-supplied search parameters and a token to remote API endpoints via postJson/getJson. While retry errors are logged, there is no confirmation prompt, comment, or docstring in this file disclosing that user input and authentication data are transmitted over the network.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The getJson call sends keyword, sort, time, duration, limit, and token to a remote endpoint. The file includes retry logging but no user-facing warning, explanatory comment, or docstring indicating that search criteria and authentication context are transmitted externally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill presents help text, argument descriptions, and runtime status messages in Chinese only. This imposes a specific language on users without any visible locale selection, which matches the policy's language-choice concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

Natural-language strings in the interface, including help text and warnings, are exclusively Chinese. Under the language/locale policy, forcing a specific language without opt-in or documented justification is a policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code persists the full search output to disk via log.taskWrite(...), which is a file-write operation affecting user data handling. While the script prints search status and token setup guidance, it does not disclose that results will also be saved locally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file uses hardcoded Chinese-only user-facing error text, including support instructions, without offering any language choice or fallback. This can violate language/locale policy when the skill is not explicitly documented as Chinese-only or region-specific.

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