Back to skill

Security audit

Kuaishou API

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Kuaishou API wrapper, but it handles the JustOneAPI token in ways that can leak it through process arguments and request URLs.

Install only if you are comfortable sending Kuaishou queries and your JustOneAPI token to api.justoneapi.com. Prefer a limited-scope, low-quota token, avoid logging commands or full request URLs, and rotate the token if it may have appeared in shell history, process telemetry, or API 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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
bin/run.mjs:386
Finding
API Token Exposed Through Command-Line Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:43`; `bin/run.mjs:386-403, 432-442, 476-483` **Vulnerability Type**: Credential exposure through process arguments and URL query strings **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:386-403`: ```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; } ``` `bin/run.mjs:432-442`: ```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:476-483`: ```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 documented invocation expands `JUST_ONE_API_TOKEN` into the process command line. Depending on operating-system controls and the surrounding execution environment, command-line arguments may be visible through process inspection, shell tracing, job telemetry, audit s ...[truncated 2335 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove command-line token handling** - Read `JUST_ONE_API_TOKEN` directly from `process.env`. - Remove the `--token` option from `parseArgs`. - Fail safely when the environment variable is absent without printing its value. 2. **Move authentication out of the URL** - Prefer an HTTP authorization header, such as: ```js requestInit.headers.authorization = `Bearer ${token}`; ``` - Use the exact authentication scheme supported by JustOneAPI. - Remove `token` from query-parameter serialization when header-based authentication is available. 3. **If query authentication is mandated by the upstream API** - Document that the upstream protocol requires a query credential. - Ensure reverse proxies, API gateways, tracing systems, and access logs redact the `token` parameter. - Disable URL capture in local debugging and monitoring tools where practical. - Apply short token lifetimes, narrow scopes, usage limits, and routine rotation. 4. **Prevent accidental disclosure** - Add a centralized redaction function for `token`, `authorization`, and similar fields before emitting errors or telemetry. - Never include the constructed request URL in errors unless sensitive query parameters have first been removed. - Add automated tests confirming that credentials do not appear in process invocation examples, standard output, standard error, or diagnostic records. 5. **Update the documented invocation** - Replace the current command with: ```bash JUST_ONE_API_TOKEN="..." node {baseDir}/bin/run.mjs \ --operation "<operation-id>" \ --params-json '{"key":"value"}' ``` - Prefer configuring the environment outside interactive shell history, such as through a protected secret manager or execution environment. ]]>
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 (29)

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_kuaishou&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_kuaishou&utm_content=project_link).

## Output Rules

- Start with a plain-language answer tied to the Kuaishou 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
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
97% confidence
Finding
This operation requires an access token and sends it as a URL query parameter. Query-string credentials are dangerous because they are routinely exposed in logs, browser history, proxy caches, monitoring systems, and error reports, increasing the chance of credential leakage even over HTTPS.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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 requires an access token to be passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, and servers and may leak via monitoring systems or referrer-like handling. In this skill context, the token is sent to a third-party API endpoint, increasing exposure risk and making credential compromise more consequential.

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. |
| `userId` | `query` | yes | `string` | n/a | The unique user ID on Kuaishou. |

### Request body
Confidence
97% confidence
Finding
This operation requires an access token in a query parameter, which is an unsafe credential transport pattern. Tokens in URLs may be exposed through logs, browser history, referrers, monitoring tools, and shared traces, enabling unauthorized use of 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. |
| `userId` | `query` | yes | `string` | n/a | The unique user ID on Kuaishou. |
| `pcursor` | `query` | no | `string` | n/a | Pagination cursor for subsequent pages. |
Confidence
97% confidence
Finding
This endpoint also places the required access token in the query string, creating repeated opportunities for credential leakage across pagination and routine use. Because this operation supports content enumeration, a leaked token could be abused for broad scraping or account research at scale.

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. |
| `videoId` | `query` | yes | `string` | n/a | The unique ID of the Kuaishou video, e.g. `3xbknvct79h46h9` or refer_photo_id `177012131237` |
| `pcursor` | `query` | no | `string` | n/a | Pagination cursor for subsequent pages. |
Confidence
97% confidence
Finding
The video-comment retrieval endpoint requires a token in the URL query, exposing credentials to common logging and telemetry paths. Since the endpoint can be used repeatedly with pagination, credential compromise could facilitate large-scale harvesting of engagement data and comments.

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. |
| `videoId` | `query` | yes | `string` | n/a | The unique ID of the Kuaishou video, e.g. `3xg9avuebhtfcku` |

### Request body
Confidence
97% confidence
Finding
Requiring the access token in the query string for video-detail lookups creates a direct secret-exposure risk during normal API usage. Any intermediary or client that records request URLs can capture the token and allow unauthorized access to the 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. |
| `keyword` | `query` | yes | `string` | n/a | The search keyword to find users. |
| `page` | `query` | no | `integer` | `1` | Page number for results, starting from 1. |
Confidence
97% confidence
Finding
This user-search operation exposes the required token in the query string, which is especially risky for frequently used discovery workflows that may generate many logged URLs. A leaked token could be reused to perform unauthorized searches and collect account data through 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. |
| `keyword` | `query` | yes | `string` | n/a | The search keyword to find videos. |
| `page` | `query` | no | `integer` | `1` | Page number for results, starting from 1. |
Confidence
97% confidence
Finding
The video-search endpoint uses the same insecure pattern of passing the access token in the URL. Because search endpoints are commonly integrated into dashboards, jobs, and analytics tooling, query-string tokens are highly likely to propagate into logs and third-party telemetry.

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. |
| `shareUrl` | `query` | yes | `string` | n/a | Kuaishou share URL (must start with 'https://v.kuaishou.com/'). |

### Request body
Confidence
98% confidence
Finding
The share-link resolution endpoint also requires the access token in the query string, combining credential exposure risk with user-supplied URL processing. In this skill context, repeated automated link resolution can make token leakage and downstream misuse more dangerous because it is likely to be embedded in workflows and logs.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill invokes a Node helper that performs authenticated external API requests, but the manifest does not declare any explicit tool scope such as allowed tools or network permissions. This weakens least-privilege controls and makes the skill's runtime capabilities less transparent to the hosting agent, increasing the chance of unintended network access or policy bypass.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
The manifest description says the skill analyzes Kuaishou workflows including user Search, user Published Videos, and video Details across 7 operations, which implies those named areas are the scope. However, the declared operations also include user profile retrieval, video comments retrieval, video search, and share-link resolution, expanding the functional scope beyond what the description states.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The manifest defines multiple external API calls that send an access token and user-supplied identifiers or search queries to a third-party service, but it provides no user-facing disclosure about external transmission, credential handling, retention, or trust boundaries. This creates a real risk of inadvertent credential exposure and privacy leakage because users may not realize their token, user IDs, search keywords, or shared URLs are being transmitted to api.justoneapi.com.

Static analysis

No suspicious patterns detected.