Back to skill

Security audit

kuaishou-detail

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does the advertised Kuaishou public-data retrieval, but its troubleshooting instructions tell users to print an API token and it automatically stores retrieved results locally.

Review this skill before installing if you will use a real Guaikei API token. Do not print, paste, screenshot, or share `GUAIKEI_API_TOKEN`; verify only whether it is set. Also expect fetched Kuaishou results to be saved under the skill's local `logs/` directory and remove those files if you do not want retained copies.

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
SKILL.md:271
Finding

API Token Exposure Through Troubleshooting Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 271
Vulnerability Type: Secret exposure through terminal output
Risk Level: Medium

Vulnerable Code Snippet

markdown
> Self-check: In most cases, `GUAIKEI_API_TOKEN` did not pass validation (see Q1). Before running, use `echo $GUAIKEI_API_TOKEN` to confirm that the variable has been injected.

The original instruction executes:

sh
echo $GUAIKEI_API_TOKEN

Technical Analysis

The troubleshooting instruction prints the complete GUAIKEI_API_TOKEN value to standard output. Confirming that an environment variable is present does not require disclosing its value.

Terminal output may be retained in CI/CD logs, agent tool transcripts, shell-session recordings, shared diagnostic output, screenshots, or screen-sharing sessions. The implementation itself does not log the token, but this documentation directs users to reveal it through a separate command.

The token is an authentication credential sent in the TOKEN HTTPS header to www.guaikei.com. Consequently, disclosure may allow another party to authenticate to that service as the affected token holder.

Attack Path

  1. A user encounters an authentication or configuration error.
  2. The user follows the troubleshooting instruction in SKILL.md.
  3. The shell prints the complete GUAIKEI_API_TOKEN.
  4. The output is retained in a CI log, agent transcript, support bundle, screenshot, terminal recording, or screen-sharing session.
  5. An unauthorized party obtains the exposed value.
  6. The party reuses the token against the Guaikei API until it expires or is revoked.

This attack requires access to the terminal output or a retained copy of it; the instruction does not independently transmit the token to an additional host.

Impact Assessment

An attacker who obtains the token may consume the associated third-party API service and quota with the token holder’s authorization. Depending on server-side account controls not ...[truncated 398 chars]

Remediation
View remediation

Remediation Suggestions

Replace the value-printing command with a presence-only check:

sh
if [ -n "${GUAIKEI_API_TOKEN:-}" ]; then
  echo "GUAIKEI_API_TOKEN is configured"
else
  echo "GUAIKEI_API_TOKEN is missing"
fi

Additional hardening measures:

  1. Explicitly warn users never to print, paste, screenshot, or include the token in diagnostic logs.
  2. If token identification is necessary, use a purpose-built script that displays only a short masked prefix and suffix.
  3. Redact GUAIKEI_API_TOKEN from CI logs, agent transcripts, support bundles, and shell recordings.
  4. Advise users to revoke and rotate any token previously exposed through terminal output.
  5. Preserve the existing implementation behavior in scripts/utils/token.js, which reports token presence without printing the token value.
  6. Add automated documentation scanning for commands that print secret-bearing environment variables.
Vulnerability Patterns
  • 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 Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

According to the finding, the skill does not implement the advertised Kuaishou search/post/comment functions and instead performs unrelated local filesystem access. In this context, a social-media data skill that silently performs host-local actions is more dangerous because users are likely to trust it with external research tasks, not expect persistence or other side effects on the system.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

According to the finding, the skill does not implement the advertised Kuaishou search/post/comment functions and instead performs unrelated local filesystem access. In this context, a social-media data skill that silently performs host-local actions is more dangerous because users are likely to trust it with external research tasks, not expect persistence or other side effects on the system.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

According to the finding, the skill does not implement the advertised Kuaishou search/post/comment functions and instead performs unrelated local filesystem access. In this context, a social-media data skill that silently performs host-local actions is more dangerous because users are likely to trust it with external research tasks, not expect persistence or other side effects on the system.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares use of an environment variable (GUAIKEI_API_TOKEN) but does not declare a corresponding tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes secret access less transparent to users and hosting systems, increasing the chance of unintended credential exposure or unauthorized execution context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description and keywords are entirely in Chinese, which effectively constrains the skill's user-facing metadata to a single language. There is no indication of language choice, opt-in, or documented justification that this skill is intentionally region-specific for policy reasons.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file presents all operational instructions, parameter descriptions, and examples exclusively in Chinese. Under the stated policy, forcing a specific language without offering user choice can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The retry error message is hard-coded in Chinese, which imposes a specific language in user-visible output. The file does not indicate user opt-in, locale selection, or a justified region-specific restriction, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The thrown error message is written only in Chinese and may surface directly to users or operators. Without a documented locale constraint or a mechanism to choose language, this violates the policy against forcing a specific language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This retry log string is user-visible operational output and is fixed to Chinese. The file provides no opt-in, fallback language, or documentation showing that the skill is restricted to a Chinese-speaking context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script persists fetched comment data to a local JSON file after printing it, which creates an additional data retention channel beyond the immediate CLI response. Even though the data is public platform content, comments can still contain personal data or sensitive text, and silent local storage increases privacy, disclosure, and compliance risk if the host is shared or logs are later collected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The tool writes comment results to disk without any clear user-facing warning at execution time, so users may reasonably believe the data is only being displayed. This is risky because harvested comments may contain identifiers, contact details, or controversial content that remains on disk unexpectedly and can be exposed through backups, multi-user systems, or later forensic review.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The CLI persists the full fetched result set to a local JSON file after completing a retrieval task, even though the skill description emphasizes data retrieval rather than local retention. This creates an undisclosed data-at-rest side effect: scraped creator/content data may accumulate on disk, be accessible to other local users/processes, and outlive the user's expectation of a one-shot query.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script writes fetched results to a local file without any explicit warning, confirmation, or user-controlled output path in this file. In a scraping/analysis context, silent persistence can expose collected data, enlarge privacy/compliance risk, and surprise operators who expect the tool to emit results only to stdout.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script writes the full structured search output, including the user’s keyword and returned results, to a local file automatically without obtaining consent or clearly disclosing this behavior during normal execution. In a data-retrieval skill handling potentially sensitive search terms or collected public-data profiles/comments, silent persistence increases the risk of unintended data retention, local exposure, and downstream leakage from shared machines, logs, backups, or compromised workspaces.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language comments, help text, and error messages exclusively in Chinese, including user-visible output such as parameter errors and help text. Under the language/locale policy, forcing a specific language without user opt-in or a documented justification is a policy violation.

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 outbound HTTPS GET and POST requests and includes a TOKEN header, while also serializing request parameters and JSON payloads for transmission. In this file there is no confirmation prompt, logging, comment, or docstring disclosing that user or system data may be sent to a remote service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code emits all user-facing error strings in Chinese across multiple validation branches. That enforces a specific language without user opt-in, which matches the natural-language policy violation criteria for locale/language constraints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file presents all user-facing instructions and descriptions exclusively in Chinese. Under the policy for natural-language violations, forcing a specific language without user opt-in or a documented regional justification is in scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file title uses Chinese and the changelog contains only Chinese text, with no indication that users may choose another language or that the language restriction is intentional. This can violate a language/locale policy when a skill implicitly forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This code performs HTTP POST and GET requests using a token plus user-supplied search parameters, which may transmit user or system data to a remote API. While retry errors are logged, there is no confirmation prompt, user-facing notice, or explanatory comment/docstring in this file describing that the skill sends these inputs over the network.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file presents descriptions, help text, and runtime messages exclusively in Chinese, with no option to select another language or locale. The policy requires flagging language or locale constraints when they are forced without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

The manifest emphasizes access to public Kuaishou data, but the implementation requires process.env.GUAIKEI_API_TOKEN to operate. Using credentials may be legitimate for the backend provider, yet this capability is not justified or disclosed by the stated public-data purpose in the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file contains hard-coded Chinese user-facing strings such as error messages and status output. This imposes a specific language on users without any visible mechanism to select a preferred locale, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The string literal for 401/403 errors is written only in Chinese and does not offer an alternative language or user-selected locale. This can violate language or locale policy when the skill is used in a broader context without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The thrown error string is hard-coded in Chinese ("重试${maxAttempts}次后失败") with no indication that the skill is intentionally region-specific or that users can choose their preferred language. This creates a natural-language locale policy issue because the file imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.