Repository navigation
Conversation
Every agent run used to launch its own private headless Chromium through playwright-mcp. Nobody could see it, so a CAPTCHA, an email/SMS code, a 2FA prompt or a login stopped the run. ARTEX now runs one persistent Chromium and points every browser MCP at it over CDP (--cdp-endpoint). Function -> Browser shows the agent's tab live (CDP screencast over SSE). Take over lets the operator solve the check or sign in; Hand back returns control, and the agent continues in the same tab with the same cookies. - Operator control: agent browser tools are refused with a wait message. - Human checks (reCAPTCHA, hCaptcha, Turnstile, Arkose, DataDome, GeeTest, PerimeterX, Google's unusual-traffic page, short "verify you are human" pages) block acting tools and tell the model to call ask_operator; reading tools stay available and asking releases the block. - One agent run drives the browser at a time (90 s idle lease; a run that asked the operator keeps it for up to 15 minutes while paused). - Persistent profile in <data>/browser-profile; no --enable-automation, AutomationControlled off, HeadlessChrome removed from the user agent. - Chromium runs as the executor identity, so its DevTools port gives agent processes no more than their own rights. - -shared-browser=false / ARTEX_SHARED_BROWSER=false restores the old behavior; if Chromium cannot start, agents fall back to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BaaRai
requested changes
Nov 28, 2026
BaaRai
left a comment
Owner
There was a problem hiding this comment.
Useful direction, but the current design is not safe to enable by default:
- The shared Chromium runs as the executor uid with
--remote-debugging-port=0; a Bash tool from any task can read the port and drive CDP, bypassing the lock and the operator hand-back, and read cookies. Isolate or authenticate CDP per session/task, and make the feature opt-in. - The profile is shared across tasks and chats under
data/, where the web file manager can browse it. Use an isolated profile per task or session. --ignore-certificate-errorsis enabled whenever capture is on; that disables certificate validation.--disable-blink-features=AutomationControlledand the HeadlessChrome rewrite are anti-bot evasion; remove them or gate them behind an explicit policy note.- The ask_operator lock is 15 minutes and blocks the browser for all other tasks; make the timeout configurable and release it on hand-back or cancel.
Please rebase after the fixes; the tests should cover the CDP denial from an agent Bash and the lock release.
nohanbluu
pushed a commit
to nohanbluu/ARTEX
that referenced
this pull request
Nov 28, 2026
…rofiles, and configurable lock (BaaRai#621) Rebased onto main (5f5ec32) and hardened per security review: - Opt-in only (-shared-browser / ARTEX_SHARED_BROWSER=true; default false); README and CHANGELOG accurately describe hardened behavior and document the residual risk of same-UID argv token visibility alongside per-message operator-hold/lease enforcement and immediate revocation. - Isolates CDP via --remote-debugging-pipe on Unix (no Chromium DevTools TCP port or DevToolsActivePort) fronted by a per-run 256-bit token-authenticated server CDP proxy enforcing operator hold and active lease on every HTTP request and WebSocket message. - Removes --ignore-certificate-errors from the capture path; trusts only ARTEX's capture CA SPKI pin (--ignore-certificate-errors-spki-list) and fails closed if unreadable. - Removes --disable-blink-features=AutomationControlled and the HeadlessChrome user-agent rewrite (policy: hand challenges off via ask_operator). - Isolates browser profiles per task or chat session under <data>/browser-profiles/<scope> using descriptor-relative openat(O_NOFOLLOW|O_DIRECTORY) + fchown + unlinkat with root-owned parent (no filepath.Walk over executor-owned trees), tested against root/scope/child symlinks. - Makes operator lock / ask_operator hold timeout configurable via -shared-browser-lock-timeout / ARTEX_SHARED_BROWSER_LOCK_TIMEOUT (default 15m), auto-expiring idle locks. Co-authored-by: Pranil Acharya <Pro-Nil@users.noreply.github.com>
Owner
|
Landed via #639 after hardening: opt-in and off by default, CDP over --remote-debugging-pipe behind a per-run token proxy that enforces the operator hold and lease on every request, capture CA SPKI pinning, no stealth flags, descriptor-relative profile isolation, and a configurable lock timeout. The residual same-UID argv token risk is documented. Thanks, Pranil Acharya. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every agent run used to launch its own private headless Chromium through playwright-mcp. Nobody could see it, so a CAPTCHA, an email/SMS code, a 2FA prompt or a login stopped the run.
ARTEX now runs one persistent Chromium and points every browser MCP at it over CDP (--cdp-endpoint). Function -> Browser shows the agent's tab live (CDP screencast over SSE). Take over lets the operator solve the check or sign in; Hand back returns control, and the agent continues in the same tab with the same cookies.