Back to skill

Security audit

Douyin Creator Marketplace (Xingtu) Item Report Analysis API

Security checks for vulnerabilities and agentic risk

Overview

This skill is a focused JustOneAPI client, but it handles the API token in ways that can expose it in process lists and URL logs.

Review this before installing if the JustOneAPI token is sensitive or high-value. Use a narrowly scoped, revocable token, avoid exposing command lines or full request URLs in logs, and rotate the token if it may have been captured. No evidence was found of persistence, unrelated data access, destructive actions, or network calls outside the declared JustOneAPI endpoint.

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
API Token Exposed Through Process Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `bin/run.mjs:24-31, 77-92, 138-151, 179-191, 216-224`; related usage documentation at `SKILL.md:37-43` **Vulnerability Type**: API credential exposure **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 token is accepted as a command-line argument and inserted into the parameter collection: ```js function parseArgs(argv) { const parsed = { operation: null, paramsJson: "{}", token: null }; for (let index = 0; index < argv.length; index += 1) { const flag = argv[index]; const value = argv[index + 1]; if (flag === "--operation") { parsed.operation = value; index += 1; continue; } if (flag === "--params-json") { parsed.paramsJson = value; index += 1; continue; } if (flag === "--token") { parsed.token = value; index += 1; continue; } fail(`Unknown argument "${flag}".`); } return parsed; } ``` ```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); } } ``` ```js functio ...[truncated 3343 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove command-line token handling** - Read the token directly from `process.env.JUST_ONE_API_TOKEN`. - Do not accept secrets through `--token`, because shell variable expansion still exposes the resulting value in process arguments. - Fail with a non-sensitive error if the environment variable is absent. 2. **Use an authorization header** - If supported by JustOneAPI, send the credential as 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}`, }, }; ``` - Remove `token` from the operation's query-parameter definition so it cannot be serialized into the URL. 3. **Apply compensating controls if query authentication is mandatory** - Confirm and document that the upstream service requires query-string authentication. - Use short-lived, narrowly scoped, and readily revocable tokens. - Configure clients, proxies, API gateways, servers, telemetry systems, and error reporting to redact the `token` parameter. - Avoid logging complete request URLs. - Review redirect behavior and prevent credentials from being exposed through unexpected redirects. 4. **Update documentation and generated artifacts** - Change `SKILL.md` to instruct users to set `JUST_ONE_API_TOKEN` only in the execution environment. - Update `generated/operations.json` and `generated/operations.md` so authentication is represented as a security scheme rather than an ordinary query parameter. - Add an explicit warning never to include token values in chat messages, command history, screenshots, logs, or diagnostic output. 5. **Rotate potentially exposed credentials** - Revoke and replace tokens previously used through the documented command-line workflow where process or URL logs may have retained them. ]]>
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 (5)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill invokes a network-capable helper (`node .../bin/run.mjs`) and is explicitly designed to call an external API, but it does not declare any explicit tool scope such as `permissions` or `allowed-tools`. That weakens policy enforcement and reviewability because an agent platform may permit broader-than-intended outbound access or fail to clearly constrain when network actions are allowed.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Passing an authentication token as a query parameter is risky because query strings are commonly logged by clients, proxies, servers, analytics systems, and browser history. In this skill, the token is sent to an external API service, and the schema provides no warning or safer auth mechanism, increasing the chance of credential leakage and downstream account compromise.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation explicitly requires a user authentication token in a query parameter but provides no warning that the token is sensitive or should be handled securely. Query parameters are commonly exposed in logs, browser history, analytics, and intermediary systems, so encouraging token placement there without caution increases the risk of credential leakage and unauthorized API access.

Vague Triggers

Low
Confidence
78% confidence
Finding
This file is a JSON manifest, so vague-trigger checks apply. The skill is described only by a general capability statement about calling an API with an itemId, but it does not define any explicit trigger phrases, scope limits, or negative examples clarifying when the skill should or should not be invoked.

Vague Triggers

Low
Confidence
88% confidence
Finding
This markdown file describes the operation's purpose and endpoint details, but it does not specify how or when a user or agent should invoke it, nor any constraints or exclusion conditions. For markdown files, vague or missing trigger specificity can lead to overly broad activation in tooling that derives invocation behavior from descriptions.

Static analysis

No suspicious patterns detected.