Back to skill

Security audit

Kuaishou Share Link Resolution API

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it handles the API token in ways that can expose the token in process lists and URL logs.

Install only if you trust JustOneAPI with both the Kuaishou share URL and your API token. Prefer a token with limited scope or quota, avoid running the helper on shared systems where process arguments may be visible, and rotate the token if you suspect process or URL logs captured it.

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:18
Finding

API Access Token Exposed Through Process Arguments and URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: bin/run.mjs:18-27, bin/run.mjs:62-77, bin/run.mjs:200-211; usage is also documented in SKILL.md:39-45
Vulnerability Type: Sensitive credential exposure
Risk Level: Medium

The Skill legitimately needs to authenticate with JustOneAPI, but it handles the access token through two insecure channels: a command-line argument and a URL query parameter.

Vulnerable Code

The operation defines the access token as a query parameter:

js
      {
        "defaultValue": null,
        "description": "Access token for this API service.",
        "enumValues": [],
        "location": "query",
        "name": "token",
        "required": true,
        "schemaType": "string"
      },

The token is injected into the general parameter object, converted into a query parameter, and sent over the network:

js
const params = parseParams(args.paramsJson);
applyDefaults(operation, params);
injectToken(operation, params, args.token);
validateRequired(operation, params);

const baseUrl = manifest.baseUrl;
const url = new URL(operation.path, ensureBaseUrl(baseUrl));
applyPathParams(operation, params, url);
applyQueryParams(operation, params, url);

const requestInit = {
  headers: {
    "accept": "application/json",
  },
  method: operation.method,
};
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;
}

The documented invocation passes the secret through the process command line:

bash
node {baseDir}/bin/run.mjs --operation "shareLinkResolutionV1" --token "$JUST_ONE_API_TOKEN" --params-json 
...[truncated 2552 chars]
Remediation
View remediation

Remediation Suggestions

  1. Read the token directly from process.env.JUST_ONE_API_TOKEN rather than requiring it through --token. This prevents routine exposure in the process argument vector.

  2. Prefer an authorization header if supported by the service:

    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}`,
      },
    };
    
  3. Remove token from the ordinary operation parameter collection so it cannot accidentally be serialized into URLs, diagnostics, or returned parameter objects.

  4. Redact authentication parameters and full query strings from application, proxy, gateway, and observability logs.

  5. If JustOneAPI only supports query-string authentication, continue using HTTPS but read the token from the environment, configure all relevant infrastructure to redact the token parameter, restrict log access and retention, and explicitly document the residual exposure risk.

  6. Rotate any token suspected of having been captured in process or URL logs and apply the narrowest available API scope and quota limits.

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 (6)

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The API requires an access token in a query parameter, which is an unsafe pattern because query strings are commonly logged by clients, proxies, servers, and monitoring systems. If exposed, the token could be reused to access the external API service and potentially impersonate the caller or consume protected resources.

Content

Scanner excerpt · generated/operations.json (reported line 15)May include surrounding context.

json
"parameters": [
        {
          "defaultValue": null,
          "description": "Access token for this API service.",
          "enumValues": [],
          "location": "query",
          "name": "token",

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · bin/run.mjs (reported line 20)May include surrounding context.

js
| 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

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · generated/operations.md (reported line 19)May include surrounding context.

md
| 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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill invokes a network-capable helper (node .../bin/run.mjs) and describes calling an external API, but it does not declare an explicit tool scope such as permissions or allowed-tools. That mismatch weakens least-privilege controls and makes it easier for the skill to perform network actions without clear platform-level restriction or reviewer visibility.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest explicitly sends both a share URL and an access token to a third-party API but does not disclose this data transfer to the user. This creates a transparency and privacy risk because users may unknowingly authorize off-system transmission of potentially sensitive URLs or credentials.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest provides no explicit trigger scope or invocation constraints, which can allow the skill to be suggested or invoked in broader contexts than necessary. For a skill that sends user-supplied URLs and credentials to an external service, overly broad activation increases the chance of unintended data disclosure or misuse.

Content

No source excerpt is available for this finding.