Back to skill

Security audit

Weibo API

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a read-only Weibo API client, but it handles the API token in ways that can expose it through command lines and request URLs.

Install only if you are comfortable sending Weibo queries and the JustOneAPI token to api.justoneapi.com. Use a scoped, revocable token, avoid running it where process arguments or full URLs are logged, and rotate the token if it may have appeared in logs or telemetry.

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

API Token Exposure Through Process Arguments and URL Query Parameters

Content
View full analysis
" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}' ``` The command-line parser stores that token: ```javascript 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 injected into the request parameters: ```javascript 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; } ``` All query parameters, including `token`, are then added to the request URL: ```javascript const params = parseParams(args.paramsJson); applyDefaults(operation, params); injectToken(operation, params, args.token); validateRequired(operation, params); const baseUrl = ...[truncated 3379 chars]
Remediation
View remediation
" \ --params-json '{"key":"value"}' ``` 6. **Rotate potentially exposed credentials.** After deploying the hardened implementation, revoke existing tokens that may have appeared in process telemetry or URL logs and issue replacements. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (42)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · SKILL.md (reported line 54)May include surrounding context.

md
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_weibo&utm_content=project_link).
- Authentication details: [Just One API Usage Guide](https://docs.justoneapi.com/en/?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_weibo&utm_content=project_link).

## Output Rules

- Lead with the concrete Weibo finding: trend, account signal, post detail, or audience graph.
- For hot search or keyword search requests, restate the search window and filters before listing results.

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": "API access token.",
          "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 66)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 112)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 170)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 207)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 262)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 308)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 345)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 373)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 479)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "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 552)May include surrounding context.

js
"parameters": [
        {
          "defaultValue": null,
          "description": "API access token.",
          "enumValues": [],
          "location": "query",
          "name": "token",

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The API access token is passed as a query parameter, which is dangerous because query strings are commonly logged by clients, proxies, gateways, analytics systems, and server access logs. Exposure of the token could allow unauthorized use of the external API and compromise all data accessible through that credential.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This endpoint also requires the API token in the URL query, creating the same credential leakage risk through logs, browser history, telemetry, and intermediary infrastructure. Because the skill interacts with a third-party API, leaked credentials may be abused outside the originating environment.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

Supplying the access token via query parameter on the comments endpoint risks credential disclosure in transit-adjacent systems even when HTTPS is used. A stolen token may permit unauthorized scraping or access to other Weibo-related data exposed by the provider.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The profile endpoint embeds the API token in the query string, which is an unsafe credential handling pattern. URL-based secrets are prone to accidental exposure via logs and monitoring, enabling unauthorized API access if intercepted or retained.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

Passing the token in the query for published-post retrieval exposes credentials to logging and telemetry systems and may let attackers reuse the token to enumerate additional user content. The data-collection nature of this skill increases the blast radius because one token may unlock broad scraping capability.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The same unsafe query-parameter token pattern appears on the video-list endpoint. Credential exposure here is particularly risky because the endpoint supports paginated content retrieval, increasing the value of a leaked token for mass collection.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

Using a query parameter for the access token on the post-details endpoint creates a direct secret-handling weakness. If the URL is logged or shared, unauthorized parties can reuse the token to access the third-party API.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The hot-search endpoint also transmits the API token in the query string, preserving the same credential leakage issue. Even if the endpoint itself is low sensitivity, the token may grant access to higher-value operations across the API.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

This keyword-search endpoint sends both sensitive search terms and the API token to an external service, with the token in the query string. The combination increases risk because leaked URLs may expose both credential material and potentially sensitive investigative intent.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The search-profile endpoint repeats the insecure query-based token handling pattern, which can disclose credentials and searched user interests together. Because this endpoint links user IDs and queries, misuse could aid targeted surveillance or profiling if the token is abused.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
98% confidence
Finding

The TV video details endpoint places the access token in the URL query, making it vulnerable to accidental disclosure through multiple infrastructure layers. A compromised token can be replayed against the third-party API for broader unauthorized access.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

The endpoint requires an API access token in the query string, which is a risky credential transport pattern because query parameters are commonly logged by clients, proxies, analytics layers, and server access logs. In this skill's context, repeated use across many endpoints broadens the chance of token leakage and unauthorized API use.

Content

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

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

Credential Access

High
Category
Privilege Escalation
Confidence
92% confidence
Finding

This endpoint also places the API access token in the query string, exposing it to logging, browser history, intermediary systems, and accidental sharing. Because the endpoint retrieves follower graph data, token compromise could enable continued access to sensitive social-network information through the provider.

Content

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

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

Static analysis

No suspicious patterns detected.