Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Spread Metrics API

Security checks for vulnerabilities and agentic risk

Overview

This is a focused API helper, but it handles the JustOneAPI token in ways that can expose the credential through command arguments and request URLs.

Review before installing if the JustOneAPI token has meaningful account access or paid quota. Prefer short-lived, limited-scope tokens, avoid logging commands or full URLs, and rotate the token if it may have been captured in process or HTTP logs.

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:18
Finding
API Token Exposed Through Command-Line Arguments and URL Query Parameters## Vulnerability Details **File Location**: `SKILL.md:51`; `bin/run.mjs:18-24, 132, 148, 235-246, 278-288`; `generated/operations.json:13-19`; `generated/operations.md:17` **Vulnerability Type**: Credential exposure through process arguments and URL query strings **Risk Level**: Medium ### Vulnerable Code The operation defines the authentication token as a query parameter: ```js { "defaultValue": null, "description": "User authentication token.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" }, ``` The command-line token is copied into the query parameters: ```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 the 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 sent to the fixed remote service: ```js applyQuer ...[truncated 3411 chars]
Remediation
## Remediation Suggestions 1. **Remove command-line token handling.** Read the credential directly from `process.env.JUST_ONE_API_TOKEN` so it is not expanded into the process argument vector. Reject explicit tokens inside `--params-json`. 2. **Use an authorization header.** If supported by JustOneAPI, transmit the credential using an appropriate header, such as `Authorization: Bearer ...`, and remove `token` from the operation's query-parameter manifest. 3. **Update generated definitions and documentation.** Change `generated/operations.json`, `generated/operations.md`, and `SKILL.md` so they no longer classify or demonstrate the token as a URL query parameter or CLI argument. 4. **Prevent accidental logging.** Never print the request URL, authorization header, environment variable, or full request configuration. Add centralized redaction for fields named `token`, `authorization`, `apiKey`, or equivalent. 5. **Harden unavoidable query authentication.** If the upstream API mandates a query token, configure clients, gateways, proxies, access logs, APM products, and error-reporting systems to redact the `token` parameter. Avoid redirects and keep the fixed HTTPS destination. 6. **Limit credential impact.** Use short-lived, narrowly scoped tokens with rate limits and quota alerts. Provide a documented revocation and rotation procedure for suspected disclosure. 7. **Add regression tests.** Verify that the token never appears in command arguments, generated URLs, standard output, standard error, exception details, or captured logs.
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 (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill invokes a Node helper that performs outbound API requests, but the manifest does not declare an explicit tool scope such as allowed network permissions or destination restrictions. This creates an authorization and transparency gap: a host agent may grant broader network capability than the skill actually needs, making unintended or abused external requests harder to constrain or audit.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill requires the authentication token to be sent as a URL query parameter, which is commonly exposed through logs, browser history, monitoring systems, reverse proxies, and referrer propagation. Even though the request uses HTTPS, query-string credentials are more likely to be retained and disclosed by surrounding infrastructure than headers or request bodies.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The API requires a user authentication token to be sent in the URL query string, which is commonly logged by clients, proxies, gateways, browser history, and monitoring systems. Even over HTTPS, query parameters are more broadly exposed in operational logs than headers, so this increases the risk of credential leakage and unauthorized API access.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The API documentation requires an authentication token to be sent as a URL query parameter, which exposes it through browser history, proxy logs, server access logs, analytics tools, referrer leakage, and other intermediaries. In an agent/integration context this is especially risky because generated clients, debugging output, and workflow logs often record full URLs, making accidental credential disclosure more likely.

Static analysis

No suspicious patterns detected.