Back to skill

Security audit

browser-automation-skills

Security checks for vulnerabilities and agentic risk

Overview

This browser automation skill is coherent, but it gives an agent broad control over a user's existing logged-in Chrome session without enough scoping or consent guardrails.

Install only if you are comfortable letting an agent control a real Chrome session. Use a separate Chrome profile or disposable browser instance, keep remote debugging bound to localhost, avoid sensitive logged-in tabs, and require explicit confirmation before login, form submission, scraping, recording, or input locking.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/browser.py:75
Finding
Unrestricted Automation of the User's Existing Authenticated Browser Context## Vulnerability Details **File Location**: `scripts/browser.py:75-105` **Vulnerability Type**: Missing browser-session isolation and insufficient authorization boundaries **Risk Level**: High ### Vulnerable Code ```python CDP_ENDPOINT = os.environ.get("BROWSER_CDP_ENDPOINT", "http://localhost:9222") async def get_browser(): """Connect to existing Chrome via CDP. Never launches a new browser.""" p = await async_playwright().start() try: browser = await p.chromium.connect_over_cdp(CDP_ENDPOINT) except Exception as e: print(f"ERROR: Cannot connect to Chrome at {CDP_ENDPOINT}") print(f" {e}") print() print("Make sure Chrome is running with remote debugging:") print(f' chrome.exe --remote-debugging-port=9222') print() print(f"ERROR: 无法连接到 Chrome ({CDP_ENDPOINT})") print("请确保 Chrome 已启用远程调试:") print(f' chrome.exe --remote-debugging-port=9222') sys.exit(1) return p, browser async def get_page(browser): """Get the active page or create one.""" contexts = browser.contexts if not contexts: context = await browser.new_context() else: context = contexts[0] pages = context.pages if not pages: page = await context.new_page() else: page = pages[-1] return page ``` Supporting instructions explicitly tell users that the automation connects to their existing Chrome instance: ```markdown Both connect to your **existing Chrome** via CDP — no new browser instance, no "controlled by automated software" banner. ``` The interaction skill also permits credential entry and immediate form submission: ```markdown ### Login Flow 1. Navigate to login page 2. Find username field → click → type username 3. Find password field → click → type password 4. Click login button 5. Screenshot to verify success ``` # ...[truncated 2644 chars]
Remediation
## Remediation Suggestions 1. Launch automation with a dedicated temporary browser profile rather than attaching to the user's everyday profile. 2. If attachment to an existing browser is necessary, require explicit confirmation before accessing an existing context or tab. 3. Select tabs using an explicit page identifier and expected origin instead of automatically choosing `pages[-1]`. 4. Implement an origin allowlist derived from the user's requested URL and reject navigation or interaction outside that scope. 5. Require confirmation immediately before consequential operations, including login submission, purchases, messages, uploads, account changes, and deletion. 6. Validate the CDP endpoint and default to loopback-only addresses. Require an explicit opt-in and authenticated transport for remote endpoints. 7. Document that CDP grants control with the privileges of all attached authenticated browser sessions. 8. Prefer a separate Chrome invocation using a temporary `--user-data-dir` and remove the profile after the session ends.

T08 · Insecure Dependencies

Warning
Location
README.md:39
Finding
Unpinned Playwright Dependency Creates a Mutable Supply-Chain Boundary## Vulnerability Details **File Location**: `README.md:39-50` **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```markdown ### Prerequisites - **Google Chrome** installed locally - For Antigravity: nothing extra (built-in) - For other platforms: `pip install playwright` (no `playwright install` needed — we use your existing Chrome) ### Quick Start ```bash # 1. Start Chrome with remote debugging chrome.exe --remote-debugging-port=9222 # 2. Install dependency pip install playwright ``` ``` The same mutable installation command is repeated in `SKILL.md:33` and `scripts/browser.py:26,67-71`. ### Technical Analysis The installation instructions request the latest version of `playwright` resolved by the active Python package index. No reviewed version, lock file, integrity hash, or package-index constraint is supplied. This makes the installed component mutable after the skill has been audited. A future compromised release, compromised package-index account, altered package source, or incompatible update could introduce code that was not present during review. Python package installation may execute package build or installation logic, while imported runtime code executes with the privileges of the user running the browser adapter. No evidence was found that the project intentionally references a typosquatted or currently malicious package. The issue is the lack of version and integrity controls, not a confirmed compromise of Playwright. ### Attack Path 1. A user follows the documented setup procedure. 2. `pip install playwright` queries the user's configured Python package index. 3. The resolver selects the latest available package and dependencies rather than an audited version. 4. If the selected artifact or package-index configuration has been compromised, attacker-controlled installation or runtime code is placed in the environment. ...[truncated 660 chars]
Remediation
## Remediation Suggestions 1. Pin Playwright to a specifically reviewed version, for example through an exact requirement rather than an unconstrained package name. 2. Provide a lock file that includes all transitive dependencies. 3. Use hash verification, such as pip's `--require-hashes`, for reproducible installation. 4. Document the expected trusted package index and avoid silently inheriting untrusted index or extra-index configuration. 5. Add automated dependency scanning and a controlled update process. 6. Test dependency upgrades before changing the pinned version. 7. Keep installation instructions in one canonical location to avoid inconsistent security guidance.

T09 · Insecure Skill Coding Practices

Warning
Location
skills/browser-context/SKILL.md:60
Finding
Automatic Browser Input Locking Lacks Consent and Guaranteed Cleanup## Vulnerability Details **File Location**: `skills/browser-context/SKILL.md:60-66` **Vulnerability Type**: Unsafe user-input blocking and incomplete failure cleanup **Risk Level**: Medium ### Vulnerable Code ```markdown ## Key Rules - Use **pixel coordinates** for clicking (from DOM data), not CSS selectors - Always **verify via screenshot** after actions - For Antigravity: pass `ReusedSubagentId` to continue multi-step flows - For CLI: the browser session persists automatically between calls - For CLI: use `browser.py lock` before interactive sequences to **prevent user interference**, and `browser.py unlock` after ``` The corresponding lock and unlock commands are implemented independently: ```python async def cmd_lock(args): p, browser = await get_browser() page = await get_page(browser) await set_input_lock(page, True) print(json.dumps({"status": "ok", "input": "locked", "note": "Overlay active — user input blocked / 覆盖层已激活,用户输入已锁定"})) async def cmd_unlock(args): p, browser = await get_browser() page = await get_page(browser) await set_input_lock(page, False) print(json.dumps({"status": "ok", "input": "unlocked", "note": "User input restored / 用户输入已恢复"})) ``` ### Technical Analysis The shared skill instructions direct agents to lock browser-page input before interactive sequences, rather than making locking an exceptional, explicitly authorized operation. The implementation injects a full-screen, high-z-index overlay into the active page to intercept interaction. Locking and unlocking are separate process invocations. No `try/finally` block, timeout, session watchdog, or automatic rollback guarantees that `unlock` runs after an error. If an intermediate browser operation fails, the agent process terminates, or the workflow is interrupted, the overlay can remain in the page. A visible Stop button can remove the overlay, and page refres ...[truncated 1216 chars]
Remediation
## Remediation Suggestions 1. Remove automatic locking from the shared rules and make it an explicit user-approved option. 2. Default to non-blocking visual status indicators that do not intercept user input. 3. Wrap each locked interaction sequence in `try/finally` logic that always removes the overlay. 4. Add a short maximum lock duration and automatically unlock when it expires. 5. Associate the overlay with a unique session identifier so an unrelated process cannot accidentally preserve or remove another session's state. 6. Ensure disconnect and exception handlers attempt cleanup before exiting. 7. Keep the visible Stop control and document refresh or navigation as manual recovery procedures. 8. Do not lock pages containing emergency, financial, authentication, or other high-impact workflows unless the user explicitly requests exclusive automation.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (20)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README explicitly promotes controlling an existing local Chrome session for navigation, scraping, debugging, and recording, but does not warn that this may expose authenticated tabs, cookies, browsing history, page contents, internal apps, or sensitive user data already present in that browser profile. Because it attaches to the user's live Chrome via CDP rather than an isolated browser instance, the omission can cause users or downstream agents to perform high-risk actions without understanding the privacy and security implications.

Lp3

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding
The skill advertises browser control that inherently involves network access and interaction with the local environment, yet it declares no explicit tool scope or permissions boundary. This can cause an agent or user to invoke the skill without clear visibility into what capabilities it may use, increasing the risk of unintended browsing, data access, or misuse of local browser state.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill includes a lock feature that applies a visual overlay and blocks user input, but the user-facing description does not prominently warn about this disruptive behavior. Without a clear warning, a user may authorize or trigger the skill without realizing it can temporarily seize browser interaction, which can interfere with user control and create opportunities for deceptive or unsafe automation.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation explicitly exposes browser data-collection features such as full DOM extraction, page content reading, network request listing, and console log capture, but provides no privacy, consent, or sensitive-data handling guidance. In a browser automation skill controlling a local Chrome instance, these capabilities can collect credentials, tokens, personal data, internal URLs, and session information from arbitrary pages, increasing the risk of over-collection or misuse.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
After every subagent call:
1. Look for screenshot file paths in the response
2. Use `view_file` on the screenshot to verify what actually happened
3. **Never trust subagent claims without verification**

### Error Handling
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The skill description is broadly phrased around common debugging and troubleshooting tasks, which increases the chance that it will be invoked for routine web issues without the user realizing it can inspect page contents, console output, and network traffic. In a browser automation skill with local Chrome access, overly broad triggering can lead to unnecessary exposure of sensitive data from authenticated sessions or internal applications.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill documents workflows that collect screenshots, network requests, console logs, and DOM data, but it does not warn users that these actions may capture sensitive information such as tokens, personal data, internal URLs, or page contents. Because this skill controls a local browser session, the debugging context makes the omission more dangerous: collected artifacts may reflect privileged, logged-in state and expose secrets far beyond what a user expects from a generic 'debug' action.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill description uses very broad activation phrases such as logging in, filling forms, clicking buttons, and performing 'any interactive web action,' which can cause the agent to invoke this skill for many routine browsing requests without sufficient user confirmation. In a browser-control skill, overbroad triggering increases the chance of unintended high-impact actions like submitting forms, changing account settings, or interacting with sensitive pages.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The skill explicitly describes login and form-submission flows, including typing usernames and passwords and clicking submit, but does not warn about handling credentials, secrets, PII, or the risks of submitting data to third-party sites. In the context of a local Chrome automation skill, this omission is dangerous because it can normalize automated entry of sensitive information and enable accidental disclosure, credential misuse, or unintended submission of private data.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill description includes very broad trigger phrases such as 'open', 'go to', 'visit', 'browse', and 'load page', plus any provided URL, which overlap heavily with normal user language. This can cause the skill to activate in situations where the user did not explicitly intend browser automation, increasing the chance of unintended navigation to untrusted content or unnecessary tool use.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
This skill instructs the agent to record browser interactions and capture screenshots, but it does not clearly warn the user that on-screen content, account data, personal information, or other sensitive material may be stored in video and image files. In a browser automation context, this omission is dangerous because routine actions may traverse authenticated pages, expose tokens, messages, or customer data, and create durable artifacts without explicit informed consent.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The skill description includes very broad trigger phrases such as general requests to read web content, extract information, or collect data, which can cause the agent to invoke this capability in situations beyond narrowly intended scraping tasks. In an automation skill that can read DOM/text and save extracted data, overbroad invocation increases the chance of unintended website scraping, collection of sensitive page content, or use on pages where the user did not explicitly request extraction behavior.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The skill description includes very broad trigger phrases such as screenshot, preview, and check appearance, which can match many ordinary browsing requests and cause the agent to invoke browser automation more often than necessary. In a browser-control skill, overbroad activation increases the chance of unexpected navigation or capture of sensitive on-screen content, especially because screenshots may expose private data from authenticated sessions.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The module docstring and user-facing CLI/help text consistently mix English and Chinese, which imposes a specific locale presentation rather than letting the user choose their preferred language. The policy allows locale constraints when they are opt-in or clearly justified, but this file does not provide such a choice or justification.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The description includes both English and Chinese text but does not state whether language selection is user-driven or optional. Under the policy rule, forcing or assuming a locale without explicit opt-in can be a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The description includes both English and Chinese text, which introduces an implicit language choice without explaining whether multilingual output is optional or user-driven. The policy requires avoiding forced language or locale behavior unless the skill offers choice or documents a justified locale constraint.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The description mixes English trigger text with Chinese trigger phrases, implying the skill is activated by a specific additional language set without documenting user opt-in or locale scope. This can be a language-policy concern because the file hard-codes supported language behavior rather than explicitly offering a user language choice or documenting a justified regional constraint.

Natural-Language Policy Violations

Low
Confidence
78% confidence
Finding
The description mixes English and Chinese trigger language directly in the activation text without indicating that language choice is optional or user-selected. This can violate language/locale policy expectations when a skill implicitly imposes locale-specific behavior instead of offering explicit language choice.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The guidance recommends saving large scraped datasets to files but does not instruct the agent to notify the user or confirm that persistence is desired. Because scraped content may include sensitive, copyrighted, or session-derived data from authenticated pages, silent file creation can create unnecessary retention and privacy risks on the local system.

Missing User Warnings

Low
Confidence
90% confidence
Finding
The skill documents navigation and screenshot capture behavior without warning that using it may load external pages, alter page state, or capture sensitive information visible in the browser. In this context, the omission matters because the skill controls a real local Chrome session, so screenshots and page loads can affect privacy and interact with authenticated content.

Static analysis

No suspicious patterns detected.