Back to skill

Security audit

Twitter API

Security checks for vulnerabilities and agentic risk

Overview

This skill is a bounded JustOneAPI wrapper for two Twitter/X read-only lookup operations, but users should treat its API token handling carefully.

Install only if you are comfortable sending Twitter/X lookup parameters and your JustOneAPI token to api.justoneapi.com. Keep the token private, avoid logging commands that include it, and rotate the token if it may have appeared in shell history, process monitoring, 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:249
Finding
API Token Exposed Through Process Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:34-36`; `bin/run.mjs:111-120`; `bin/run.mjs:249-257` **Vulnerability Type**: Credential exposure through command-line arguments and URL query parameters **Risk Level**: Medium ### Vulnerable Code The documented invocation expands the API token directly into the process command line: ```bash node {baseDir}/bin/run.mjs --operation "<operation-id>" --token "$JUST_ONE_API_TOKEN" --params-json '{"key":"value"}' ``` The executable injects that token 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; } ``` All parameters declared as query parameters, including `token`, are then 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 resulting request is sent using the URL containing the credential: ```js const url = new URL(operation.path, ensureBaseUrl(baseUrl)); applyPathParams(operation, params, url); applyQueryParams(operation, params, url); const requestInit = { headers: { "accept": "application/json", }, method: operation.method, }; response = await fetch(url, requestInit); ``` ### Technical Analysis The API token is exposed at two separate layers: 1. The shell expands `$JUST_ONE_API_TOKEN` into the Node.js process argument list. Depending on operating-system permissions and process isolation, other local users, process-monitoring agents, diagnosti ...[truncated 2221 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Read the token directly from the environment** - Replace the `--token` argument with `process.env.JUST_ONE_API_TOKEN`. - Remove or reject token values supplied through `--params-json` so callers cannot accidentally place credentials in ordinary request parameters. 2. **Use an authentication header** - If supported by JustOneAPI, transmit the credential using an authorization header, for example: ```js const token = process.env.JUST_ONE_API_TOKEN; if (!token) { fail("JUST_ONE_API_TOKEN is required."); } const requestInit = { method: operation.method, headers: { accept: "application/json", authorization: `Bearer ${token}`, }, }; ``` 3. **Remove the token from query-parameter definitions** - Treat authentication separately from operation-specific parameters. - Ensure `applyQueryParams` cannot append `token`, `apiKey`, or other credential fields to URLs. 4. **Update the documentation** - Replace the current command with: ```bash JUST_ONE_API_TOKEN="..." node {baseDir}/bin/run.mjs \ --operation "<operation-id>" \ --params-json '{"key":"value"}' ``` - Prefer setting the environment variable through a protected secret manager rather than inline shell assignment where shell history or job configuration could retain it. 5. **Apply defense-in-depth controls** - Redact credential-like fields from errors, traces, and logs. - Use short-lived, revocable, and narrowly scoped tokens. - Rotate the existing token if it may already have appeared in process telemetry or URL logs. - Configure API gateways and observability systems to suppress or redact sensitive query parameters if query-based authentication cannot be immediately removed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (7)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- Get a token from [Just One API Dashboard](https://dashboard.justoneapi.com/en/login?utm_source=clawhub.ai&utm_medium=referral&utm_campaign=justoneapi_twitter&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_twitter&utm_content=project_link).

## Output Rules

- Start with a plain-language answer tied to the Twitter task the user asked for.
- Include the most decision-relevant fields from the selected endpoint before dumping raw JSON.
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill invokes a Node helper that performs authenticated external API requests, but the manifest does not declare an explicit tool scope such as allowed-tools or permissions. This weakens policy enforcement and reviewability because the skill's network capability is implicit rather than constrained, increasing the chance of overbroad execution in environments that rely on manifest-declared permissions.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill sends the authentication token as a URL query parameter, which is routinely exposed in logs, browser histories, proxy caches, monitoring systems, and upstream infrastructure. Even though the transport uses HTTPS, placing secrets in the URL materially increases credential leakage risk compared with sending them in an Authorization header or request header.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The documentation instructs users to supply an authentication token in a query parameter but provides no warning about credential sensitivity, storage, logging, or exposure risks. Query parameters are commonly captured in logs, browser history, proxies, and analytics systems, so encouraging token transmission this way without safety guidance increases the chance of credential leakage and unauthorized API use.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The skill performs an HTTP request to an external service with profile/post identifiers and an authentication token, but there is no user-facing disclosure such as a prompt, log message, or explanatory comment about this data transmission. For a code file, network transmission of user or system data should have some visible warning unless clearly disclosed elsewhere in the skill description, which is not present here.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
This manifest uses 'Twitter' as the display name and tags while also describing the target as an 'X user'. Under the natural-language policy check, this can be interpreted as forcing a particular platform naming/locale convention rather than offering neutral or user-aligned wording.

Missing User Warnings

Low
Confidence
78% confidence
Finding
The skill describes collecting user profile metadata, audience metrics, and verification-related fields without any privacy notice, lawful-use guidance, or disclosure about handling third-party personal data. In a social-media analysis context this is not inherently malicious, but omission of privacy safeguards can enable overcollection, misuse, or noncompliant downstream processing of personal information.

Static analysis

No suspicious patterns detected.