Back to skill

Security audit

Bilibili Video Search API

Security checks for vulnerabilities and agentic risk

Overview

The skill is a focused Bilibili search API wrapper, but it handles the required API token in ways that can expose it through command lines and request URLs.

Install only if you are comfortable sending searches and a JustOneAPI token to api.justoneapi.com. Use a restricted, low-quota, rotatable token if available, avoid sharing command logs, and rotate the token if it may have appeared in process listings, shell history, telemetry, or URL 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:25
Finding

API Token Exposed Through Process Arguments and URL Query Parameters

Content
View full analysis
parameter.name === "token"); if (!tokenParam || params.token !== undefined) { return; } if (!cliToken) { fail("--token is required for this operation.", { operationId: operation.operationId, }); } params.token = cliToken; } ``` All query parameters, including the token, are appended to 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); } } ``` The documented command also places the token in the process argument list: ```bash node {baseDir}/bin/run.mjs --operation "searchBilibiliVideoV2" --token "$JUST_ONE_API_TOKEN" --params-json '{"keyword":""}' ``` ### Technical Analysis The API credential is exposed through two related channels: 1. Passing the token using `--token` places its expanded value in the Node process co ...[truncated 2876 chars]
Remediation
View remediation
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 (9)

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 the API.",
          "enumValues": [],
          "location": "query",
          "name": "token",

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

The API requires an access token and places it in a query parameter, which is a risky credential transport pattern because query strings are commonly logged by clients, proxies, servers, analytics systems, and browser history. In this skill context, the token appears to be for a third-party API lookup service rather than a highly privileged platform secret, which lowers severity somewhat, but credential leakage could still enable unauthorized API use or quota abuse.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

Requiring an access token in the URL query string is a real credential-exposure weakness because URLs are routinely captured by servers, proxies, analytics systems, and client history. In an agent/integration context, this is more dangerous because tools may automatically log full request URLs, causing broad unintended disclosure of reusable API credentials.

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 the API. |
| `keyword` | `query` | yes | `string` | n/a | Search keyword. |
| `page` | `query` | no | `string` | n/a | Page number for pagination. |
| `order` | `query` | no | `string` | `general` | Sorting criteria for search results.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill defines the API access token as a query parameter and injects it into the request URL. Query-string credentials are commonly exposed through logs, browser/history layers, monitoring systems, proxies, and upstream infrastructure, making accidental credential disclosure more likely even when HTTPS is used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code performs an outbound HTTP request to api.justoneapi.com, transmitting user-provided search keywords and token data. Although the skill purpose implies API usage, the file does not include any explicit disclosure in comments, help text, or printed messaging about what data is sent externally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. The natural-language strings across the file are exclusively in English with no indication that users can choose another language or that English is a justified locale constraint.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

This is a manifest/JSON file, so SQP-1 applies. The file defines a required token parameter but provides no surrounding constraints, exclusions, or context about when this operation should or should not be used, which leaves the activation/usage scope broad and underspecified for an interface definition.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The documentation requires an API access token in a query parameter but provides no warning about secure handling, storage, or leakage risks. Query-string tokens are commonly exposed in logs, browser history, monitoring tools, and referrer data, so omitting credential-handling guidance increases the chance of accidental secret disclosure.

Content

No source excerpt is available for this finding.