Back to skill

Security audit

抖音互动数采集

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it says, but it sends authenticated service traffic over plaintext HTTP by default and can persist insecure credential-related settings.

Review before installing. Use only if you trust this paid third-party service and its local token storage. Configure an HTTPS base URL before login/use if available, avoid enabling insecure TLS outside a trusted test endpoint, and check whether an old ~/.xhs-convert token should be reused before running it.

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

Error
Location
src/config.js:24
Finding

Bearer Token and Sensitive API Data Transmitted over Plaintext HTTP by Default

Content
View full analysis

Vulnerability Details

File Location: src/config.js:24, with authenticated request sinks at src/client.js:66-73 and cli.js:299-300
Vulnerability Type: Plaintext transmission of credentials and sensitive data
Risk Level: High

Technical Analysis

The Skill configures a plaintext HTTP service as its default API endpoint:

js
const DEFAULT_BASE_URL = 'http://st.aidata366.com';

The API client attaches the persistent bearer token to requests made to that endpoint:

js
res = await fetch(this.baseUrl + '/api/v1' + apiPath, {
  method,
  headers: {
    ...(body ? { 'Content-Type': 'application/json' } : {}),
    ...(this.token ? { Authorization: `Bearer ${this.token}` } : {}),
    ...headers,
  },
  body: body ? JSON.stringify(body) : undefined,
  signal: ctrl.signal,
});

The export download path likewise transmits the token to the configured endpoint:

js
const res = await fetch(`${cfg.baseUrl}/api/v1/platform/exports/${encodeURIComponent(info.export_id)}/file`,
  { headers: { Authorization: `Bearer ${cfg.token}` }, signal: dlCtrl.signal });

The documentation acknowledges that the default address is plaintext and that the token will cross the public network without encryption. The implementation emits a warning to stderr, but it neither blocks the request nor requires explicit confirmation. Consequently, authenticated commands use plaintext transport unless the user proactively changes the endpoint.

This is a reachable vulnerability rather than evidence of deliberate credential theft: the token is sent to the service used by the Skill, but the transport does not protect it against network interception or modification.

Attack Path

  1. The user completes login or registration, and the resulting bearer token is saved locally.
  2. The user or agent invokes an authenticated command such as quota, submit, query, export, or logout.
  3. Unless explicitl ...[truncated 1121 chars]
Remediation
View remediation

Remediation Suggestions

  1. Provision a valid TLS certificate and change the default endpoint to an https:// URL.
  2. Reject authenticated requests to non-HTTPS endpoints rather than merely printing a warning.
  3. If plaintext HTTP is necessary for local development, restrict it to loopback addresses such as 127.0.0.1, localhost, or ::1.
  4. Require a narrowly scoped, explicit per-invocation override before allowing credentials over any other HTTP endpoint.
  5. Apply the HTTPS requirement consistently to ordinary API calls and direct export downloads.
  6. Avoid process-wide TLS bypasses for production use. If custom certificates are required, support a scoped custom CA configuration instead of disabling certificate verification.
  7. After deploying HTTPS, revoke or rotate tokens that may previously have traversed plaintext networks.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill is presented as a simple Douyin metrics collector, but it also manages persistent credentials, local config files, base URL overrides, and insecure transport options. That mismatch matters because users or orchestrators may grant it trust appropriate for a read-only analytics tool, while it actually has account/session control and can be redirected to arbitrary backends that receive tokens.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill is presented as a simple Douyin metrics collector, but it also manages persistent credentials, local config files, base URL overrides, and insecure transport options. That mismatch matters because users or orchestrators may grant it trust appropriate for a read-only analytics tool, while it actually has account/session control and can be redirected to arbitrary backends that receive tokens.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares shell, network, and environment-dependent behavior but does not restrict or disclose tool scope via explicit permissions. In practice, this allows an agent to invoke a CLI that reads tokens from local config, makes outbound requests, and alters configuration, increasing the blast radius if the skill is auto-selected or used in an unexpected context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger phrases are broad enough to match generic requests about video analytics or data collection, which can cause the skill to be invoked outside the user's intended scope. In this skill, that matters because invocation can lead to registration/login flows, token handling, outbound HTTP requests, and paid actions, so overbroad matching increases the chance of unintended data disclosure or unwanted charges.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The CLI enables a persisted insecure mode and then applies allowInsecureTls() globally before making authenticated API and export requests. Disabling certificate verification allows man-in-the-middle interception or modification of login/session tokens, task data, and exported CSVs, which is especially sensitive for a paid service that handles authentication and downloadable results.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
98% confidence
Finding

The allowInsecureTls function globally sets NODE_TLS_REJECT_UNAUTHORIZED='0', disabling TLS certificate validation for the entire Node.js process. That permits man-in-the-middle interception of API traffic, including bearer tokens and collected data, and the risk is elevated here because this skill is a paid data-collection client that routinely communicates with remote services and explicitly supports authenticated requests.

Content

Scanner excerpt · src/client.js (reported line 17)May include surrounding context.

js
/** 忽略 HTTPS 证书校验 (服务端自签/域名不匹配证书时由 insecure 配置开启)。进程级。 */
function allowInsecureTls() {
  process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
}

/** 业务错误: code 为后端错误码 (1001/1002/3001/...) */

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes this skill as a tool for collecting/exporting Douyin video interaction metrics such as likes, comments count, favorites, shares, and views from batches of video links. This client also exposes full comment-session workflows for both generic comments and Douyin comments, including session creation, stepping, finishing, and listing collected comments, which is materially broader than collecting summary interaction counts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The default backend URL uses plain HTTP, so tokens and collected data can be intercepted or modified by a network attacker via man-in-the-middle attacks. Because this file also handles persisted auth tokens, the lack of transport security is especially dangerous: users can leak credentials simply by using the default configuration, with no opt-in to insecure transport.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Reading another skill's legacy configuration directory is an unjustified access to data outside this skill's stated purpose. Even though it only reads local files, it enables unauthorized credential harvesting between tools and weakens user expectations about credential isolation. In this skill context, collecting social-media metrics does not require access to credentials from a separate skill, so the behavior is more suspicious and less defensible.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code persists authentication material and migrates credentials and service endpoint settings from a different skill namespace into this skill. That exceeds the least-privilege needs of a Douyin metrics collector and creates an unexpected trust boundary crossing, where credentials intended for another tool can be silently reused here. If the backend is compromised or misconfigured, users may unknowingly send valid tokens to the wrong service.

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 embeds natural-language guidance and runtime messages exclusively in Chinese, including output conventions and remediation text. Under the 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
95% confidence
Finding

Multiple comments and emitted messages such as login instructions, timeout text, and parameter validation are hardcoded in Chinese, with no indication of user choice or locale negotiation. This creates a language policy issue because the skill behavior is tied to a single language by default.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description repeatedly frames the skill as a 抖音视频互动数采集 tool focused on video links and video metrics. However, the file explicitly states that https://www.douyin.com/note/<aweme_id> 图文笔记 links are also accepted, which broadens behavior beyond the manifest's video-only scope.

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's natural-language interface, including the header comment and command usage/help text, is written in Chinese and does not indicate any user language selection or opt-in. This can violate language/locale policy when a skill imposes a specific language by default rather than offering a choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The package description is written entirely in Chinese and presents the skill identity and purpose only in that language. This can violate a language/locale policy when no user opt-in, alternative locale, or region-specific justification is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The header comment says this output module is '对齐转链 skill', and later comments/default messaging instruct users to use '--link 扫码/链接方式' and 'login --link 重新登录'. For a 抖音视频互动数采集 skill, this documentation suggests the module is framed for another skill's intent rather than this one, creating an active documentation/code-context mismatch.

Content

No source excerpt is available for this finding.