Back to skill

Security audit

抖音实时上升热点榜、抖音各垂类热搜榜

Security checks for vulnerabilities and agentic risk

Overview

This is a real read-only Douyin data API wrapper, but it needs review because it sends the API token in URL query strings and saves retrieved results locally by default.

Install only if you are comfortable sending Douyin search targets, creator/video URLs, comment requests, and your GUAIKEI_API_TOKEN to guaikei.com. Treat the token as sensitive, rotate it if exposed, and review or delete the generated logs directory because results may include public usernames, profile identifiers, and comments.

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:105
Finding
API Token Exposed in URL Query Strings<![CDATA[ ## Vulnerability Details **File Location**: - `src/api/search.js:59-62, 104-113` - `src/api/comment.js:38-41, 67-72` - `src/api/post.js:23-26, 50-54` - `src/api/hot.js:18-22` - `src/utils/request.js:105-112, 128-136` **Vulnerability Type**: Sensitive credential exposure through URL query parameters **Risk Level**: Medium ### Vulnerable Code The API modules place the secret token into request parameter objects: ```js // src/api/search.js const params = { _: Date.now(), token: token, }; ``` ```js // src/api/search.js const params = { _: Date.now(), token: token, keyword: keyword, sort_type: sort, publish_time: time, filter_duration: duration, content_type: content, limit: limit, }; ``` ```js // src/api/comment.js const params = { _: Date.now(), token: token, }; ``` ```js // src/api/comment.js const params = { _: Date.now(), token: token, url: url, limit: limit, }; ``` ```js // src/api/post.js const params = { _: Date.now(), token: token, }; ``` ```js // src/api/post.js const params = { _: Date.now(), token: token, url: url, limit: limit, }; ``` ```js // src/api/hot.js const res = await getJson("/api/douyin/hot-search", { _: Date.now(), token: token, }); ``` The shared request implementation serializes all such parameters into the URL: ```js // src/utils/request.js const fullPath = `${path}?${querystring.stringify(params)}`; const jsonData = JSON.stringify(data); const options = { host: constants.BASE_URL, path: fullPath, method: "POST", headers: { "Content-Type": "application/json", "Accept-Encoding": "identity", "Content-Length": Buffer.byteLength(jsonData), }, }; ``` ```js // src/utils/request.js const fullPath = `${path}?${querystring.stringify(params)}`; const options = { host: constants.BASE_URL, path: fullPath, method: "GET", headers: { "Accept-Encoding": "identity" }, }; ``` ### Technical Analysis `GUAIKEI_API_TOKEN` is an authentication credential, but th ...[truncated 2476 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Move authentication out of the URL.** Send the token through a standard authorization header: ```js const options = { host: constants.BASE_URL, path, method: "GET", headers: { Authorization: `Bearer ${token}`, "Accept-Encoding": "identity", }, }; ``` 2. **Remove `token` from every query parameter object** in: - `src/api/search.js` - `src/api/comment.js` - `src/api/post.js` - `src/api/hot.js` 3. **Separate authentication from ordinary parameters.** Change the shared request interface to accept the token independently: ```js async function getJson(path, params, token) { const fullPath = `${path}?${querystring.stringify(params)}`; return request({ host: constants.BASE_URL, path: fullPath, method: "GET", headers: { Authorization: `Bearer ${token}`, "Accept-Encoding": "identity", }, }); } ``` 4. **Apply server-side redaction.** Configure API gateways, reverse proxies, application logs, tracing platforms, and error-reporting systems to redact: - `Authorization` headers. - Legacy `token` query parameters. - Any request metadata that may already contain credentials. 5. **Rotate potentially exposed tokens.** Tokens previously used by affected versions may remain in retained URL logs and should be revoked and replaced. 6. **Reject query-string authentication after migration.** Once clients have moved to header-based authentication, the API should stop accepting tokens in URLs to prevent regression. 7. **Add automated tests** asserting that generated request paths never contain `token=`, credential values, or other authentication material. 8. **Update documentation** to explain that the token is transmitted to the third-party API for authentication and is protected using an authorization header rather than a URL parameter. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (43)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the implementation mainly performs token validation and commercial guidance output rather than the promised business functions, users may be socially engineered into purchasing or supplying credentials under false pretenses. Even without direct code execution risk, deceptive capability claims can drive unnecessary secret exposure and trust abuse.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the implementation mainly performs token validation and commercial guidance output rather than the promised business functions, users may be socially engineered into purchasing or supplying credentials under false pretenses. Even without direct code execution risk, deceptive capability claims can drive unnecessary secret exposure and trust abuse.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the implementation mainly performs token validation and commercial guidance output rather than the promised business functions, users may be socially engineered into purchasing or supplying credentials under false pretenses. Even without direct code execution risk, deceptive capability claims can drive unnecessary secret exposure and trust abuse.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
If the implementation mainly performs token validation and commercial guidance output rather than the promised business functions, users may be socially engineered into purchasing or supplying credentials under false pretenses. Even without direct code execution risk, deceptive capability claims can drive unnecessary secret exposure and trust abuse.

Credential Access

High
Category
Privilege Escalation
Content
- 技能重命名为“douyin-search-keyword”。
- 在SKILL.md中添加了openclaw元数据、使用帮助、许可证、标签和示例,以实现更好的集成与文档化。
- 移除了两个本地文件(.env 和 scripts/last-search.json),以优化代码结构并提升安全性。
- 文档现已更加简洁且以用户为中心,重点在于提供清晰的使用说明和数据字段解释。
- 突出技能特性、合规要点及技术流程。
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The 'Use when' text and trigger list include broad phrases such as '短视频选题', '竞品分析', '舆情监控', and '抖音数据分析', which can describe many high-level tasks beyond this skill's concrete data-fetching functions. Although the document later narrows scope, these trigger terms are still presented as direct activation cues and may cause unintended invocation when a user is asking for strategy or writing help rather than Douyin data retrieval.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The README states that query results are automatically exported as JSON logs, but it does not prominently warn that scraped public video, account, and comment data will be persisted to local disk. In this skill context, the data may include usernames, profile identifiers, comments, and analysis targets, so silent local retention increases privacy, data handling, and accidental disclosure risk on shared machines or repositories.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This markdown file uses Chinese throughout, including the title and all release notes, with no indication that the skill is region-specific or that users may choose another language. Per the policy, forcing a specific language without opt-in is a natural-language policy concern.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The function sends a user-provided video URL and an authentication token to a remote API via requestApi, which is a safety-relevant network operation involving potentially sensitive data. In this file there is no confirmation prompt, user-facing warning, or explicit disclosure that these values are transmitted off-box.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
This function performs a GET request containing the token, URL, and limit parameters to a remote endpoint. Because it transmits user/system data over the network and the file lacks any visible warning, confirmation, or user-facing notice, it meets the missing-warning criteria for code files.

Natural-Language Policy Violations

Medium
Confidence
82% confidence
Finding
This file's natural-language interface documentation is entirely in Chinese, including function descriptions and parameter meanings, with no indication that language selection is optional or that the skill is region-specific. Under the policy, forcing a specific language without user opt-in can be a locale/language policy violation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This file contains multiple user-facing strings such as status messages and errors entirely in Chinese, but there is no indication that the skill is region-specific or that users can opt into this locale. That creates a natural-language policy issue because the skill effectively forces a specific language for interaction and output.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The CLI persists fetched Douyin post results to a local JSON file after completing the request, which creates an undisclosed secondary storage channel for potentially sensitive analysis data. Even if the data is public-source content, local persistence increases exposure to later unauthorized access, leakage through shared workspaces, backups, or multi-user environments, and it is not necessary for basic retrieval functionality described in the skill metadata.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The file writes fetched results to local storage without any user-facing warning at the time of persistence, so users may believe the tool only prints results while it also creates a durable artifact on disk. In data-analysis workflows, silent retention can violate user expectations, organizational handling rules, or least-data-retention principles, especially when outputs include scraped content, identifiers, or comment data.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The CLI persists full search output to a local file named with the user keyword and query parameters, without an explicit opt-in or warning. In this skill context, search terms, returned content, and derived analytics may contain sensitive business intelligence, monitoring targets, or personal data from comments, so silent local retention increases the risk of unintended disclosure through shared machines, backups, or log collection.

Description-Behavior Mismatch

Medium
Confidence
86% confidence
Finding
This utility persists content to local files under a logs directory, which introduces data storage behavior not described in the skill metadata focused on Douyin retrieval and analysis. Even though the filename is sanitized and path traversal is mitigated, writing retrieved or user-supplied data to disk can create privacy, retention, and compliance risks if comments, profile data, or analysis results contain sensitive information.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The string literal instructs the user in Chinese and directs them to contact a WeChat number, which imposes a specific language and communication channel. This is a natural-language locale policy issue because the file does not offer any language choice or document a justified region-specific constraint.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code emits all user-facing warnings and status messages in Chinese only. The policy forbids forcing a specific language without user opt-in, and there is no indication here that the skill is region-specific or that users can choose their preferred language.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file's user-facing error messages, comments describing expected behavior, and formatted output are entirely in Chinese, which imposes a specific language on users without any opt-in or alternative. Under the policy for natural-language violations, forcing a locale or language without user choice is reportable unless clearly justified as region-specific, which is not stated in this file.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
This file presents core usage instructions, triggers, warnings, and examples almost entirely in Chinese, which effectively fixes the interaction language without stating that users may choose another language. Under the locale-policy rule, forcing a specific language without user opt-in can be a natural-language policy issue unless the restriction is documented and justified.

Natural-Language Policy Violations

Low
Confidence
86% confidence
Finding
The user-facing natural-language strings in the schema are entirely in Chinese, including the title and field descriptions. This can impose a language/locale constraint on users without any opt-in or explanation that the skill is region-specific, which matches the policy's language/locale violation criterion.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
This JSON schema uses Chinese-only natural-language titles and descriptions throughout, such as the title and field descriptions. Under the policy rules, forcing a specific language without user opt-in or documented locale justification can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
This JSON schema contains user-facing natural-language metadata entirely in Chinese, including the title and field descriptions. For a general-purpose skill artifact, that imposes a specific language/locale without indicating user choice or documenting that the schema is intentionally region-specific.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
This JSON schema contains all user-facing title and description fields in Chinese only, including the top-level title/description and property descriptions. For a general-purpose skill artifact, that constitutes a language policy concern unless the locale restriction is explicitly documented or the user is given a language choice.

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