Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Item Report Details API

Security checks for vulnerabilities and agentic risk

Overview

This is a focused API wrapper, but it puts the JustOneAPI token in the request URL where logs or process tooling may retain it.

Review before installing if your JustOneAPI token has broad account access, paid quota, or access to sensitive analytics. Use a least-privilege, revocable token, avoid sharing command output or logs, and rotate the token if you suspect URLs or process arguments 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:24
Finding

Authentication Token Exposed in the Request URL Query String

Content
View full analysis

Vulnerability Details

File Location: bin/run.mjs:24-31, bin/run.mjs:209-217
Vulnerability Type: Credential exposure through URL query parameters
Risk Level: Medium

The operation metadata declares the authentication token as a query parameter:

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

The generic query-parameter handling subsequently appends the token to the request URL:

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

The resulting request has the effective form:

text
https://api.justoneapi.com/api/douyin-xingtu/gw/api/data_sp/item_report_detail/v1?token=SECRET&itemId=ITEM_ID

Technical Analysis

The helper receives an authentication token, injects it into the operation parameters, and uses URLSearchParams to place it in the URL. Although the request is sent over HTTPS to the fixed, declared api.justoneapi.com host, TLS does not prevent the URL from being recorded after termination.

Query strings are commonly retained by API gateways, reverse proxies, access logs, web application firewalls, observability platforms, tracing systems, browser-like tooling, and error telemetry. Consequently, infrastructure components that legitimately process the request may unintentionally retain the reusable credential.

The documented invocation also passes the token through the --token command-line argument. Depending on operating-system configuration, command-line arguments may be vis ...[truncated 2029 chars]

Remediation
View remediation

Remediation Suggestions

  1. Change the API authentication scheme to use an HTTP authorization header rather than a query parameter:

    javascript
    const requestInit = {
      headers: {
        accept: "application/json",
        authorization: `Bearer ${token}`,
      },
      method: operation.method,
    };
    
  2. Coordinate this change with the JustOneAPI server so the endpoint accepts header-based authentication. Remove token from the operation's query-parameter metadata after server support is available.

  3. Read the credential directly from process.env.JUST_ONE_API_TOKEN instead of requiring it as a command-line argument. If explicit injection is necessary, use protected standard input or another secret-delivery mechanism that does not expose the token in process listings.

  4. Ensure application, proxy, gateway, telemetry, and error logs redact authorization headers and sensitive query parameters. Until query authentication is retired, explicitly redact the token parameter before recording URLs.

  5. Avoid including complete request URLs, authorization values, or command invocations in diagnostic output. Add automated tests that verify credentials never appear in URLs, standard output, standard error, or exceptions.

  6. Rotate any token that may already have been retained in logs or shell history, and define short expiration periods and least-privilege scopes for replacement credentials.

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
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 causes the secret to appear in places where URLs are commonly logged or retained, such as CLI history, proxy logs, server access logs, monitoring systems, and browser/debug tooling. Although the request is sent over HTTPS, putting credentials in the URL unnecessarily increases exposure compared with using an Authorization header or request header-based secret handling.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The API requires an authentication token in the query string, which is an insecure credential transport pattern because query parameters are commonly logged by clients, proxies, gateways, analytics systems, browser history, and server access logs. Even over HTTPS, the token may be exposed through operational logging or URL sharing, enabling unauthorized reuse if leaked.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.