Back to skill

Security audit

Weibo User Published Posts API

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent single-endpoint Weibo API helper, but it handles the JustOneAPI token in ways that can expose it unnecessarily.

Review this before installing if your JustOneAPI token has broad quota, billing, or data access. Prefer a version that reads the token directly from the environment and uses header-based authentication if the API supports it; if query-token authentication is unavoidable, use a narrowly scoped token, avoid logging full URLs, and only monitor accounts you are permitted to monitor.

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:222
Finding
API Token Exposure Through Command-Line Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:40,48`; `bin/run.mjs:21-29,80-91,222-230` **Vulnerability Type**: Credential exposure through process arguments and URL query strings **Risk Level**: Medium ### Vulnerable Code `SKILL.md:40`: ```bash node {baseDir}/bin/run.mjs --operation "getUserPublishedPostsV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"uid":"<uid>"}' ``` `bin/run.mjs:21-29`: ```js { "defaultValue": null, "description": "API access token.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" } ``` `bin/run.mjs:80-91`: ```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); ``` `bin/run.mjs:222-230`: ```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 Skill accepts the JustOneAPI access token through the `--token` command-line option and injects it into the request parameters. Because the manifest defines `token` as a query parameter, `applyQueryParams` appends the credential to the request URL before `fetch` sends the request to `https://api.justoneapi.com`. Passing a secret through a command-line argument can expose it through process listings, process inspection interfaces, shell auditing, command-execution telemetry, or wrapper logs. Although shell expansion of an environment variable prevents the literal token from being stored in the documented command itself, the expanded value is ...[truncated 2065 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Read the token directly from `process.env.JUST_ONE_API_TOKEN` rather than requiring it through `--token`. This prevents routine exposure through the process argument vector. 2. Prefer an authentication header supported by the service, such as: ```js const token = process.env.JUST_ONE_API_TOKEN; if (!token) { fail("JUST_ONE_API_TOKEN is required."); } const requestInit = { headers: { accept: "application/json", authorization: `Bearer ${token}`, }, method: operation.method, }; ``` 3. Remove `token` from the operation's query-parameter schema so generic query construction cannot append the secret to the URL. 4. If the upstream API only supports query-string authentication: - Still read the token directly from the environment. - Ensure clients, proxies, gateways, and application servers redact the `token` parameter. - Never print or serialize the complete request URL. - Disable URL capture in tracing and error-reporting systems where possible. - Use short-lived, narrowly scoped tokens with strict rate and spending limits. 5. Update `SKILL.md` to remove the `--token` example and document secure environment-based credential loading. 6. Rotate any token that may already have appeared in command history, process telemetry, or URL logs. ]]>
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 (7)

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
95% confidence
Finding
The skill defines an API access token as a query parameter and the code appends all query parameters directly into the request URL. Query-string credentials are commonly exposed through logs, browser/history layers, proxies, analytics, and error reporting, making accidental token disclosure significantly more likely than header-based authentication.

Credential Access

High
Category
Privilege Escalation
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
87% confidence
Finding
The skill requires an API access token as a query parameter, which is weaker than passing credentials in an Authorization header. Query parameters are more likely to be logged by clients, proxies, analytics systems, and server infrastructure, increasing the chance of credential leakage and subsequent unauthorized API use.

Credential Access

High
Category
Privilege Escalation
Content
| Name | In | Required | Type | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `token` | `query` | yes | `string` | n/a | API access token. |
| `uid` | `query` | yes | `string` | n/a | Weibo User ID (UID). |
| `page` | `query` | no | `integer` | `1` | Page number, starting with 1. |
| `sinceId` | `query` | no | `string` | n/a | Pagination cursor (since_id). Required if page > 1. |
Confidence
80% confidence
Finding
The operation requires an API access token as a query parameter, which is a weaker pattern because query parameters are commonly captured in logs, browser history, analytics, and intermediary systems. In a skill or agent integration, this increases the risk of accidental credential exposure and downstream unauthorized API use.

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill invokes a network-capable helper (`node .../run.mjs`) that will make outbound API requests, but the manifest does not declare an explicit tool scope such as `permissions` or `allowed-tools`. This creates a policy gap where an agent or reviewer cannot easily constrain or reason about the skill's external communication surface, increasing the risk of unintended data exfiltration or overbroad execution in environments that rely on manifest-declared capabilities.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
The skill explicitly describes using Weibo post data for account monitoring and requires a token and UID, but provides no warning about authorization, consent, privacy expectations, or acceptable use. In an agent context, this can normalize surveillance-oriented collection and increase the chance of unauthorized monitoring or misuse of third-party data.

Vague Triggers

Low
Confidence
78% confidence
Finding
This is a manifest-style JSON file, so trigger clarity applies. The description and operation summary describe the capability but provide no explicit invocation boundaries, allowed trigger phrases, or exclusion conditions, making activation scope ambiguous.

Natural-Language Policy Violations

Low
Confidence
71% confidence
Finding
The natural-language fields in the manifest are written only in English, and there is no indication that users can choose another language or that English is a justified requirement. This can be a language-policy concern if organizational policy requires offering language choice rather than implicitly forcing one language.

Static analysis

Detected: suspicious.secret_argv_exposure

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
SKILL.md:43