Browser Secure
Secure browser automation with vault-backed credentials, approval gates, and audit trails.
Philosophy
"Never trust, always verify, encrypt everything, audit all actions"
Quick Start
CODEBLOCK0
Auto-Vault Credential Discovery
The --auto-vault flag enables interactive credential discovery from your password manager:
CODEBLOCK1
This will:
- 1. Extract the domain from the URL (
app.neilpatel.com → neilpatel) - Search Bitwarden first (free, default), then 1Password if available
- Present matching items interactively:
CODEBLOCK2
After saving, you can use the simpler command next time:
CODEBLOCK3
Profile Management
Create isolated Chrome profiles for secure automation with automatic welcome page setup:
CODEBLOCK4
What the Welcome Page Includes
When you create a new profile, it opens with a custom welcome page that guides you through:
- 1. 📖 Why This Profile Exists - Explains the isolated automation concept
- 🔌 Required Extensions - Direct links to install:
- Bitwarden password manager
- OpenClaw Browser Relay
- 3. 🗝️ Vault Setup - Step-by-step for Bitwarden or 1Password
- ✅ Setup Checklist - Interactive checklist to track progress
- 🛡️ Security Info - "Your vault is secure" messaging with key features
Why Separate Profiles?
| Aspect | Personal Profile | Automation Profile |
|---|
| Extensions | Your personal ones | Only automation extensions |
| Cookies |
Personal logins | Isolated session state |
| Security | Shared with daily browsing | Locked down, audited |
| Cleanup | Manual | Automatic session timeout |
Chrome Profile Support
Browser Secure can use your existing Chrome profiles, giving you access to saved cookies, session state, and existing website logins.
List Available Profiles
CODEBLOCK5
Output:
CODEBLOCK6
Use a Specific Profile
CODEBLOCK7
Profile vs Incognito Mode
| Mode | Cookies | Logins | Extensions | Use Case |
|---|
| Incognito (default) | ❌ None | ❌ None | ❌ None | Secure, isolated testing |
| Chrome Profile |
✅ Yes | ✅ Yes | ✅ Yes | Access existing sessions |
Security Note: Browser Secure creates isolated profiles for automation without modifying your existing Chrome profiles. When using --profile, it reads from (but does not write to) existing profiles.
Setup
Option 1: Install via Clawdbot (Recommended)
The easiest way—just ask Clawdbot:
CODEBLOCK8
Clawdbot will handle everything: check prerequisites, auto-install dependencies, build, and configure.
Option 2: Install from GitHub
CODEBLOCK9
Option 3: Manual Setup (Advanced)
If you prefer full control or are developing on the tool:
CODEBLOCK10
This will:
- 1. ✅ Check prerequisites (Node.js 18+, Chrome)
- 📦 Auto-install missing dependencies (Playwright browsers, optional vault CLIs)
- 🔨 Build and link the CLI globally
- 📝 Create default configuration
What Gets Auto-Installed
The setup automatically handles:
- - Playwright Chromium - Required browser binary (~50MB)
- Bitwarden CLI - If
brew is available (recommended vault) - 1Password CLI - If
brew is available (optional)
Configure Vault (Optional)
After setup, configure your preferred vault using environment variables (recommended) or direct CLI login:
Option A: .env File (Convenience for Automation)
⚠️ Security Note: .env files store credentials in plaintext. Only use this on trusted, private machines. Vault integration (Bitwarden/1Password) is the recommended secure approach.
CODEBLOCK11
Full Automation (API Key + Password):
CODEBLOCK12
How it works:
- 1.
BW_CLIENTID/BW_CLIENTSECRET → Authenticates with Bitwarden (replaces username/password) - INLINECODE8 → Decrypts your vault (required for automated access)
Alternative: Session Token
CODEBLOCK13
Option B: Direct CLI Login
CODEBLOCK14
Verify Installation
CODEBLOCK15
Vault Providers
Bitwarden (Default, Free) ⭐
Recommended — free for personal use, open source, cross-platform.
CODEBLOCK16
Authentication vs Unlock:
- - API Key (
BW_CLIENTID/BW_CLIENTSECRET) → Logs you into Bitwarden - Master Password (
BW_PASSWORD) → Decrypts your vault contents - Both are needed for fully automated workflows
Get API Key: https://vault.bitwarden.com/#/settings/security/keys
1Password (Paid)
Alternative — if you already have a 1Password subscription.
CODEBLOCK17
macOS Keychain (Local)
Fallback — store credentials in macOS Keychain (no cloud sync).
Environment Variables
Emergency fallback — set credentials via env vars:
CODEBLOCK18
Commands
| Command | Description |
|---|
| INLINECODE11 | Open welcome page (default when no URL provided) |
| INLINECODE12 |
Navigate to a URL |
|
navigate <url> --profile <id> | Use specific Chrome profile |
|
navigate <url> --profile select | Interactively choose Chrome profile |
|
navigate <url> --list-profiles | List available Chrome profiles |
|
navigate <url> --auto-vault | Auto-discover credentials (Bitwarden → 1Password → manual) |
|
navigate <url> --site=<name> | Use pre-configured site credentials |
|
profile --create <name> | Create new Chrome profile with welcome page |
|
profile --create <name> --launch | Create profile and launch Chrome |
|
profile --list | List all Chrome profiles |
|
act "<instruction>" | Natural language action |
|
extract "<instruction>" | Extract data from page |
|
screenshot | Take screenshot |
|
close | Close browser and cleanup |
|
status | Show session status |
|
audit | View audit logs |
Welcome Page (Default)
When you run browser-secure navigate without a URL, it opens the welcome page located at:
CODEBLOCK19
The welcome page provides:
- - 📖 Onboarding guide — Why browser-secure exists and how it works
- 🔌 Extension links — Direct install for Bitwarden and OpenClaw Browser Relay
- 🗝️ Vault setup — Step-by-step for Bitwarden or 1Password
- ✅ Setup checklist — Interactive checklist to track progress
- 🛡️ Security info — "Your vault is secure" messaging with key features
Pro tip: Use the welcome page as your starting point for new profiles:
CODEBLOCK20
Approval Modes (Hybrid Design)
browser-secure operates in unattended mode by default, making it ideal for agent automation while preserving safety guardrails.
Default Mode: Unattended (Automation-First)
CODEBLOCK21
In this mode:
- - ✅ All non-destructive actions execute immediately
- ✅ Credentials auto-injected from vault
- ✅ Audit trail written automatically
- ⚠️ Destructive actions (delete, purchase) require
--skip-approval or INLINECODE29
Interactive Mode (Human-in-the-Loop)
For sensitive operations, use --interactive to enable approval prompts:
CODEBLOCK22
Approval tiers in interactive mode:
| Tier | Actions | Approval |
|---|
| Read-only | navigate, screenshot, extract | None |
| Form fill |
type, select, click | Prompt |
| Authentication | fill
password, submitlogin | Always |
| Destructive | delete, purchase | 2FA required |
Force Override (Emergency)
CODEBLOCK23
⚠️ Warning: --skip-approval bypasses all safety checks. Use only in fully automated, sandboxed environments.
Session Security
- - Time-bounded (30 min default, auto-expiry)
- Isolated work directories (UUID-based)
- Incognito mode (no persistent profile) — default
- Chrome profile support (your cookies, logins, extensions) — opt-in via INLINECODE32
- Secure cleanup (overwrite + delete)
- Network restrictions (block localhost/private IPs)
Audit Trail
CODEBLOCK24
Environment Variables
| Variable | Purpose |
|---|
| INLINECODE33 | Config file path |
| INLINECODE34 |
Bitwarden API key ID (for automation) |
|
BW_CLIENTSECRET | Bitwarden API key secret (for automation) |
|
BW_PASSWORD | Bitwarden master password (alternative) |
|
BW_SESSION | Bitwarden session token (legacy) |
|
OP_SERVICE_ACCOUNT_TOKEN | 1Password service account |
|
BROWSER_SECURE_{SITE}_PASSWORD | Env-based credentials |
Comparison with browser-automation
| Feature | browser-automation | browser-secure |
|---|
| Credentials | CLI (exposed) | Vault-backed |
| Chrome Profiles |
❌ No | ✅ Yes (with cookies/logins) |
| Approval | None | Tiered gates |
| Audit | None | Full trail |
| Session timeout | None | 30 min default |
| Network | Unrestricted | Allow-list |
| Best for | Quick tasks | Sensitive/authenticated |
Troubleshooting
Chrome keychain prompt on first run: This is normal! When Playwright launches Chrome for the first time, macOS asks if Chrome can access your keychain. You can click "Deny" since browser-secure manages credentials through your vault, not Chrome's built-in storage.
Vault not found: Install the CLI for your preferred vault:
- - Bitwarden: INLINECODE40
- 1Password: INLINECODE41
Bitwarden "Vault is locked":
- - If using .env file: Check that
BW_CLIENTID and BW_CLIENTSECRET are set correctly - Or run: INLINECODE44
Bitwarden API key not working: Ensure your API key has access to the vault items you need. API keys are created at: https://vault.bitwarden.com/#/settings/security/keys
Site not configured: Use --auto-vault for interactive setup, or add manually to INLINECODE46
Session expired: Default 30-minute TTL, restart with INLINECODE47
Approval required: Use -y for non-interactive (careful!)
Profile not found: Run browser-secure navigate https://example.com --list-profiles to see available profiles
Chrome profile in use: Close Chrome before using --profile option (Chrome locks profile when running)
Browser Secure
基于保险库凭据、审批门和审计追踪的安全浏览器自动化。
理念
永不信任,始终验证,加密一切,审计所有操作
快速开始
bash
打开欢迎页面(未提供URL时的默认行为)
browser-secure navigate
导航到公共网站
browser-secure navigate https://example.com
使用自动保险库凭据发现功能导航
browser-secure navigate https://app.neilpatel.com/ --auto-vault
导航到已认证网站(预配置)
browser-secure navigate https://nytimes.com --site=nytimes
执行操作(全自动)
browser-secure act 点击登录按钮
browser-secure extract 获取文章标题
使用交互模式(带审批提示)
browser-secure navigate https://bank.com --interactive
关闭并清理
browser-secure close
自动保险库凭据发现
--auto-vault 标志可从您的密码管理器启用交互式凭据发现:
bash
browser-secure navigate https://app.neilpatel.com/ --auto-vault
这将:
- 1. 从URL中提取域名(app.neilpatel.com → neilpatel)
- 首先搜索Bitwarden(免费,默认),如果可用则搜索1Password
- 交互式显示匹配项:
🔍 正在自动发现 app.neilpatel.com 的凭据...
📋 在Bitwarden中找到2个匹配的凭据:
1) Neil Patel 账户
用户名:user@example.com
2) Ubersuggest API密钥
n) 以上都不是 - 尝试其他保险库
m) 手动输入凭据
选择要使用的凭据(1-2,n或m):1
🔐 正在检索 neilpatel 的凭据...
是否保存此凭据映射以供将来使用?(y/n):y
✅ 已将 neilpatel 的凭据映射保存到 ~/.browser-secure/config.yaml
默认保险库提供商设置为:Bitwarden
保存后,下次可以使用更简单的命令:
bash
browser-secure navigate https://app.neilpatel.com/ --site=neilpatel
配置文件管理
创建隔离的Chrome配置文件以实现安全自动化,并自动设置欢迎页面:
bash
创建新配置文件并显示欢迎页面
browser-secure profile --create 有趣的名字
创建并立即启动Chrome
browser-secure profile --create 甲壳类工作站 🦞 --launch
列出所有Chrome配置文件
browser-secure profile --list
欢迎页面包含的内容
创建新配置文件时,它会打开一个自定义欢迎页面,引导您完成:
- 1. 📖 此配置文件存在的原因 - 解释隔离自动化概念
- 🔌 所需扩展 - 直接安装链接:
- Bitwarden密码管理器
- OpenClaw浏览器中继
- 3. 🗝️ 保险库设置 - Bitwarden或1Password的分步指南
- ✅ 设置清单 - 跟踪进度的交互式清单
- 🛡️ 安全信息 - 您的保险库是安全的消息及关键功能
为什么使用单独的配置文件?
| 方面 | 个人配置文件 | 自动化配置文件 |
|---|
| 扩展 | 您的个人扩展 | 仅自动化扩展 |
| Cookie |
个人登录信息 | 隔离的会话状态 |
| 安全性 | 与日常浏览共享 | 锁定,审计 |
| 清理 | 手动 | 自动会话超时 |
Chrome配置文件支持
Browser Secure可以使用您现有的Chrome配置文件,让您访问已保存的Cookie、会话状态和现有网站登录信息。
列出可用配置文件
bash
browser-secure navigate https://example.com --list-profiles
输出:
📋 可用的Chrome配置文件:
1. 个人 1 ★
ID: Default
路径: /Users/river/Library/Application Support/Google/Chrome/Default
2. 工作
ID: Profile 1
路径: /Users/river/Library/Application Support/Google/Chrome/Profile 1
使用特定配置文件
bash
按配置文件ID
browser-secure navigate https://gmail.com --profile Default
browser-secure navigate https://gmail.com --profile Profile 1
交互式选择
browser-secure navigate https://gmail.com --profile select
配置文件与隐身模式对比
| 模式 | Cookie | 登录信息 | 扩展 | 用例 |
|---|
| 隐身模式(默认) | ❌ 无 | ❌ 无 | ❌ 无 | 安全、隔离的测试 |
| Chrome配置文件 |
✅ 有 | ✅ 有 | ✅ 有 | 访问现有会话 |
安全说明:Browser Secure会为自动化创建隔离的配置文件,而不会修改您现有的Chrome配置文件。使用--profile时,它会从现有配置文件读取(但不会写入)。
设置
选项1:通过Clawdbot安装(推荐)
最简单的方式——只需告诉Clawdbot:
嘿Clawdbot,帮我安装browser-secure
Clawdbot会处理一切:检查先决条件、自动安装依赖项、构建和配置。
选项2:从GitHub安装
bash
克隆并安装
curl -fsSL https://raw.githubusercontent.com/openclaw/openclaw/main/scripts/install-browser-secure.sh | bash
选项3:手动设置(高级)
如果您更喜欢完全控制或正在开发此工具:
bash
克隆仓库
git clone https://github.com/openclaw/openclaw.git
cd openclaw/skills/browser-secure
运行交互式设置
npm run setup
这将:
- 1. ✅ 检查先决条件(Node.js 18+,Chrome)
- 📦 自动安装缺失的依赖项(Playwright浏览器,可选的保险库CLI)
- 🔨 构建并在全局链接CLI
- 📝 创建默认配置
自动安装的内容
设置会自动处理:
- - Playwright Chromium - 所需的浏览器二进制文件(约50MB)
- Bitwarden CLI - 如果brew可用(推荐保险库)
- 1Password CLI - 如果brew可用(可选)
配置保险库(可选)
设置后,使用环境变量(推荐)或直接CLI登录配置您偏好的保险库:
选项A:.env文件(自动化便利)
⚠️ 安全说明: .env文件以明文存储凭据。仅在受信任的私人机器上使用。保险库集成(Bitwarden/1Password)是推荐的安全方法。
bash
cd ~/.openclaw/workspace/skills/browser-secure
cp .env.example .env
使用您的凭据编辑.env
完全自动化(API密钥+密码):
bash
.env - 用于完全自动化的保险库访问
BW_CLIENTID=user.xxx-xxx
BW_CLIENTSECRET=您的密钥
BW_PASSWORD=您的主密码
工作原理:
- 1. BWCLIENTID/BWCLIENTSECRET → 向Bitwarden进行身份验证(替换用户名/密码)
- BW_PASSWORD → 解密您的保险库(自动化访问所需)
替代方案:会话令牌
bash
如果您不想存储主密码:
export BW_SESSION=$(bw unlock --raw)
然后添加到.env:
BW_SESSION=xxx...
选项B:直接CLI登录
bash
Bitwarden(推荐 - 免费)
brew install bitwarden-cli # 如果未自动安装
bw login
export BW_SESSION=$(bw unlock --raw)
1Password(如果您有订阅)
brew install 1password-cli # 如果未自动安装
op signin
测试保险库访问
browser-secure vault --list
验证安装
bash
browser-secure --version
browser-secure navigate https://example.com
browser-secure screenshot
browser-secure close
保险库提供商
Bitwarden(默认,免费)⭐
推荐 — 个人使用免费,开源,跨平台。
bash
安装
brew install bitwarden-cli
设置.env文件
cd ~/.openclaw/workspace/skills/browser-secure
cp .env.example .env
编辑.env并添加:
BW_CLIENTID=您的API密钥ID
#