Back to skill

Security audit

Taobao and Tmall Product Details API

Security checks for vulnerabilities and agentic risk

Overview

This is a narrow JustOneAPI product-lookup skill, with the main caution that its API token is passed in command-line arguments and URL query parameters.

Install only if you trust JustOneAPI with the provided token and product item IDs. Use a low-privilege, revocable token, avoid pasting token values into chat or logs, and be aware that this skill passes the token through command-line arguments and the request URL query string.

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:326
Finding
API Token Exposed Through Process Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:52-60`; `bin/run.mjs:326-334, 376-388` **Vulnerability Type**: Credential exposure through command-line arguments and URL query strings **Risk Level**: Medium ### Vulnerable Code `SKILL.md:52-60` instructs users to pass the API token as a command-line argument: ```markdown node {baseDir}/bin/run.mjs --operation "getTaobaoItemDetailV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"itemId":"<itemId>"}' ``` `bin/run.mjs:326-334` copies that argument into the request parameter collection: ```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; } ``` `bin/run.mjs:376-388` serializes all query parameters, including `token`, into 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, including the token, is transmitted at `bin/run.mjs:237`: ```js response = await fetch(url, requestInit); ``` ### Technical Analysis The token is exposed through two channels: 1. **Process argument exposure:** Passing a secret through `--token` places it in the process argument vec ...[truncated 3286 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Stop accepting secrets through command-line arguments** - Read the token directly from `process.env.JUST_ONE_API_TOKEN`. - Remove or deprecate `--token`. - If backward compatibility is required, emit a warning and prioritize the environment variable. Example: ```js const token = process.env.JUST_ONE_API_TOKEN; if (!token) { fail("JUST_ONE_API_TOKEN is required.", { operationId: operation.operationId, }); } params.token = token; ``` 2. **Use header-based authentication when supported** - Prefer an HTTP authorization header over a query parameter: ```js requestInit.headers.authorization = `Bearer ${token}`; ``` - Confirm the exact authentication scheme with the JustOneAPI specification before changing the request. - Remove `token` from `url.searchParams` once header authentication is supported. 3. **If query authentication is mandatory** - Document that this is an upstream API requirement. - Use narrowly scoped and short-lived tokens where the service supports them. - Configure the API server, reverse proxies, gateways, and observability tools to redact the `token` query parameter. - Never include the complete request URL in application errors, debug logs, telemetry, or exception reports. - Ensure redirects are disabled or carefully validated so query credentials cannot be forwarded to another origin. 4. **Harden input handling** - Reject `token` inside `--params-json` so secrets cannot be supplied through an alternate command-line argument. - Keep credential acquisition separate from ordinary endpoint parameters. 5. **Update documentation** - Replace the documented invocation with one that relies on the environment variable: ```bash JUST_ONE_API_TOKEN="$JUST_ONE_API_TOKEN" node {baseDir}/bin/run.mjs \ --operation "getTaobaoItemDetailV1" \ --params-json '{"itemId":"<itemId>"}' ``` 6. **Operational safeguards** ...[truncated 212 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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
Findings (21)

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
96% confidence
Finding
This operation accepts an access token as a query parameter, which is a sensitive credential handling pattern. Query parameters are commonly recorded in logs, observability systems, caches, and intermediary infrastructure, so a leaked token could allow unauthorized use of the external API service.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
96% confidence
Finding
This second endpoint repeats the same credential handling flaw by requiring the access token in the query string. Because this skill offers multiple versions of the same API, the exposure surface is multiplied across all calls and any logging or tracing pipeline that captures request URLs.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
96% confidence
Finding
This endpoint also places the access token in the URL query, creating repeated credential exposure risk. In the context of a third-party ecommerce data API, compromise of the token could enable unauthorized consumption of paid API quota or access under the victim's account.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
96% confidence
Finding
The same sensitive-token-in-query pattern appears again for this API version. Repetition across versions indicates an insecure design choice rather than an isolated mistake, and the main danger is credential leakage through routine infrastructure rather than direct code execution.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
96% confidence
Finding
This final version continues to require the access token in a query parameter, preserving the same credential exposure risk across the entire skill. The skill context makes this more dangerous because every supported API version normalizes insecure credential transmission, increasing the chance of accidental leakage and reuse.

Credential Access

High
Category
Privilege Escalation
Content
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |

### Request body
Confidence
93% confidence
Finding
This skill requires an access token for a third-party API and specifies it as a query parameter. Credentials in query strings are high risk because they are often stored in browser history, intermediary proxies, analytics systems, and server logs, increasing the chance of credential leakage and unauthorized API use.

Credential Access

High
Category
Privilege Escalation
Content
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |

### Request body
Confidence
93% confidence
Finding
This endpoint repeats the same insecure credential pattern by requiring an access token in the query string for an external request. If requests are logged or observed by intermediaries, the token can be exposed and reused to access the API service without authorization.

Credential Access

High
Category
Privilege Escalation
Content
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |

### Request body
Confidence
93% confidence
Finding
The v4 operation documents an access token in the query string, creating the same credential exposure risk as the earlier endpoints. Because this is repeated across multiple versions, the attack surface is broader and increases the likelihood that tokens are mishandled somewhere in the integration path.

Credential Access

High
Category
Privilege Escalation
Content
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |

### Request body
Confidence
93% confidence
Finding
The v5 operation also requires the access token in the URL query, which exposes secrets to common logging and monitoring infrastructure. An attacker with access to logs, traces, referrers, or captured URLs could reuse the token to call the external API service.

Credential Access

High
Category
Privilege Escalation
Content
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `itemId` | `query` | yes | `string` | n/a | AUnique product identifier on Taobao/Tmall (item ID). |

### Request body
Confidence
93% confidence
Finding
The v9 endpoint continues the same pattern of passing an access token in the query string, which is an unsafe credential transport practice. In agent ecosystems, URL-based secrets are especially dangerous because requests may be surfaced in debugging output, observability tools, or user-visible traces.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill invokes a Node helper that performs authenticated external API calls, but the manifest does not declare an explicit tool scope such as allowed network access. This weakens least-privilege controls and reviewability, because a runtime may grant broader network/code capabilities than a user or platform policy expects, increasing the chance of unintended outbound requests or misuse of the provided API token.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill appends the API token as a query parameter, which exposes the credential in URLs that may be logged by clients, proxies, gateways, browser history, shell history, and monitoring systems. Even though the base URL uses HTTPS, query-string secrets are commonly retained in logs and error traces, making credential leakage materially more likely.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill requires an access token and sends it to an external third-party API, but the manifest provides no user-facing warning, consent language, or handling expectations. This creates a real risk of users or calling systems providing sensitive credentials without understanding they are being transmitted off-platform, increasing exposure through logs, proxies, browser history, or monitoring systems because the token is placed in the query string.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The documentation instructs use of an access token with external API endpoints but provides no warning that the token will be transmitted off-platform or guidance on secure handling. In an agent skill context, this can lead users or downstream tooling to expose sensitive credentials to a third-party service without informed consent, especially since the token is passed as a query parameter, which is commonly logged.

Vague Triggers

Low
Confidence
79% confidence
Finding
This JSON manifest says the skill can 'Call 5 get-item-detail versions' for product details, but it does not define any specific trigger phrases, usage boundaries, or exclusion conditions. In a manifest file, that broad description can make invocation criteria ambiguous because there is no clear statement of when the skill should or should not activate.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The operations description indicates that product identifiers will be sent to external Taobao/Tmall detail endpoints, but it does not disclose outbound data transfer or privacy considerations. While an item ID is usually less sensitive than a credential, undocumented external transmission can still violate user expectations, internal policy, or data-governance rules.

Static analysis

No suspicious patterns detected.