Back to skill

Security audit

Weibo Search User Published Posts API

Security checks for vulnerabilities and agentic risk

Overview

This skill does only the documented Weibo API lookup, but it handles the API token in ways that can expose it in process listings and URL logs.

Install only if you are comfortable giving this skill a JustOneAPI token and having that token sent as a URL query parameter. Use a narrowly scoped token if available, avoid shared machines or verbose command/process logging, monitor usage, 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:19
Finding
API Token Exposed Through Command-Line Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `bin/run.mjs:19-27`, `bin/run.mjs:103-113`, `bin/run.mjs:173-188`, `bin/run.mjs:247-256`; related usage instructions at `SKILL.md:41` and `SKILL.md:47` **Vulnerability Type**: API credential exposure through process metadata and request URLs **Risk Level**: Medium ### Vulnerable Code The operation declares the API token as a query parameter: ```js { "defaultValue": null, "description": "API access token.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" }, ``` The token is injected into the parameter object and all query parameters are appended to the request URL: ```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); ``` The command-line parser accepts the credential through `--token`: ```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; } fail(`Unknown argument "${flag}".`); } return parsed; } ``` The token is copied into the parameters later serialized into the URL: ```js function injectToken(operation, params, cliToken) { const tokenParam = operation.parameters.find((parameter) => parameter.name === "token"); if (!tokenParam || params.token !== undefined) { ret ...[truncated 3120 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Remove command-line token handling** - Read the credential directly from `process.env.JUST_ONE_API_TOKEN`. - Do not support tokens in `--params-json`. - Remove or deprecate the `--token` argument so credentials are not included in process metadata. 2. **Use header-based authentication where supported** - Prefer an HTTP header such as: ```js requestInit.headers.authorization = `Bearer ${token}`; ``` - Remove `token` from the URL parameter definitions and prevent it from reaching `URL.searchParams`. - Confirm the precise authentication scheme with JustOneAPI before implementing the header. 3. **If query authentication is mandated by the upstream service** - Treat this as a documented residual risk. - Configure clients, proxies, gateways, servers, and observability systems to redact the `token` query parameter. - Never include complete request URLs in application errors or debug logs. - Use short-lived, narrowly scoped tokens where the provider supports them. - Apply strict access controls and short retention periods to URL-bearing logs. 4. **Harden input handling** - Reject a `token` property supplied through `--params-json`; otherwise callers can bypass the intended credential source. - Keep credentials separate from ordinary operation parameters throughout the request-building process. 5. **Operational controls** - Rotate any token that may already have appeared in process telemetry or URL logs. - Monitor for unusual usage, quota consumption, and access from unexpected locations. - Update `SKILL.md` so examples use the environment variable internally without expanding it into a command-line argument. ]]>
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
Content
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "enumValues": [],
          "location": "query",
          "name": "token",
Confidence
94% confidence
Finding
The presence of a required access token parameter indicates the skill handles credentials, and in this specific interface the credential is collected via a query parameter, increasing the chance of accidental exposure. The skill context makes this more dangerous because it is a third-party API integration for data retrieval, so user-supplied secrets may traverse multiple systems and be retained in request traces or service logs.

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). |
| `q` | `query` | yes | `string` | n/a | Search Keywords. |
| `startDay` | `query` | no | `string` | n/a | Start Day (yyyy-MM-dd). |
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

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). |
| `q` | `query` | yes | `string` | n/a | Search Keywords. |
| `startDay` | `query` | no | `string` | n/a | Start Day (yyyy-MM-dd). |
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill invokes a network-capable helper (`node .../bin/run.mjs`) and uses an API token, but it does not declare any explicit tool scope such as `permissions` or `allowed-tools`. This creates a governance gap: an agent platform may permit broader tool usage than intended, reducing reviewability and increasing the chance of unintended outbound requests or misuse of the provided credential.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill requires an API access token to be sent as a URL query parameter, which is unsafe because query strings are commonly logged by clients, proxies, analytics systems, and server infrastructure. Even over HTTPS, the token may be exposed through logs, browser history, debugging tools, or downstream observability systems, creating a realistic credential leakage risk.

Vague Triggers

Low
Confidence
83% confidence
Finding
This JSON file describes the skill and its purpose, but it does not specify any explicit invocation phrases, constraints, or exclusion conditions. For a manifest-style file, that can make activation behavior ambiguous because there is no clear boundary for when this skill should be selected versus similar search skills.

Static analysis

Detected: suspicious.secret_argv_exposure

Instructions pass high-value credentials through process argv.

Critical
Code
suspicious.secret_argv_exposure
Location
SKILL.md:45