Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Creator Profile API

Security checks for vulnerabilities and agentic risk

Overview

This skill is a focused JustOneAPI connector that sends a creator ID and API token to one documented Douyin Xingtu profile endpoint, with no evidence of hidden persistence, local data harvesting, or unrelated behavior.

Install only if you are comfortable sending kolId lookups and your JustOneAPI token to api.justoneapi.com. Use a least-privileged token with quotas or expiration if available, avoid sharing logs that include command lines or request URLs, and rotate the token if you suspect it appeared in telemetry or 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:23
Finding

API Token Exposed Through Command-Line Arguments and URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: bin/run.mjs:23-30, 84-86, 101, 151-155, 236-243; SKILL.md:43; generated/operations.json:16-23; generated/operations.md:19
Vulnerability Type: Credential exposure through process arguments and URL query strings
Risk Level: Medium

Vulnerable Code

bin/run.mjs:23-30 defines the authentication token as a query parameter:

js
      {
        "defaultValue": null,
        "description": "User authentication token.",
        "enumValues": [],
        "location": "query",
        "name": "token",
        "required": true,
        "schemaType": "string"
      },

bin/run.mjs:84-86 injects the command-line token into the request parameters:

js
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);

bin/run.mjs:101 sends the resulting URL:

js
  response = await fetch(url, requestInit);

bin/run.mjs:151-155 reads the token from a command-line argument:

js
    if (flag === "--token") {
      parsed.token = value;
      index += 1;
      continue;
    }

bin/run.mjs:236-243 appends parameter values, including the token, to the URL query string:

js
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));
}

SKILL.md:43 instructs users to place the token in the process command line:

bash
node {baseDir}/bin/run.mjs --operation "getDouyinXingtuKolInfoV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"kolId":"<kolId>"}'

Technical Analysis

The authentication token is exposed through two c ...[truncated 2363 chars]

Remediation
View remediation

Remediation Suggestions

  1. Read the token directly from process.env.JUST_ONE_API_TOKEN rather than requiring --token, preventing routine exposure through process arguments.

  2. If supported by JustOneAPI, send authentication in an HTTP header:

    js
    const token = process.env.JUST_ONE_API_TOKEN;
    if (!token) {
      fail("JUST_ONE_API_TOKEN is required.");
    }
    
    const requestInit = {
      method: operation.method,
      headers: {
        accept: "application/json",
        authorization: `Bearer ${token}`,
      },
      redirect: "error",
    };
    
  3. Remove the token from operation.parameters so that generic query-parameter processing cannot append it to the URL.

  4. Reject a token property supplied through --params-json, ensuring that credentials follow only the controlled authentication path.

  5. If the upstream API strictly requires query-based authentication, document that residual risk and configure clients, proxies, gateways, tracing systems, and backend services to redact the token query parameter.

  6. Disable automatic redirects for authenticated requests or explicitly validate that every redirect remains HTTPS and on the approved origin.

  7. Rotate any token suspected of having appeared in process telemetry or URL-bearing logs, and apply the narrowest available token permissions, quotas, and expiration period.

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)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill invokes a network-capable helper (node .../bin/run.mjs) that can send outbound requests to a third-party API, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens policy enforcement and review because an agent or platform may permit networked execution without a clear, machine-readable declaration of that capability, increasing the risk of unintended external data transmission.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill defines the authentication token as a query parameter and injects it into the request URL, which causes the secret to appear in URLs. Query-string secrets are commonly exposed through logs, browser/history tooling, proxy infrastructure, crash reports, and upstream monitoring systems, increasing 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
91% confidence
Finding

The operation requires a user authentication token as a query parameter, but the skill documentation provides no warning or guidance about handling that credential safely. Tokens in query strings are commonly exposed through logs, browser history, analytics, proxies, and referrer leakage, which increases the chance of credential compromise.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.