Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions agent/file_safety.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,34 @@ def get_read_block_error(path: str) -> Optional[str]:
"security boundary; the terminal tool can still bypass.)"
)

# browser-profile/: real-profile browsing snapshot (browser.use_real_profile).
# A copy of the user's Cookies / Login Data / Web Data lives here — the same
# credential class as auth.json, so it gets the same directory-prefix read
# deny. Prefix (not a finite filename list) so future Chromium files are
# covered too.
for hd in hermes_dirs:
try:
browser_profile = (hd / "browser-profile").resolve()
except Exception:
continue
if resolved == browser_profile:
return (
f"Access denied: {path} is the Hermes real-profile browser "
"snapshot directory (copied cookies/logins) and cannot be read "
"directly. (Defense-in-depth — not a security boundary; the "
"terminal tool can still bypass.)"
)
try:
resolved.relative_to(browser_profile)
except ValueError:
continue
return (
f"Access denied: {path} is inside the Hermes real-profile browser "
"snapshot (copied cookies/logins) and cannot be read directly. "
"(Defense-in-depth — not a security boundary; the terminal tool "
"can still bypass.)"
)

# Block common secret-bearing project-local .env files anywhere on disk.
# The agent helping a user with their project rarely needs to read raw
# .env contents — .env.example is the documented-shape substitute. The
Expand Down
20 changes: 17 additions & 3 deletions apps/desktop/src/app/settings/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
Box,
Brain,
Globe,
type IconComponent,
Lock,
MessageCircle,
Expand Down Expand Up @@ -426,7 +427,8 @@ export const FIELD_LABELS: Record<string, string> = defineFieldCopy({
},
browser: {
allowPrivateUrls: 'Browser Private URLs',
autoLocalForPrivateUrls: 'Local Browser For Private URLs'
autoLocalForPrivateUrls: 'Local Browser For Private URLs',
useRealProfile: 'Use My Real Browser Profile'
},
checkpoints: {
enabled: 'File Checkpoints',
Expand Down Expand Up @@ -554,6 +556,10 @@ export const FIELD_DESCRIPTIONS: Record<string, string> = defineFieldCopy({
repoScanExcludePaths: 'Folders and their descendants to skip during repository discovery.'
},
timezone: 'IANA timezone identifier. Blank uses the system timezone.',
browser: {
useRealProfile:
"Local browsing uses your real logins. Hermes copies your default browser's profile (cookies, logins, preferences) into a managed snapshot and drives it with its packaged Chromium — your live profile is never opened directly, and the copy is refreshed from it on each run. Also lets the agent open a local real-profile session on request even when a cloud browser backend is configured. Only Chromium browsers (Chrome, Edge, Brave, Chromium) are supported; a non-Chromium default fails with a clear message. Off by default."
},
agent: {
imageInputMode: 'Controls how image attachments are sent to the model.',
maxTurns: 'Upper bound for tool-calling turns before Hermes stops a run.'
Expand Down Expand Up @@ -667,11 +673,19 @@ export const SECTIONS: DesktopConfigSection[] = [
'command_allowlist',
'security.redact_secrets',
'security.allow_private_urls',
'browser.allow_private_urls',
'browser.auto_local_for_private_urls',
'checkpoints.enabled'
]
},
{
id: 'browser',
label: 'Browser',
icon: Globe,
keys: [
'browser.use_real_profile',
'browser.allow_private_urls',
'browser.auto_local_for_private_urls'
]
},
{
id: 'memory',
label: 'Memory & Context',
Expand Down
6 changes: 6 additions & 0 deletions hermes_cli/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
# the busy timeout — a full backup hangs mid-archive on the first locked DB.
# Profiles are regenerable (cache + re-login) and unsafe to snapshot live.
"browser-profiles",
# Real-profile browsing snapshot (browser.use_real_profile). Holds copies of
# the user's Cookies / Login Data / Web Data — a credential-bearing store
# that must NOT enter a backup archive. It is regenerated from the user's
# live profile on the next consented launch. Singular, distinct from the
# ``browser-profiles`` CDP dir above; both are excluded.
"browser-profile",
# Python dependency trees (plugin / MCP-server venvs under HERMES_HOME) —
# regenerated by reinstalling; never irreplaceable state.
".venv",
Expand Down
Loading
Loading