Back to skill

Security audit

IMDb Box Office Summary API

Security checks for vulnerabilities and agentic risk

Overview

This is a narrow IMDb box-office lookup skill, but it handles an API token in ways that can expose it through command lines and request URLs.

Review before installing if the JustOneAPI token has billing impact, broad account access, or long lifetime. Use a narrowly scoped token if available, rotate it if exposed, and be aware that this skill sends the token to JustOneAPI in the request URL and passes it through a command-line argument.

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:196
Finding
API Token Exposed Through Process Arguments and URL Query Parameters<![CDATA[ ## Vulnerability Details **File Location**: `bin/run.mjs:22-27, 91-109, 164-167, 196-206, 239-260`; documented usage at `SKILL.md:43-51` **Vulnerability Type**: Credential exposure through command-line arguments and URL query parameters **Risk Level**: Medium ### Vulnerable Code `SKILL.md:43-51`: ```markdown node {baseDir}/bin/run.mjs --operation "titleBoxOfficeSummary" --token "$JUST_ONE_API_TOKEN" --params-json '{"id":"<id>"}' ``` ```markdown - Required: `JUST_ONE_API_TOKEN` - Pass the token with `--token "$JUST_ONE_API_TOKEN"`; do not paste token values into chat messages, screenshots, or logs. ``` `bin/run.mjs:22-27` defines the credential as a query parameter: ```js { "defaultValue": null, "description": "User's authentication token.", "enumValues": [], "location": "query", "name": "token", "required": true, "schemaType": "string" }, ``` `bin/run.mjs:91-109` constructs the URL and sends it: ```js const baseUrl = manifest.baseUrl; 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, }; if (operation.requestBody && params.body !== undefined) { requestInit.body = JSON.stringify(params.body); requestInit.headers["content-type"] = operation.requestBody.contentType || "application/json"; } let response; try { response = await fetch(url, requestInit); } catch (error) { ``` `bin/run.mjs:164-167` accepts the secret through a command-line argument: ```js if (flag === "--token") { parsed.token = value; index += 1; continue; } ``` `bin/run.mjs:196-206` injects that secret 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) ...[truncated 3784 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Stop passing credentials through command-line arguments.** - Read the token directly from `process.env.JUST_ONE_API_TOKEN`. - If an explicit alternative is necessary, accept a protected file descriptor or restricted-permission credential file rather than a plaintext CLI value. - Remove `--token` from the documented command and argument parser. 2. **Use an authentication header instead of a query parameter.** - Prefer the service’s supported `Authorization` header, such as: ```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}`, }, }; ``` - Remove `token` from the operation’s query-parameter definitions so that generic query construction cannot append it to the URL. 3. **Coordinate an API contract change if query authentication is currently mandatory.** - Add header-based authentication on the JustOneAPI backend. - Until that change is available, explicitly document the residual exposure and configure gateways, servers, proxies, and observability systems to redact the `token` query parameter. 4. **Implement defense-in-depth redaction.** - Never include complete request URLs, authentication headers, or token values in error messages. - Redact keys named `token`, `authorization`, `apiKey`, or similar before emitting diagnostics. - Ensure tracing and HTTP instrumentation do not capture sensitive query values. 5. **Rotate potentially exposed credentials.** - Revoke and replace tokens that may already have appeared in process telemetry or URL logs. - Apply the narrowest available API scope, rate limits, expiration period, and usage alerts to reduce the impact of future disclosure. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Lp3

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding
Without declared permissions the skill's intent is opaque and cannot be validated.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The skill requires the authentication token to be sent as a query parameter and automatically injects it into the request URL. Query-string credentials are commonly exposed through logs, browser/history equivalents, proxy infrastructure, monitoring tools, and error telemetry, making accidental credential disclosure more likely even when HTTPS is used.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
Passing an authentication token in a query parameter is risky because query strings are commonly logged by clients, proxies, gateways, browser history, and server access logs. Even over HTTPS, the token may be exposed through operational logging or monitoring systems, enabling credential leakage to external parties or internal observers.

Vague Triggers

Low
Confidence
85% confidence
Finding
This JSON manifest describes the skill in generic terms ('Call GET ... with id.' / 'IMDb Box Office Summary') but does not specify how or when the skill should be invoked, nor any limits to prevent unintended matching against broad movie-information requests. For manifest files, missing specificity around trigger scope can lead to ambiguous activation behavior.

Static analysis

No suspicious patterns detected.