Back to skill

Security audit

Kuaishou Video Details API

Security checks for vulnerabilities and agentic risk

Overview

This is a focused API wrapper, but it handles the user's JustOneAPI token in ways that can expose it through process metadata and request URLs.

Install only if you are comfortable exposing a JustOneAPI token to the local process command line and to JustOneAPI request URLs. Use a narrowly scoped, revocable token, avoid sharing logs or process listings from runs, monitor quota or billing, and rotate the token if it may have appeared in 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:31
Finding

API Credential Exposed Through Command-Line Arguments and URL Query Parameters

Content
View full analysis
"}' ``` `bin/run.mjs:31-38` declares the credential as a query parameter: ```js { "defaultValue": null, "description": "Access token for this API service.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" }, ``` `bin/run.mjs:65-67` adds all query parameters, including the token, to the request URL: ```js applyPathParams(operation, params, url); applyQueryParams(operation, params, url); ``` `bin/run.mjs:187-197` copies the command-line credential into the request parameters: ```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:223-233` serializes query parameters into the 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); } } ``` The generated API documentation repeats the same query-token contract in `generated/operations.json:14-22`: ```json { "defaultValue": null, "description" ...[truncated 3311 chars]
Remediation
View remediation
"}' ``` 2. **Use an authentication header if the provider supports it.** Prefer a standard header such as: ```js requestInit.headers.authorization = `Bearer ${token}`; ``` Do not add the token to `URL.searchParams`. 3. **If the API currently requires query-string authentication, request or implement a provider-side authentication-header option.** Until that is available: - Read the token from the environment rather than the command line. - Configure clients, gateways, proxies, observability tools, and servers to redact the `token` query parameter. - Disable query-string capture where operationally possible. - Ensure error messages and diagnostics never print the fully constructed URL. - Use short-lived, narrowly scoped tokens with restrictive quotas. 4. **Prevent alternate token injection through `--params-json`.** Reject a caller-provided `params.token` and source credentials only from the designated secure mechanism. This avoids accidental token inclusion in shell history or application logs. 5. **Rotate potentially exposed credentials.** Tokens previously used through command arguments or logged query strings should be revoked and replaced after relevant logs and telemetry are reviewed. 6. **Update all generated metadata and documentation.** Keep `SKILL.md`, `generated/operations.json`, and `generated/operations.md` consistent with the hardened authentic ...[truncated 99 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

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
"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 · 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 · generated/operations.md (reported line 19)May include surrounding context.

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

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill invokes a network-capable helper (node .../bin/run.mjs) and relies on an API token, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls because an agent runtime or reviewer cannot clearly constrain or validate the intended network access, increasing the chance of unintended outbound requests or over-broad execution authority.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill sends the API token as a URL query parameter, which is routinely exposed through logs, browser history, intermediary proxies, monitoring systems, and error telemetry. Although the request uses HTTPS, query-string credentials are still more likely to leak than header-based secrets, and the code provides no warning or mitigation for that risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The API requires a sensitive access token to be sent as a query parameter, which is commonly exposed through logs, browser history, intermediary proxies, monitoring systems, and referrer leakage. Even though this file is only an interface definition, documenting and encouraging token placement in the URL materially increases the chance of credential disclosure during normal use.

Content

No source excerpt is available for this finding.