Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Item Report Trends API

Security checks for vulnerabilities and agentic risk

Overview

This skill is narrowly aimed at one JustOneAPI lookup, but it handles the user's API token in a way that can expose it through command-line arguments and URL query logs.

Review before installing. Use a narrowly scoped or disposable JustOneAPI token if possible, avoid shared machines where process arguments can be inspected, and assume the token may appear in JustOneAPI or proxy URL logs unless the upstream service confirms query logging is redacted. Rotate any token used with this helper if exposure is a concern.

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:28
Finding
API Token Exposed Through URL Query Parameters and Process Arguments<![CDATA[ ## Vulnerability Details **File Location**: `bin/run.mjs:28-35, 69-77, 166-169, 200-210, 225-234`; `SKILL.md:37` **Vulnerability Type**: Credential exposure through insecure token transport **Risk Level**: Medium ### Vulnerable Code The operation declares the authentication token as a query parameter: ```js { "defaultValue": null, "description": "User authentication token.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" } ``` The supplied token is inserted into the parameter object: ```js function injectToken(operation, params, cliToken) { const tokenParam = operation.parameters.find((parameter) => parameter.name === "token"); if (!tokenParam || params.token !== undefined) { return; } if (!cliToken) { fail("--token is required for this operation.", { operationId: operation.operationId, }); } params.token = cliToken; } ``` All query parameters, including `token`, are appended to the request URL: ```js function applyQueryParams(operation, params, url) { for (const parameter of operation.parameters.filter((item) => item.location === "query")) { const value = params[parameter.name]; if (value === undefined) { continue; } appendValue(url.searchParams, parameter.name, value); } } function appendValue(searchParams, name, value) { if (Array.isArray(value)) { for (const item of value) { appendValue(searchParams, name, item); } return; } if (value && typeof value === "object") { searchParams.append(name, JSON.stringify(value)); return; } searchParams.append(name, String(value)); } ``` The resulting URL is transmitted to the declared API endpoint: ```js const baseUrl = manifest.baseUrl; const url = new URL(operation.path, ensureBaseUrl(baseUrl)); applyPathParams(operation, params, url); applyQueryParams(operation, params, url); const requestInit = { headers: { "accept": "application/json", ...[truncated 3194 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Move authentication out of the query string.** If supported by JustOneAPI, send the token in an HTTP authorization header: ```js const token = process.env.JUST_ONE_API_TOKEN; if (!token) { fail("JUST_ONE_API_TOKEN is required."); } const requestInit = { headers: { accept: "application/json", authorization: `Bearer ${token}`, }, method: operation.method, }; ``` 2. **Read the token directly from the environment.** Remove the `--token` command-line option so the credential is not included in the child process argument vector. 3. **Update the API schema and generated artifacts.** Change the authentication definition from a query parameter to an OpenAPI security scheme, then regenerate `bin/run.mjs`, `generated/operations.json`, and `generated/operations.md`. 4. **Prevent accidental logging.** Ensure request logging, exception handling, tracing, and telemetry redact `Authorization`, `token`, and other credential-bearing values. 5. **If the upstream API only accepts query authentication**, document this limitation explicitly and apply compensating controls: - Disable or redact query-string logging at gateways and proxies. - Avoid including the final URL in diagnostics. - Use narrowly scoped, short-lived tokens where available. - Rotate tokens regularly and immediately after suspected exposure. 6. **Rotate potentially exposed credentials.** Tokens previously used through this helper should be rotated if process metadata or URL logs may have been accessible to untrusted parties. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill invokes a network-capable helper (`node .../bin/run.mjs`) and uses an API token, but the manifest does not declare any explicit tool scope such as `permissions` or `allowed-tools`. That mismatch weakens sandboxing and review controls because a host may permit broader tool usage than intended or fail to clearly signal that external network access occurs.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill defines the authentication token as a query parameter and injects it into the request URL, which means the secret may be exposed in logs, browser/history equivalents, proxies, monitoring systems, error traces, and upstream infrastructure that records URLs. Even though the request uses HTTPS, query strings are commonly retained and propagated more broadly than headers, making accidental credential disclosure more likely.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The documentation explicitly specifies a user authentication token in the query string, which is a real security issue because query parameters are commonly logged by servers, proxies, browser history, analytics systems, and monitoring tools. In the context of an API integration skill, this is more dangerous because downstream users may implement the API exactly as documented, causing credential leakage and possible account or API access compromise.

Static analysis

No suspicious patterns detected.