Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Follower Distribution API

Security checks for vulnerabilities and agentic risk

Overview

The skill is a focused JustOneAPI endpoint helper, but it passes the user's API token in URLs and command-line arguments where it may be exposed in logs or process records.

Review this skill before installing if the JustOneAPI token has meaningful account access, quota, or billing impact. Use a narrowly scoped token if possible, avoid sharing command logs, and rotate the token if it may have been captured in process, shell, proxy, gateway, or server 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
bin/run.mjs:21
Finding

Authentication Token Transmitted in the URL Query String

Content
View full analysis

Vulnerability Details

File Location: bin/run.mjs:21-29, bin/run.mjs:94-96, and bin/run.mjs:227-234
Vulnerability Type: Credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code

js
{
  "defaultValue": null,
  "description": "User authentication token.",
  "enumValues": [],
  "location": "query",
  "name": "token",
  "required": true,
  "schemaType": "string"
}
js
injectToken(operation, params, args.token);
validateRequired(operation, params);

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",
  },
  method: operation.method,
};
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);
  }
}

Technical Analysis

The manifest defines the authentication token as a required query parameter. The injectToken function places the supplied credential into params.token, after which applyQueryParams appends every query parameter—including the token—to the request URL.

HTTPS protects the URL while it is in transit between the client and the server, but it does not prevent the complete URL from being retained by components that process the request. Query strings may be captured by reverse proxies, API gateways, server access logs, debugging tools, monitoring systems, browser or HTTP diagnostics, and error telemetry.

Sending the credential to the fixed https://api.justoneapi.com endpoint is consistent with the Skill's declared functionality and is not evidence of co ...[truncated 1256 chars]

Remediation
View remediation

Remediation Suggestions

  1. Change the API authentication contract to use an HTTP authorization header, for example:

    js
    const requestInit = {
      headers: {
        accept: "application/json",
        authorization: `Bearer ${token}`,
      },
      method: operation.method,
    };
    
  2. Remove token from the operation's query-parameter definition and ensure it is never passed to URLSearchParams.

  3. If the upstream service cannot immediately be changed, configure clients, reverse proxies, gateways, servers, and monitoring systems to redact the token query parameter before logging or exporting telemetry.

  4. Avoid including complete request URLs in error messages and diagnostics.

  5. Rotate any tokens that may already have appeared in URL-bearing logs, and restrict access to historical logs.

  6. Apply short expiration periods, narrow API scopes, usage alerts, and rate limits to reduce the impact of future token disclosure.

T09 · Insecure Skill Coding Practices

Note
Location
bin/run.mjs:151
Finding

Authentication Token Exposed Through Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:42 and bin/run.mjs:151-155
Vulnerability Type: Credential exposure through process arguments
Risk Level: Low

Vulnerable Code

The documented invocation expands the secret into a command-line argument:

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

The argument parser accepts and stores the expanded credential:

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

Technical Analysis

Although the token originates in the JUST_ONE_API_TOKEN environment variable, the recommended command expands it into the child process's argument vector. Depending on the operating system, container configuration, process visibility controls, and monitoring environment, command-line arguments may be visible through process inspection utilities, process metadata, audit systems, endpoint monitoring products, job runners, or diagnostic reports.

The exposure window may be brief because this helper performs one request and exits. Exploitation also generally requires local process-observation privileges or access to monitoring records. These constraints reduce the severity, but passing reusable secrets through command-line arguments remains unsafe.

Attack Path

  1. A user follows the documented command and invokes the helper with --token "$JUST_ONE_API_TOKEN".
  2. The shell expands the environment variable before creating the Node.js process.
  3. The resulting token appears in the process argument vector.
  4. A local user, monitoring agent, audit service, or job-orchestration system with sufficient process visibility records or reads the command line.
  5. The observer extracts the token and reuses it against JustOneAPI.

Impact Assessment

An attacker who obtains the argument value can act with ...[truncated 434 chars]

Remediation
View remediation

Remediation Suggestions

  1. Read the token directly from the environment instead of requiring it as a command-line argument:

    js
    const token = process.env.JUST_ONE_API_TOKEN;
    if (!token) {
      fail("JUST_ONE_API_TOKEN is required.");
    }
    
  2. Update SKILL.md so the recommended invocation does not include --token:

    bash
    JUST_ONE_API_TOKEN="$JUST_ONE_API_TOKEN" node {baseDir}/bin/run.mjs \
      --operation "gwApiDataSpGetAuthorFansDistributionV1" \
      --params-json '{"oAuthorId":"<oAuthorId>"}'
    
  3. Prefer a secret manager or protected standard-input channel in environments where environment variables are also broadly observable.

  4. If backward compatibility requires temporary --token support, mark it as deprecated and warn users that process arguments may be recorded.

  5. Ensure errors, diagnostics, and monitoring events never emit the token or the complete command line.

  6. Rotate tokens suspected of having been captured by process-monitoring or job-runner telemetry.

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 (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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 the authentication token as a query parameter and injects it into the request URL, which exposes the credential in places where URLs are commonly logged, cached, stored in browser/history tooling, reverse proxies, monitoring systems, and server access logs. Even though the request uses HTTPS, putting secrets in the URL materially increases accidental disclosure risk compared with using an Authorization header or other non-URL secret transport.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly requires a user authentication token in a query parameter but provides no warning about secure handling, logging risk, or privacy implications. Query parameters are commonly captured in logs, analytics, browser history, and intermediary systems, which can expose credentials and enable unauthorized API access.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This JSON manifest describes the API operation and skill metadata but does not specify any activation phrases, invocation boundaries, or exclusion conditions. For manifest files, the absence of trigger specificity can make it unclear when the skill should activate versus when it should not.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
64% confidence
Finding

The natural-language descriptions repeatedly target 'Douyin Creator Marketplace (Xingtu)', which implies a specific locale/platform context, but the file does not state whether this is an optional, user-selected context or a justified regional specialization. Under the policy rule, locale-specific constraints should be explicitly opt-in or clearly documented as region-specific.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

This markdown file describes an endpoint and parameters but provides no explicit activation phrases, scope limits, or exclusion conditions for when the skill should be invoked. In markdown files, the absence of specific trigger guidance can create ambiguity about when the skill applies versus when it should not be used.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.