feat(panel): gate shot/nav (rule 2) + adopt the DS plugin-kit#8
Merged
Conversation
- SECURITY: /panel/shot + POST /panel/nav move off the public /plugins/ prefix to /api/plugins/agent_browser via build_panel_data_router, inheriting the operator bearer gate — previously anyone who could reach a token-gated deployment's port could DRIVE the operator's browser session and read its screen without the bearer. - The /panel/dash reverse proxy stays public OF NECESSITY (it's loaded by an <iframe>, which can't carry a bearer) — gating it needs a designed handoff; tracked in the companion issue. - Kit adoption (both pages): plugin-kit.js via dynamic import (it's an ESM; classic <script> throws on its exports) replaces the hand-rolled TMAP/listeners — initPluginView (live re-themes) + slug-aware authed apiFetch. The full page keeps a THIN relay forwarding the raw console message to the embedded dashboard (the kit doesn't re-broadcast). - Minimal page: module scripts are scoped, so the toolbar's inline onclick handlers are exposed via window.nav/window.go; boot once on handshake-or-timeout so the gated first poll authenticates. Verified end-to-end against the real served kit (playwright route-intercept): shot poll renders, nav posts through the gated path from the toolbar, full page boots + relays; zero page errors. 0.1.1 → 0.2.0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
👀 Quinn is reviewing — verdict (PASS / WARN / FAIL) + findings to follow. |
There was a problem hiding this comment.
QA Audit — PR #8 | feat(panel): gate shot/nav (rule 2) + adopt the DS plugin-kit
VERDICT: PASS
CI Status
- No CI checks configured for this repo (Gap).
Diff Review
__init__.py: registersbuild_panel_data_routerat/api/plugins/agent_browser— shot/nav now inherit the operator bearer gate. The public page router remains at/plugins/agent_browser. Clean separation.browser_panel.py:_runhelper +_shot/_navroutes extracted intobuild_panel_data_router;build_panel_routerretains only/panel(page) +/panel/dash(iframe proxy). Module-level globals (_shot_ts,_SHOT_PATH) remain accessible. Both pages adopt plugin-kit.js via dynamic import with fallback shims — correct for an ESM module that can't load via classic<script>.- Diff truncated at 245 lines — minimal page's updated
nav/gofetch paths not fully visible (Gap), but pattern is consistent with the full page and PR claims Playwright E2E verification.
Observations
- HIGH (positive): shot/nav routes gated behind
/api/plugins/— closes the unauthenticated browser-drive + screen-read vector on token-gated deployments. - LOW: full page's
import()catch body is empty (catch (e) {}) — benign sinceinitPluginView()is fire-and-forget, but aconsole.warnwould aid debugging. - Gap: no CI configured on this repo — can't verify automated checks pass.
- Gap: clawpatch structural review unavailable (repo not in project registry).
- Gap: diff truncated — minimal page tail not visible; unable to verify the
kit.apiFetchcall paths against the new/api/plugins/agent_browser/shotand/api/plugins/agent_browser/navendpoints.
— Quinn, QA Engineer
|
Submitted APPROVE review on #8. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
prefix to /api/plugins/agent_browser via build_panel_data_router,
inheriting the operator bearer gate — previously anyone who could reach a
token-gated deployment's port could DRIVE the operator's browser session
and read its screen without the bearer.
an <iframe>, which can't carry a bearer) — gating it needs a designed
handoff; tracked in the companion issue.
ESM; classic <script> throws on its exports) replaces the hand-rolled
TMAP/listeners — initPluginView (live re-themes) + slug-aware authed
apiFetch. The full page keeps a THIN relay forwarding the raw console
message to the embedded dashboard (the kit doesn't re-broadcast).
handlers are exposed via window.nav/window.go; boot once on
handshake-or-timeout so the gated first poll authenticates.
Verified end-to-end against the real served kit (playwright
route-intercept): shot poll renders, nav posts through the gated path from
the toolbar, full page boots + relays; zero page errors. 0.1.1 → 0.2.0.
Co-Authored-By: Claude Fable 5 noreply@anthropic.com