Back to skill

Security audit

Douban Movie API

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Douban Movie API wrapper, but users should handle its JustOneAPI token carefully because it is passed through command-line arguments and URL query parameters.

Install only if you are comfortable sending Douban identifiers and your JustOneAPI token to api.justoneapi.com. Use a narrowly scoped token if available, avoid sharing logs or full command lines, and rotate the token if you suspect request URLs or process arguments were 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:369
Finding
API Token Exposed Through Process Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:43`; `bin/run.mjs:369-372`, `bin/run.mjs:403-411`, and `bin/run.mjs:446-465` **Vulnerability Type**: Credential exposure through command-line arguments and URL query parameters **Risk Level**: Medium ### Vulnerable Code `SKILL.md:43`: ```bash node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}' ``` `bin/run.mjs:369-372`: ```js if (flag === "--token") { parsed.token = value; index += 1; continue; } ``` `bin/run.mjs:403-411`: ```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:446-465`: ```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)); } ``` ### Technical Analysis The documented invocation expands `JUST_ONE_API_TOKEN` into the Node.js process argument vector. On systems where process metadata is visible to other users, monitoring agents, container administrators, or diagnostic tools, the token may be captured while the process is running or from recorded process telemetry. The helper subsequently assi ...[truncated 1993 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the secret-bearing `--token` command-line option and read the token directly from the environment: ```js const token = process.env.JUST_ONE_API_TOKEN; if (!token) { fail("JUST_ONE_API_TOKEN is required."); } ``` 2. If supported by JustOneAPI, transmit the token in an authorization header instead of the URL: ```js const requestInit = { method: operation.method, headers: { accept: "application/json", authorization: `Bearer ${token}`, }, }; ``` 3. Remove `token` from the user-controlled parameter object so callers cannot override or accidentally serialize credentials through `--params-json`. 4. If the upstream API strictly requires query-string authentication: - Redact the `token` parameter before logging URLs or request diagnostics. - Configure proxies, gateways, servers, and observability systems not to retain query strings for these routes. - Avoid including complete request URLs in exceptions. - Use short-lived, narrowly scoped tokens and support prompt rotation and revocation. - Explicitly document the unavoidable residual query-string exposure. 5. Update `SKILL.md` to use an environment-only invocation without a token argument: ```bash JUST_ONE_API_TOKEN="..." node {baseDir}/bin/run.mjs \ --operation "<operation-id>" \ --params-json '{"key":"value"}' ``` Prefer setting the variable through a protected runtime secret store rather than inline shell syntax, because inline environment assignments may also be retained in shell or orchestration telemetry. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (28)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_douban&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_douban&utm_content=project_link).

## Output Rules

- Start with a plain-language answer tied to the Douban Movie task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

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
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
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
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | Access token for this API service. |
| `subjectId` | `query` | yes | `string` | n/a | The unique ID for a movie or TV subject on Douban. |
| `sort` | `query` | no | `string` | `time` | Sort order for the result set.
Confidence
96% confidence
Finding
Requiring an access token in a query parameter creates a credential exposure path because URLs are frequently stored or transmitted beyond the immediate request context. If the token is captured in logs, shared links, error reports, or observability tooling, an attacker could replay it to access the 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. |
| `reviewId` | `query` | yes | `string` | n/a | The unique ID for a specific review on Douban. |

### Request body
Confidence
96% confidence
Finding
This endpoint also places the access token in the query string, creating the same credential leakage risk across request logs, monitoring systems, and intermediary infrastructure. Because review-detail access is authenticated, token theft could let an attacker make unauthorized API calls within the token's scope.

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. |
| `subjectId` | `query` | yes | `string` | n/a | The unique ID for a movie or TV subject on Douban. |
| `sort` | `query` | no | `string` | `time` | Sort order for the result set.
Confidence
96% confidence
Finding
Embedding the token in the URL for movie reviews exposes credentials to common logging and telemetry surfaces, which is an established insecure design pattern. An intercepted token could be replayed by anyone with access to those records, leading to unauthorized use of the API.

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. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |

### Request body
Confidence
96% confidence
Finding
The recent hot movie endpoint likewise requires the token in a query parameter, making the credential vulnerable to leakage through URL retention and inspection mechanisms. Even though the underlying data may be low sensitivity, the exposed credential still grants authenticated access to the service and could be abused.

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. |
| `page` | `query` | no | `integer` | `1` | Page number for pagination. |

### Request body
Confidence
96% confidence
Finding
Using a query parameter for the access token on the recent hot TV endpoint creates the same credential exposure problem seen elsewhere in the skill. The danger is elevated by repetition across multiple operations, increasing the likelihood that integrators normalize unsafe handling and leak tokens broadly.

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. |
| `subjectId` | `query` | yes | `string` | n/a | The unique ID for a movie or TV subject on Douban. |

### Request body
Confidence
96% confidence
Finding
Passing the token in the subject-detail request URL exposes an authentication secret to logs, caches, and observability tooling that commonly record full request URIs. If obtained by an attacker or an unintended internal party, the token could be replayed to access the API within its assigned permissions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The manifest description says the skill analyzes Douban Movie workflows including movie reviews, review details, and subject details across 6 operations. However, the operation list also includes recent hot movie and recent hot TV retrieval endpoints, which are discovery/trend-monitoring capabilities outside the narrowly described review/detail workflow scope.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
This skill sends the API access token as a query parameter, which is risky because query strings are commonly logged by proxies, servers, browser history, observability tools, and upstream infrastructure. Although the base URL uses HTTPS, placing secrets in the URL increases the chance of credential leakage through logs and telemetry outside the application's control.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The top-level description claims the skill covers only reviews, review details, and subject details, but the manifest also exposes comments and recent hot movie/TV endpoints. This mismatch can mislead users about what data flows and capabilities are present, weakening informed consent and review accuracy, though it is not direct code execution or data exfiltration by itself.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The skill description does not warn that user-provided identifiers and credentials are sent to an external third-party API. This reduces transparency around privacy and data handling, making users less able to assess whether they want to disclose tokens or content-related identifiers.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This operation requires an access token in the query string, which is more likely to be logged by clients, proxies, servers, browser history, and observability systems than an Authorization header. Even over HTTPS, query parameters commonly leak into logs and analytics, increasing the chance of credential disclosure.

Static analysis

No suspicious patterns detected.