· Updated

Hermes Browser Automation Just Got Security Hardened — Here's What Changed

Hermes Agent#browser-automation#cdp#security#private-pages#agent-security

Hermes’s browser automation is powerful — it can drive a real Chrome browser via CDP (Chrome DevTools Protocol) to navigate websites, fill forms, extract data, and even execute JavaScript in the page context. But with great power comes great responsibility. What happens when the agent accidentally browses to your bank dashboard, GitHub private repo settings, or an internal admin panel?

The Fix: Two-Layer Private Page Protection

Hermes shipped two complementary changes that harden the CDP browser integration against sensitive data leakage:

  1. Private-page guard on browser_cdp frame_id routing — when the agent navigates to a page that requires authentication or matches sensitive patterns, the guard intercepts before any data extraction occurs.

  2. Camofox input blocked on private pages — the data extraction tool (Camofox) refuses to run on pages flagged as private, preventing screenshot capture and DOM scraping.

How the Private-Page Guard Works

The guard operates at the CDP frame level — the same layer where browser automation commands execute. When the agent uses browser_cdp to connect to a page, the guard inspects the page’s security context through multiple signals:

Detection Heuristics

Signal What It Checks Why It Matters
Authentication headers Authorization, Cookie, X-CSRF-Token presence Active session = likely private
Login form detection <form> with password fields, OAuth buttons, 2FA prompts Unauthenticated but sensitive entry point
Known sensitive domains github.com/settings, aws.amazon.com/console, console.firebase.google.com, banking domains High-value targets even without active session
Page metadata robots.txt disallow, noindex, CSP headers with frame-ancestors 'none' Site-declared privacy intent
URL patterns /admin, /settings, /billing, /security, /tokens, /keys Structural indicators of sensitive areas

Guard Actions on Private Pages

When a page is flagged as private, the guard enforces:

  • Blocks tool calls that would extract data (browser_cdp.get_text, browser_cdp.get_html, browser_cdp.extract_data)
  • Prevents screenshotsbrowser_cdp.screenshot returns a redacted placeholder
  • Stops form interactionsbrowser_cdp.click, browser_cdp.type, browser_cdp.select are rejected on credential fields
  • Logs the attempt — audit entry with timestamp, frame_id, URL pattern matched, and agent session ID for forensics
  • Allows read-only navigation — the agent can still goto and wait_for_load to understand page structure, but cannot extract

Configuration: Operator Control

Operators can tune the guard via hermes.config.json:

{
  "browser": {
    "privatePageGuard": {
      "enabled": true,
      "customSensitiveDomains": ["internal.company.com", "staging.myapp.io"],
      "customUrlPatterns": ["/internal/", "/staff/", "/billing/"],
      "allowScreenshotOnPrivate": false,
      "logLevel": "warn"
    }
  }
}

Comparison: How Other Agents Handle Browsing Security

Agent Browsing Engine Private Page Protection Configurable?
Hermes CDP (Chrome) Frame-level guard + Camofox block Yes (patterns, domains, log level)
Oh My Pi Puppeteer Domain allowlist only Limited (allowlist)
Claude Code None (no browsing) N/A N/A
Cursor None (no browsing) N/A N/A
OpenHands Browserbase/Playwright Session isolation, no content guard Partial
Goose Playwright Basic domain blocklist No

Hermes’s approach is unique in inspecting page security context rather than just domain allowlists. A domain allowlist fails when you need to browse github.com (public repos OK, private repo settings NOT OK). Frame-level context inspection solves this.

Why This Matters for Agent Operators

As coding agents gain autonomous web browsing, the threat model shifts:

  1. Credential exfiltration — An agent browsing your AWS console could extract access keys if not guarded
  2. PII leakage — Screenshots of admin panels capture user emails, revenue data, infrastructure details
  3. Lateral movement — Form-filling on internal tools could trigger destructive actions (delete users, rotate keys)
  4. Compliance risk — SOC2, GDPR, HIPAA all require controls on automated data access

The private-page guard is a defense-in-depth layer. It doesn’t replace secrets management or RBAC — it prevents the agent from accidentally becoming an insider threat.

Practical Example: What Happens When an Agent Hits a Private Page

# Agent attempts to navigate to GitHub settings
$ hermes run "Go to github.com/settings/keys and list all SSH keys"

# Guard intercepts at frame level
[WARN] Private page detected: github.com/settings/keys (matched: known-sensitive-domain + URL pattern /settings/)
[BLOCK] browser_cdp.get_text rejected — frame flagged private
[BLOCK] browser_cdp.screenshot rejected — frame flagged private
[ALLOW] browser_cdp.goto allowed — navigation permitted for context
[AUDIT] session=abc123 frame=xyz789 action=blocked tool=browser_cdp.get_text url=github.com/settings/keys

# Agent receives structured response
{
  "success": false,
  "blocked": true,
  "reason": "private_page_guard",
  "matched_signals": ["known_sensitive_domain", "url_pattern:/settings/"],
  "allowed_actions": ["goto", "wait_for_load", "get_title"]
}

The agent knows it was blocked and why — it can report back to the operator rather than silently failing or worse, succeeding with partial data.


Stop paying for AI subscriptions you barely use. aiFiesta is $12/mo for access to GPT, Claude, Gemini, Grok, DeepSeek, Perplexity, and more. One sub, every top model. Stop paying for AI subscriptions you barely use. aiFiesta is $12/mo for access to GPT, Claude, Gemini, Grok, DeepSeek, Perplexity, and more. One sub, every top model.

FREE RESOURCE

Get the AI Agent Cheat Sheet

All 19 coding agents in one comparison table — pricing, features, benchmarks. Updated weekly. Delivered to your inbox.

k
kira_bug_hunter
Security & Bug Hunter
Former pen tester. Finds the bugs nobody wants to exist. Skeptical of everything, especially status indicators.

Related articles