Repository navigation
feat(browser): inspect native enterprise policy and report browser denials - #167706
jesse-merhi wants to merge 8 commits into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review blockedAutomated review did not run, so no review verdict was produced. Reason: The input-safety check rejected material in this revision. No detected value, path, or scanner output is reproduced here. Automatic review is on hold, including after source changes. Request a fresh re-review after resolving the failure; maintainers can also release the hold through an intentional scanner-policy update. Next step: If this is a genuine credential, remove and rotate it. If it is an intentional test fixture, a maintainer must review and qualify it. |
|
Codex review: blocked before merge. What this changesThe browser plugin adds native enterprise-policy inspection and explains when Chromium administrator restrictions block browser actions. Example: An operator navigates to a destination blocked by Chromium enterprise policy.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision Merge readiness⛔ Blocked before merge - 2 items remain This PR contains distinct, useful work absent from current main and is maintainer-authored, so cleanup closure is inappropriate. No concrete introduced correctness or security defect was established. Priority: P2 Decision needed
Before merge
FindingsNone. Tests
Agent review detailsHow this fits togetherThe browser plugin turns CLI and agent requests into browser-control operations. Chromium remains responsible for enterprise-policy enforcement; OpenClaw reads its diagnostic pages and translates observed denials into actionable responses. flowchart TD
A[CLI or agent request] --> B[Browser plugin admission]
B --> C[Selected Chromium browser]
C --> D[Native policy inspection]
C --> E[Navigation result]
D --> F[Policy report or Doctor summary]
E --> G[Success or administrator denial guidance]
Technical reviewBest possible solution: Keep native enforcement with Chromium and place supported inspection and denial translation in the existing browser plugin owners. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature proposal; the supplied Ubuntu/Chrome 154 trace exercises native inspection and blocked navigation through the actual CLI. Is this the best way to solve the issue? Yes for ownership and scope: reading Chromium's own policy state avoids duplicating enforcement rules or introducing an OpenClaw policy store; acceptance of the new command and action-result behavior remains a product choice. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 96d37e971f03. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +573, Tests +191, Docs +38. Total +802 across 23 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 9, 2026, 4:12 AM ET / 08:12 UTC. |
|
/clawsweeper re-review |
|
🦞👀 Re-review progress:
|
What Problem This Solves
Operators need to understand which native enterprise policies govern the browser OpenClaw controls and why an administrator restriction blocked a browser action.
User Impact
openclaw browser policyreports the running Chromium browser's native policy values, sources, scope and diagnostics. Native navigation and startup denials explain how to inspect policy and contact the administrator; snapshots of denied tabs remain readable.Existing MDM and local OS policies remain browser-owned. OpenClaw does not override restrictions or switch browsers to avoid them. Automatic inspection is verified on Linux Chrome/Chromium 144 and Chrome 154. Other operating systems, browser products and unsupported transports do not advertise automatic verification.
effectivemeans loaded entries were observed, not that every entry provides protection.Why This Change Was Made
Read native policy through the protected browser inspection flow rather than introduce an OpenClaw policy file or duplicate Chromium's URL matching. Passive status opens no inspection tabs, and Doctor reports a summary without exposing raw policy values. Native denial reporting covers navigation, created tabs and action flows while preserving SSRF checks and closing only a failed tab created by the current request.
This is the first of two dependent PRs. Guided local setup and verification are in the second part.
Evidence
On the isolated Ubuntu demo with Google Chrome 154, the actual CLI/browser flow changed from an empty native policy report to a loaded mandatory machine policy. An allowed page loaded; navigation and a newly created tab at the blocked destination produced readable denial guidance. The fixture received zero requests to the blocked destination, and only the failed newly created tab was closed. Removing the task-owned policy and activating the native change restored access.
Independent correctness and standards reviews cover the complete story and the later integration repairs. No supported production findings remain. The registered CLI timeout repair was reproduced through the real command. Doctor, dashboard and connection fixtures now exercise native inspection/navigation without weakening authority, cancellation, ordering or cleanup assertions. These fixture repairs were independently reviewed and add no permanent cases.
All six mapped Linux Node jobs pass with their full native-planner selections. The browser/database job passed 161 database cases and 1,574 browser cases, with 101 browser skips (224.63s wall). The provisioning/config job passed in 738.24s after diagnosis established that the VM lacked the wrapper's existing
jqprerequisite; installing it resolved the fixture failure without changing assertions or product code. Four unchanged job definitions retain their passing results (245.14s total).The combined stack builds with
pnpm build:ci-artifactson macOS/Node 24.18.1 (3m27.6s). Generated plugin assets match; all eight built native-host E2E cases pass (49.49s wall), and built CLI help/status checks pass with Node 24.18.1 and Bun 1.4.2 in isolated state. The successful build emits an unrelated advisory UI request-budget warning.The final combined revision also builds on Ubuntu/Node 24.21.0 (278.77s wall); generated plugin assets match, built Node/Bun 1.4.2 help/status checks pass, and all eight built native-host cases pass (55.56s wall). The initial SDK declaration attempt was killed at the VM's 12 GiB cgroup limit. The diagnosed retry used the existing Go runtime's
GOMEMLIMIT=6GiBandGOMAXPROCS=4without changing source, dependencies or command scope; no additional OOM occurred. The retained manual demo Gateway remained healthy.Extension production/test types, all five core and four root test-type stripes, full selected browser lint, formatting, documentation, import-cycle checks, all 18 additional boundary checks, protocol and architecture guards pass. The final line-cap ratchet passes for all 33 changed source files. Core lint stripes 1–4 report the nine untouched inherited violations listed below; stripe 5 passes. The Linux lint process hit its 12 GiB cgroup limit; the remaining static checks completed on macOS with a bounded Go heap.
Focused policy/setup/CLI coverage previously passed 17 cases in 78.125s including SDK preparation. Three routine cases were removed; the remaining consequential passing cases retain that evidence. Independent Doctor owning/sibling coverage passed 58 cases (134.11s wall, 23.14s summed test time); the real endpoint reports
ok: true, policyunverified, and live snapshotpass. All 31 connection cases passed on Mac (10.22s wall, 385ms summed test time). Hosted CI timing is unavailable while the PRs remain draft.Automatic hosted CI remains pending. The fresh ClawSweeper review failed before producing a verdict: its input scanner reports an unverified finding with a literal mismatch in the pinned-base version of the connection fixture. This does not establish a secret in this change; no scanner qualification or bypass was applied. The independent correctness and standards reviews remain completed. The PRs remain draft while the recorded core-lint and automated-review readiness gates are unresolved. Native macOS/Windows inspection and live MDM deployment were not exercised. The Ubuntu/Chrome 154 manual demo remains available for testing.
Inherited core lint failures at the pinned base
All listed files and
.oxlintrc.jsonare byte-identical to the pinned main base. These are observed local lint results, not a claim that current main CI is red.src/cli/update-cli/update-command-post-update.tssrc/plugin-state/plugin-state-store.tssrc/agents/worktrees/checkout.tssrc/agents/tools/sessions-send-tool.tssrc/plugins/registry-runtime-session-ownership.tssrc/state/openclaw-agent-db-validation-cache.tssrc/auto-reply/reply/dispatch-from-config.choose-route.tssrc/config/sessions/transcript.tsui/src/pages/chat/components/chat-detail-panel.tsxCore lint stripe 5 and all five core/four root test-type stripes pass. The separate Linux lint process hit its 12 GiB cgroup memory limit; the remaining static gates were executed on macOS with a bounded Go heap.