Back to skill

Security audit

Amazon Refund & Price Tracker Agent

Security checks for vulnerabilities and agentic risk

Overview

This Amazon shopping helper asks for browser-wide automation authority and handles API keys and screenshots more broadly than its stated Amazon-focused purpose justifies.

Install only if you are comfortable giving this extension broad browser access. Use it only on intended Amazon pages, review every tool confirmation carefully, avoid enabling auto-send unless you intend to submit the message, and do not enter a valuable API key unless the endpoint is trusted and you can rotate or limit that key. Clear stored extension data if screenshots or order details should not be retained.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
manifest.json:6
Finding
Excessive Cross-Site Permissions Enable Automation on Unrelated Websites<![CDATA[ ## Vulnerability Details **File Location**: `manifest.json:6-7`; `background/sw.js:3-17`, `background/sw.js:384-465` **Vulnerability Type**: Excessive browser privileges and missing origin enforcement **Risk Level**: Medium ### Vulnerable Code ```json "permissions": ["tabs", "scripting", "storage", "downloads", "sidePanel", "activeTab"], "host_permissions": ["<all_urls>", "https://api.openai.com/*"], ``` The service worker uses these permissions to inject the automation content script into a selected tab: ```js async function ensureContentScript(tabId) { const pingResult = await pingContentScript(tabId); if (pingResult.ok) { return { ok: true }; } try { await chrome.scripting.executeScript({ target: { tabId }, files: ["content/index.js"] }); } catch (error) { return { ok: false, error: "cs_inject_failed" }; } const pingAfter = await pingContentScript(tabId); if (!pingAfter.ok) { return { ok: false, error: "cs_unavailable" }; } return { ok: true }; } ``` Non-navigation tools are dispatched to the injected content script without validating that the target tab belongs to a supported Amazon origin: ```js const csReady = await ensureContentScript(tabId); if (!csReady.ok) { return { ok: false, tool: toolCall.tool, tabId, error: csReady.error || "cs_unavailable" }; } const resultMessage = await chrome.tabs.sendMessage(tabId, { type: "tool.call", callId: context.callId, toolCall }); ``` ### Technical Analysis The extension is presented as an Amazon-oriented shopping and after-sales agent, but its `host_permissions` grant access to all URLs. Combined with `tabs` and `scripting`, the service worker can inject `content/index.js` into unrelated supported web origins. The injected content script exposes operations that can: - Read page text and DOM content. - Extract attributes and structured data. - Fill input fields. - Click buttons and links. - Send form or messaging conten ...[truncated 2214 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `<all_urls>` with explicit supported Amazon host patterns, such as the exact marketplaces required by the product. 2. Move exceptional domain access to `optional_host_permissions` and request it only in response to an explicit user action. 3. Before every injection and tool execution: - Retrieve the target tab with `chrome.tabs.get()`. - Parse its URL. - Require HTTPS. - Compare the hostname against a strict allowlist. - Reject unsupported schemes, origins, and subdomain lookalikes. 4. Apply the same allowlist to `browser.navigate`; do not accept arbitrary URLs from an LLM-generated plan. 5. Bind each run to its initially approved origin and stop the run if the tab navigates to another origin. 6. Display the target hostname, action type, selector, and relevant content in the confirmation interface. 7. Require stronger confirmation for state-changing actions such as clicking submit controls or automatically sending messages. 8. Remove unused permissions, particularly `downloads`, unless a documented feature requires them. 9. Consider statically registering content scripts only on supported Amazon origins instead of dynamically injecting them into arbitrary active tabs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
panel/panel.js:115
Finding
Plaintext API Key Can Be Forwarded to an Unrestricted User-Configured Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `panel/panel.js:115-128`; `background/sw.js:133-160`; `manifest.json:7` **Vulnerability Type**: Insecure credential storage and unrestricted credential destination **Risk Level**: Medium ### Vulnerable Code The API endpoint and API key are accepted directly from panel inputs and persisted together in extension-local storage: ```js async function loadConfig() { const result = await chrome.storage.local.get("agent_config"); const config = result.agent_config || {}; cfgEndpoint.value = config.endpoint || "https://api.openai.com/v1/chat/completions"; cfgModel.value = config.model || "gpt-4o-mini"; cfgApiKey.value = config.apiKey || ""; } async function saveConfig() { const config = { endpoint: cfgEndpoint.value.trim(), model: cfgModel.value.trim(), apiKey: cfgApiKey.value.trim() }; await chrome.storage.local.set({ agent_config: config }); appendTrace({ type: "config.saved", config: { ...config, apiKey: config.apiKey ? "***" : "" } }); } ``` The service worker retrieves this configuration and sends the key as a bearer credential to the configured endpoint without validating its scheme or origin: ```js async function getAgentConfig() { const result = await chrome.storage.local.get("agent_config"); return result.agent_config || null; } async function planWithLLM(input, config, skills) { const skillsBlock = formatSkillsForPrompt(skills); const systemPrompt = `You are a browser agent planner. Return ONLY a JSON array of tool calls. Each tool call must be { tool: string, args: object }. Allowed tools: browser.query, browser.get_dom, browser.navigate, browser.click, browser.type, browser.scroll, browser.wait, browser.extract, browser.screenshot. You may also call a skill using tool name 'skill.<skill_name>'. Do not include target; it will be injected. For browser.extract you MUST use schema: { rootSelector: string, list?: boolean, fields: { [key]: { selector: string, attr?: ...[truncated 3149 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Define a strict allowlist of supported API origins and exact endpoint paths. 2. Require HTTPS and reject: - Plain HTTP endpoints. - IP-literal destinations unless explicitly required. - Embedded credentials in URLs. - Redirects to unapproved origins. - Lookalike or suffix-matching domains. 3. Bind each credential to a specific provider origin and never send a provider credential to a different origin. 4. Validate the final response URL after redirects, or disable redirects and handle approved redirects explicitly. 5. Prefer OAuth, short-lived access tokens, or a narrowly scoped backend token exchange over storing a long-lived provider key. 6. Where feasible, retain credentials only in `chrome.storage.session` and require re-entry after the browser session ends. 7. Provide explicit controls to remove and rotate saved credentials. 8. Display the exact destination origin before saving the configuration and before the first credentialed request. 9. Reduce host permissions to the approved API origins so the browser also enforces the network destination boundary. 10. Document that users must not reuse credentials across providers and should configure provider-side spending limits and key scopes. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (19)

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The planner sends the user's free-form goal plus installed skill metadata to a remote endpoint configured in agent_config using a bearer API key. This can expose sensitive user intent, workflow details, and local extension capabilities to an external service without any visible notice, data minimization, or domain restrictions in this file.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The code captures the visible browser tab with chrome.tabs.captureVisibleTab and persists the resulting image into IndexedDB as an artifact after only a generic per-tool confirmation flow. There is no point-of-execution disclosure that a full-page/tab screenshot may include unrelated sensitive content visible in the tab, and the artifact is retained locally for later access, increasing privacy and data-handling risk.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The content script exposes a broad set of browser automation primitives over runtime messages, including DOM extraction, clicking, typing, scrolling, and execution of predefined flows. In an unknown-purpose skill, this creates a powerful remote-control surface that can be used to navigate sites, interact with forms, and harvest page content far beyond a narrowly scoped task, increasing the risk of unauthorized actions or data access.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The browser.type_message handler can populate visible chat/text inputs and, when autoSend is enabled, automatically locate and click a send button without any user-facing warning, review, or confirmation. This enables silent outbound messaging from arbitrary web pages, which could be abused for spam, impersonation, social engineering, or leaking sensitive information typed or assembled by the agent.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This HTML code file presents an API key input and save action, which is a sensitive-credential operation under the warning criteria. There is no visible disclosure, helper text, or warning near the field explaining storage or transmission of the key, so users are not informed about a safety-relevant action.

External Transmission

Medium
Category
Data Exfiltration
Content
async function loadConfig() {
    const result = await chrome.storage.local.get("agent_config");
    const config = result.agent_config || {};
    cfgEndpoint.value = config.endpoint || "https://api.openai.com/v1/chat/completions";
    cfgModel.value = config.model || "gpt-4o-mini";
    cfgApiKey.value = config.apiKey || "";
  }
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
async function loadConfig() {
    const result = await chrome.storage.local.get("agent_config");
    const config = result.agent_config || {};
    cfgEndpoint.value = config.endpoint || "https://api.openai.com/v1/chat/completions";
    cfgModel.value = config.model || "gpt-4o-mini";
    cfgApiKey.value = config.apiKey || "";
  }
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
async function loadConfig() {
    const result = await chrome.storage.local.get("agent_config");
    const config = result.agent_config || {};
    cfgEndpoint.value = config.endpoint || "https://api.openai.com/v1/chat/completions";
    cfgModel.value = config.model || "gpt-4o-mini";
    cfgApiKey.value = config.apiKey || "";
  }
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The panel stores a raw API key in chrome.storage.local and later reloads it into the UI. Extension local storage is accessible to the extension context and can be exposed by other extension bugs, debugging access, or compromised extension components, so persisting long-lived secrets there without warning or stronger protection increases credential theft risk.

Vague Triggers

Medium
Confidence
91% confidence
Finding
This is a manifest file, so vague-trigger checks apply. The description says the skill 'opens order detail page, navigates Amazon contact flow, and types a message for after-sales requests' but does not define specific trigger phrases, scope limits, or exclusion conditions, making invocation conditions ambiguous for matching systems.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
This skill is designed to extract Amazon order information, which can include sensitive purchase history and potentially identifying details. The description and notes do not warn users that running the skill may access and expose private order data, increasing the risk of inadvertent collection or disclosure in contexts where users may not expect sensitive scraping.

Vague Triggers

Medium
Confidence
89% confidence
Finding
This is a manifest file, so vague-trigger review applies. The description states only that the skill 'Scrapes reviews from Amazon review pages with pagination' and does not define specific invocation phrases, constraints, or exclusion conditions, making the activation scope ambiguous and potentially broader than intended.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill explicitly exports screenshots and DOM snapshots, both of which can contain sensitive information such as PII, authentication state, page content, hidden fields, or internal application data. The manifest provides no user-facing warning, scoping, consent, or minimization controls, which increases the risk of unintentionally capturing and exporting sensitive data during evidence collection.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The skill is framed broadly as collecting screenshots and DOM snippets as evidence, but it does not define clear invocation boundaries, user consent requirements, or page-scope restrictions. In an agent setting, this can lead to over-collection from arbitrary pages, including sensitive account, payment, or personal data views, especially when paired with selectors supplied at runtime.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The manifest explicitly enables screenshot and DOM capture, both of which may contain privacy-sensitive or security-sensitive data, yet it provides no warning, consent model, or redaction guidance. Because screenshots and DOM snippets can expose tokens, personal information, hidden fields, or page state, this creates a meaningful risk of unintended data exfiltration or retention.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The HTML sets lang="en", which establishes English as the interface language. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative or choice is presented.

Natural-Language Policy Violations

Low
Confidence
76% confidence
Finding
The natural-language examples and outputs consistently use amazon.com URLs, which suggests the skill is tied to a specific marketplace/locale. There is no accompanying note that this US-domain behavior is optional, user-selected, or intentionally region-specific for compliance reasons.

Vague Triggers

Low
Confidence
84% confidence
Finding
This is a JSON manifest file, so vague-trigger checks apply. The description states the skill 'Extracts ASIN, title, price, image, rating, review count from Amazon product pages' but does not define explicit invocation phrases, scope constraints, or exclusion conditions, which can make activation criteria ambiguous for any Amazon page-related request.

Vague Triggers

Low
Confidence
90% confidence
Finding
The skill description and notes are too vague about when the skill should activate and what exact scope of actions it is allowed to perform. Ambiguous triggering and scope can cause an agent to invoke the skill in unintended contexts, potentially creating or polling alerts for the wrong product or using untrusted price inputs without sufficient user intent validation.

Static analysis

No suspicious patterns detected.