@aegis-kernel — Browser Guard (aegis-kernel-browser-guard)
Turn-key deterministic safety clearance for browser-operating agents — Browser-Use, OpenManus, and any Playwright/CDP agent loop — powered by the Aegis Invariant Kernel.
Browser agents fail at three surfaces, and all three are structural, not linguistic:
| Surface | Attack | Aegis Rule |
|---|---|---|
| Navigation | javascript:/file:/data: scheme escape |
BROWSER-003 |
Cloud metadata / raw IP literals (169.254.169.254) |
BROWSER-005 |
|
Punycode homographs (xn--pple-43d.com) |
BROWSER-006 |
|
| Zero-width Unicode URL smuggling | BROWSER-001 |
|
Embedded credentials (user:pass@host) |
BROWSER-004 |
|
| Deny-listed / off-allowlist domains | BROWSER-007/008 |
|
| Typed input | API keys, credit cards, SSNs keyed into pages | DATA-001/002 |
| Zero-width prompt-injection smuggling | BROWSER-010 |
|
| Files | Executable downloads (.exe, .sh, .apk, …) |
BROWSER-011 |
Sensitive path uploads (.ssh/id_rsa, .env) |
SOC2-001 |
Install
pip install aegis-kernel-browser-guard
Browser-Use — one line
from browser_use import Agent, Controller
from aegis_kernel_browser_guard import guard_browser_use_controller, AegisBrowserGuard, BrowserPolicy
controller = Controller()
guard_browser_use_controller(controller, AegisBrowserGuard(
BrowserPolicy(allowed_domains=["wikipedia.org", "arxiv.org"])
))
agent = Agent(task="Research AST parsers", llm=llm, controller=controller)
Every registered action (go_to_url, input_text, download, …) now clears a deterministic invariant check before executing. Blocked actions return structured AEGIS_BLOCKED: feedback the agent can self-correct against.
OpenManus
from app.tool.browser_use_tool import BrowserUseTool
from aegis_kernel_browser_guard import guard_openmanus_tool
tool = guard_openmanus_tool(BrowserUseTool()) # wraps tool.execute(action=..., ...)
Direct evaluation
from aegis_kernel_browser_guard import AegisBrowserGuard
guard = AegisBrowserGuard()
verdict = guard.evaluate_action("input_text", {"text": "sk-proj-…"})
verdict.allowed # False
verdict.violations[0] # DATA-002 secret detected
verdict.proof_hash # SHA-256 audit proof
Policy
BrowserPolicy(
allowed_domains=None, # None = all except blocked; list = strict allowlist
blocked_domains=["pastebin.com"],
allowed_schemes=["http", "https"],
block_ip_literals=True,
block_punycode=True,
block_url_credentials=True,
block_zero_width=True,
scan_typed_text=True, # PII/secret vault scan on keystrokes
scan_upload_paths=True,
blocked_download_extensions=[".exe", ".msi", ".sh", ...],
)
mode="monitor" records violations without blocking — ideal for staged rollouts.
Links
- Docs · Playground · Core repo
MIT © Sneh Gabani
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aegis_kernel_browser_guard-1.1.0.tar.gz.
File metadata
- Download URL: aegis_kernel_browser_guard-1.1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdaa32a7413f73f6e3a327e1e3d71922e01b7eac9c626642bba993786d0ff957
|
|
| MD5 |
083080f0a448569b68f788fcb80af890
|
|
| BLAKE2b-256 |
6783149730bbc37657114043c448d2d3e09a3d3c45bb7494092aef293c044046
|
File details
Details for the file aegis_kernel_browser_guard-1.1.0-py3-none-any.whl.
File metadata
- Download URL: aegis_kernel_browser_guard-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.11.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1c07d86249457564e6d59b51270be0748c7527710c58c03ac40738b84d2af2a
|
|
| MD5 |
ae8bc43abb1b42451bb96cb39ac386fd
|
|
| BLAKE2b-256 |
0819a4f81e114727954b37bb309d1b765c9af9e358a762aca8fdefeb2c605e1c
|