Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Recommended Videos API

Security checks for vulnerabilities and agentic risk

Overview

This skill is a narrowly scoped JustOneAPI connector for one Douyin creator-research endpoint, with a real credential-handling caution around token exposure in command arguments and query strings.

Install only if you are comfortable giving this skill a JustOneAPI token for Douyin Xingtu lookups. Prefer a narrowly scoped or short-lived token if available, avoid running it in shared process-monitoring environments, and rotate the token if command logs, process listings, or request URLs may have been captured.

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
bin/run.mjs:26
Finding

API Token Exposed Through Process Arguments and URL Query Parameters

Content
View full analysis
"}' ``` `SKILL.md:46` reinforces this usage: ```markdown - Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs. ``` `bin/run.mjs:26-34` declares the authentication token as a required query parameter: ```js { "defaultValue": null, "description": "User authentication token.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" } ``` `bin/run.mjs:88-91` adds all query parameters, including the token, to the URL and sends that URL over the network: ```js applyPathParams(operation, params, url); applyQueryParams(operation, params, url); const requestInit = { headers: { "accept": "application/json", }, method: operation.method, }; ``` The resulting URL is subsequently supplied to `fetch`: ```js let response; try { response = await fetch(url, requestInit); } catch (error) { fail("Network request failed.", { cause: error instanceof Error ? error.message : String(error), operationId: operation.operationId, }); } ``` `bin/run.mjs:149-153` reads the token directly from the command-line argument vector: ```js if (flag === "--token") { parsed.token = value; index += 1; continue; } ``` `bin/run.mjs:203-212` serializes every query parameter into the request URL: ```js function applyQueryParams(operation, params, url) { for (const parameter of operation.parameters.filter((item) => item.location === "query")) { const value = params[par ...[truncated 2898 chars]
Remediation
View remediation
"}' ``` 2. **Prefer an authorization header.** If supported by JustOneAPI, keep the token out of the URL: ```js const requestInit = { headers: { accept: "application/json", authorization: `Bearer ${token}`, }, method: operation.method, }; ``` 3. **If the upstream API mandates query authentication**, document the residual risk and implement compensating controls: - Never print or serialize the complete request URL. - Redact `token` from exceptions, diagnostics, telemetry, and debug output. - Configure reverse proxies and API gateways not to log sensitive query parameters. - Use short-lived, narrowly scoped tokens where the provider supports them. - Rotate the token immediately after suspected disclosure. - Restrict access to process telemetry and network logs. 4. **Reject tokens supplied through `--params-json`.** The current injection logic accepts `params.token` in preference to `--token`. Remove token handling from general request parameters so credentials cannot accidentally be persisted in command history or application logs. 5. **Add regression tests** confirming that the token does not appear in process arguments, standard output, standard error, diagnostic messages, or request URLs when header-based authentication is available. ]]>
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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes a network-capable helper (node .../bin/run.mjs) and requires an API token, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a governance gap: an agent runtime or reviewer may not clearly understand that the skill performs outbound API calls, increasing the chance of unintended network access or misuse in environments that rely on manifest-declared restrictions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill defines token as a required query parameter and injects it into the request URL via applyQueryParams, causing the authentication secret to be transmitted in the URL. Query-string secrets are commonly exposed through logs, browser/history tooling, proxies, monitoring systems, and error messages, which increases the chance of credential leakage even when HTTPS is used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The operation requires a user authentication token as a query parameter and sends it to an external third-party API, yet the manifest provides no user-facing warning about credential handling, sharing, retention, or scope. Passing secrets in query strings is especially risky because they may be logged by clients, intermediaries, proxies, and servers, increasing the chance of credential leakage.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This manifest-style JSON describes the skill's purpose, but it does not specify when the skill should be invoked versus when it should not. Without explicit trigger scope, exclusions, or negative examples, the activation criteria are overly implicit and could lead to unintended invocation in loosely related requests about Douyin or creator research.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.