Back to skill

Security audit

Amazon API

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to perform the advertised Amazon API lookups, but its documented helper can expose the JustOneAPI token through command-line arguments and request URLs.

Review before installing if your JustOneAPI token has spending, quota, or account impact. Prefer running it only in trusted environments, avoid logging full commands or URLs, and rotate the token if it may have appeared in logs or process 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:346
Finding
API Credential Exposed Through URL Query String and Command-Line Arguments<![CDATA[ ## Vulnerability Details **File Location**: `bin/run.mjs:346-368`, `bin/run.mjs:455-465`, and `bin/run.mjs:498-519` **Vulnerability Type**: Sensitive credential exposure **Risk Level**: Medium ### Vulnerable Code ```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); 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); ``` ```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; } ``` ```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); } } function appendValue(searchParams, name, value) { if (Array.isArray(value)) { for (const item of value) { appendValue(searchParams, name, item); } return; } if (value && typeof value === "object") { searchParams.append(name, JSON.stringify(value)); return; } searchParams.append(name, String(value)); } ``` ### Tec ...[truncated 2308 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Move authentication out of the URL.** Prefer an `Authorization` header or another dedicated authentication header supported by JustOneAPI, for example: ```js const requestInit = { method: operation.method, headers: { accept: "application/json", authorization: `Bearer ${token}`, }, }; ``` Do not add the token to `params` or `URLSearchParams` when header-based authentication is available. 2. **Read the credential directly from the environment.** Use `process.env.JUST_ONE_API_TOKEN` instead of requiring `--token`, thereby reducing exposure through process listings and shell history. If a CLI option must remain for compatibility, prefer the environment variable and clearly warn about the CLI exposure. 3. **Prevent user-supplied token duplication.** Reject or remove `token` from `--params-json` so callers cannot accidentally bypass safer credential handling and place a token back into the query string. 4. **Redact credentials from observability systems.** Configure application logs, reverse proxies, API gateways, monitoring tools, and error-reporting systems to remove the `token` query parameter. Never log complete authenticated URLs. 5. **Apply token-side controls.** Use narrowly scoped credentials where supported, enforce rate and spending limits, rotate exposed tokens, and monitor for anomalous usage. 6. **If the upstream API mandates query authentication**, document the residual risk, avoid command-line credential input, enforce URL-query redaction throughout the request path, and recommend regular token rotation. ]]>
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
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_amazon&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_amazon&utm_content=project_link).

## Output Rules

- Start with a plain-language answer tied to the Amazon 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
93% 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 network access or permissions. This weakens policy enforcement and reviewability because the skill's effective capabilities are broader than what its top-level declaration communicates, increasing the chance of unintended network use or over-privileged execution.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill accepts the API token via a CLI argument and then injects it into a query parameter, causing the secret to appear in the full request URL. Secrets in command-line arguments can be exposed through shell history and process listings, and secrets in URLs are commonly captured by logs, proxies, monitoring tools, and error telemetry, increasing the chance of credential leakage.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The API documentation requires an authentication `token` in the query string, which is commonly logged by browsers, proxies, server access logs, analytics tools, and referrer headers. Exposing credentials this way increases the chance of token leakage and unauthorized API use, especially in an integration skill where users may copy, paste, or troubleshoot requests through multiple systems.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The manifest says the skill supports product details, product top reviews, and best sellers across 4 operations, but this file defines a fourth operation, `getProductsByCategoryV1`, that is not mentioned in the manifest description. That creates a semantic mismatch between the advertised scope and the implemented API surface.

Description-Behavior Mismatch

Low
Confidence
97% confidence
Finding
The manifest description says the skill covers product Details, product Top Reviews, and best Sellers across 4 operations, but the listed operations also include `getProductsByCategoryV1`. That means the code exposes an additional Amazon category-product retrieval capability not disclosed in the top-level description.

Description-Behavior Mismatch

Low
Confidence
98% confidence
Finding
The manifest description at L003 limits the advertised scope to product Details, product Top Reviews, and best Sellers across 4 operations. However, the operations list also includes 'Products By Category' at L088-L170, which is a distinct capability not mentioned in the description.

Static analysis

No suspicious patterns detected.