Repository navigation
feat(cli,server): uteke view, a read-only browser viewer (#1470 b) - #1653
Merged
Merged
Conversation
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Nov 3, 2026
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.
What
uteke view [--port N]: a read-only browser viewer for #1470 (b). It lists memories (namespace filter), namespaces with counts, rooms and health. It isuteke-serve --viewer, a separate loopback listener, not an API route, so CORE/LAB are unchanged anddocs/api-reference.mddoes not change.X-Uteke-Viewer-Tokenor bearer; the launch URL carries it once, on/only): 401 without it.Hostgoes through the existingHostGuardfromReqCtx(no second guard), plus a port check: 403 for anything but127.0.0.1:<port>/localhost:<port>.GET; anything else is 405. A GET reaches the API router only for six listed routes and only while the registry row haswrites = false.uteke.tomlsets origins), CSP with per-response nonce,no-store,nosniff,X-Frame-Options: DENY.--hostis refused unless the server auth token is set.textContentonly; the page has noinnerHTML.@codecora/tokens(uteke/uteke-dark), no build step or framework.Why
#1470 (b), approved by the owner; also gives a surface for human review (Atlas finding 16, #1601). Loopback alone is not a control (local processes, DNS rebinding), hence token + Host + method + registry gating. Plan:
docs/plans/2026-10-29-dx-bundle-1470.mdsection 3.Testing
cargo test -p uteke-server viewer: 13 tests: no token 401, wrong token 401, token in the query only opens/, foreign/wrong-port Host 403 (checked before the token), every non-GET method on several paths 405, write/unlisted routes 404, read routes 200 with noAccess-Control-*even when config sets*, every allowed route is a registry read, page CSP nonce and noinnerHTML, a stored<script>string comes back verbatim as JSON withnosniff.cargo test -p uteke-cli(skill coverage test: both SKILL copies listuteke view),cargo clippy --workspace --all-targets,cargo fmt --check.<img onerror>and<script>renders as literal text, tabs load, token is removed from the address bar.