Local dashboard access control: loopback, Host/Origin pinning and the token cookie
Question, reviewed by the security-analyst expert on grok, or:deepseek-v4-pro-0813, or:qwen3-8-max, or:kimi-k3-1-pro and or:glm-5-3-flashx. It follows up antonbabenko/deliberation/blob/4bf190b/server/dashboard/server.js.
unresolved after 2 rounds
Recorded 2026-11-18 on Deliberation 4.6.1, run ff36427a, tool consensus-step. Reviewer text is verbatim, so it can disagree with itself and with the verdict line the engine read.
The prompt
Question
Is the local dashboard's access control adequate for what it serves, and what must change before more users turn it on?
Sent to every reviewer
Full text, verbatim (9,722 characters)
Security review: the local dashboard's access control in the Deliberation repo (server/dashboard/, as on master at 4bf190b)
Question: is this access control adequate for what the dashboard serves, and what, if anything, must change before more users turn it on? Judge it against the threat model the repo states (quoted below), and say whether that model itself is the right one.
What the dashboard is: a separate local process (`deliberation-mcp dashboard`, `/deliberation:dashboard`) that tails the run journal every Deliberation MCP process writes, and serves it read-only to a browser: live and past runs as state graphs, config, provider health, stats and an analyzer. With `dashboard.capture: "metadata"` (default) it serves no prompt or response text; with `"content"` it serves prompts and model answers (secrets scrubbed at write time). PII is redacted at serve time unless `dashboard.showPII` is on.
Threat model as written in docs/dev/design-decisions.md (verbatim):
> Threat model: loopback bind, Host/Origin pinned to `127.0.0.1:<port>`/`localhost:<port>` against DNS rebinding, a per-start 32-byte token in the printed URL swapped for an `HttpOnly; SameSite=Strict` cookie (browsers send it to every 127.0.0.1 port: Host/Origin checks and `nosniff` stop a web page from reading data cross-port, but a local service that receives the cookie can replay the token server-side, e.g. curl with `Host: 127.0.0.1:<port>` plus the cookie or `?t=`, and read all dashboard data. Accepted because any local listener is already inside the same-machine trust boundary - the design scope is a single-user laptop; `dlb_dash` is only issued after the user opens the tokenized URL, and a restart rotates the token. On shared multi-user machines, do not enable the dashboard or `capture: "content"`), the token kept off argv via a 0600 redirect file, and CSP + `textContent`-only rendering.
Routes after the guard (all GET/HEAD): `/` (UI), `/assets/*` (static, realpath-confined to the UI dir), `/api/runs`, `/api/runs/<id>`, `/api/config`, `/api/health`, `/api/stats`, `/api/analyzer`, `/api/events` (SSE stream of journal events).
=== server/dashboard/server.js ===
const COOKIE = "dlb_dash";
const KEEPALIVE_MS = 15000;
// A client this far behind is dropped; it reconnects with Last-Event-ID and resumes.
const SSE_MAX_BUFFERED = 1 << 20;
const BASE_HEADERS = Object.freeze({
"Content-Security-Policy": "default-src 'self'; frame-ancestors 'none'",
"X-Content-Type-Options": "nosniff",
"Referrer-Policy": "no-referrer",
});
...
/**
* Constant-time token check. Length is not secret (always 64 hex chars).
* @param {unknown} given
* @param {Buffer} expected
*/
function tokenMatches(given, expected) {
if (typeof given !== "string") return false;
const buf = Buffer.from(given, "utf8");
return buf.length === expected.length && crypto.timingSafeEqual(buf, expected);
}
/** @param {string|undefined} header @returns {string|undefined} */
function readCookie(header) {
if (!header) return undefined;
for (const part of header.split(";")) {
const i = part.indexOf("=");
if (i > 0 && part.slice(0, i).trim() === COOKIE) return part.slice(i + 1).trim();
}
return undefined;
}
...
/**
* Every check that must pass before routing. Sends the rejection and returns
* false, or returns true to continue.
* @param {http.IncomingMessage} req @param {http.ServerResponse} res @param {URL} url
*/
function guard(req, res, url) {
const port = boundPort();
const hosts = [`127.0.0.1:${port}`, `localhost:${port}`];
const host = String(req.headers.host || "").toLowerCase();
if (!hosts.includes(host)) return sendJson(req, res, 403, { error: "forbidden host" }), false;
const origin = req.headers.origin;
if (origin !== undefined && !hosts.some((h) => origin.toLowerCase() === `http://${h}`)) {
return sendJson(req, res, 403, { error: "forbidden origin" }), false;
}
if (req.method !== "GET" && req.method !== "HEAD") {
res.setHeader("Allow", "GET, HEAD");
return sendJson(req, res, 405, { error: "method not allowed" }), false;
}
const t = url.searchParams.get("t");
if (t !== null) {
if (!tokenMatches(t, expected)) return sendJson(req, res, 401, { error: "unauthorized" }), false;
// Not a 302: the browser is opened through a file:// redirect page, so a redirect
// would still be a cross-site navigation and Chrome would withhold the Strict cookie
// from the redirected GET /. A same-origin page that refreshes to / is same-site.
res.writeHead(200, {
"Content-Type": "text/html; charset=utf-8",
"Cache-Control": "no-store",
"Set-Cookie": `${COOKIE}=${token}; HttpOnly; SameSite=Strict; Path=/`,
});
res.end(req.method === "HEAD" ? undefined : '<!doctype html><meta charset="utf-8"><meta http-equiv="refresh" content="0;url=/"><title>Deliberation dashboard</title><a href="/">Open the dashboard</a>\n');
return false;
}
if (!tokenMatches(readCookie(req.headers.cookie), expected)) return sendJson(req, res, 401, { error: "unauthorized" }), false;
return true;
}
...
/** @param {http.IncomingMessage} req @param {http.ServerResponse} res */
async function handle(req, res) {
for (const [k, v] of Object.entries(BASE_HEADERS)) res.setHeader(k, v);
const url = new URL(req.url || "/", "http://127.0.0.1");
if (url.pathname.startsWith("/api/")) res.setHeader("Cache-Control", "no-store");
if (!guard(req, res, url)) return;
=== server/dashboard/index.js (startup) ===
/** @param {number} port @param {string} token */
const urlLine = (port, token) => `Deliberation dashboard: http://127.0.0.1:${port}/?t=${token}\n`;
/** @param {string} statePath */
const openerPath = (statePath) => path.join(path.dirname(statePath), "dashboard-open.html");
...
/**
* Best effort; the URL line is already printed. The tokenized URL never goes on a child's
* argv (readable by other local users through ps or /proc): it goes into a 0600 redirect
* page next to the pidfile, and the opener gets that file's path.
* @param {string} url built from an integer port and a hex token, so it needs no escaping
* @param {{statePath: string, spawn?: typeof spawn, platform?: NodeJS.Platform}} opts
*/
function openBrowser(url, opts) {
const spawnFn = opts.spawn || spawn;
const platform = opts.platform || process.platform;
const file = openerPath(opts.statePath);
try {
fs.writeFileSync(file, `<!doctype html><meta charset="utf-8"><meta http-equiv="refresh" content="0;url=${url}"><title>Deliberation dashboard</title><a href="${url}">Open the dashboard</a>\n`, { mode: 0o600 });
fs.chmodSync(file, 0o600);
} catch {
return;
}
const target = pathToFileURL(file).href;
const [cmd, args] = platform === "darwin" ? ["open", [target]]
: platform === "win32" ? ["cmd", ["/c", "start", "", target]]
: ["xdg-open", [target]];
try {
const child = spawnFn(cmd, args, { detached: true, stdio: "ignore" });
child.on("error", () => {});
child.unref();
} catch {
// no opener on this machine
}
}
...
/**
* True only when a dashboard answers the token on `port` with its 302: a live pid alone
* may be an unrelated process that reused it.
* @param {number} port @param {string} token @param {number} [timeoutMs]
* @returns {Promise<boolean>}
*/
function probeInstance(port, token, timeoutMs = 500) {
return new Promise((resolve) => {
const req = http.get({ host: "127.0.0.1", port, path: `/?t=${token}`, headers: { Host: `127.0.0.1:${port}` }, timeout: timeoutMs }, (res) => {
res.resume();
resolve(res.statusCode === 200 && String(res.headers["set-cookie"] || "").startsWith("dlb_dash="));
});
req.on("timeout", () => req.destroy());
req.on("error", () => resolve(false));
});
}
...
const token = crypto.randomBytes(32).toString("hex");
const port = args.port !== undefined ? args.port : cfg.dashboard.port;
const server = createDashboardServer({ port, token, uiDir: UI_DIR, index, tailer, getConfig: rt.getConfig, runtimeReport:()=>({dashboardRuntimeId:mcp.history.runtimeId,runtimes:require('../../core/config-history.js').readRuntimes(path.join(runsDir,'..','history')),note:'Only processes with dashboard journaling enabled are discoverable. Heartbeat freshness is observation, not proof of liveness.'}), health: () => healthReport(rt), stats });
try {
await new Promise((resolve, reject) => {
server.once("error", reject);
server.listen(port, "127.0.0.1", () => resolve(undefined));
});
} catch (e) {
...
fs.mkdirSync(path.dirname(statePath), { recursive: true, mode: 0o700 });
// procStartedAt + argv let --stop prove a pid is this dashboard before signalling it.
fs.writeFileSync(statePath, JSON.stringify({ pid: process.pid, port: bound, token, startedAt: Date.now(), procStartedAt: Math.round(Date.now() - process.uptime() * 1000), argv: process.argv }), { mode: 0o600 });
fs.chmodSync(statePath, 0o600); // a stale file keeps its old mode through writeFileSync
const removeState = () => {
const s = readState(statePath);
if (s && s.pid === process.pid) fs.rmSync(statePath, { force: true });
fs.rmSync(openerPath(statePath), { force: true });
};
process.once("exit", removeState);
Other facts:
- The printed URL line (`urlLine`) goes to the dashboard's stdout, which the host agent's transcript captures when `/deliberation:dashboard` starts it.
- The state file (`statePath`) and the redirect page live under the user's cache dir (`<XDG cache>/deliberation/`), created 0700.
- There is no logout, no token expiry while the process runs, and the cookie value is the token itself.
Round history
| Round | Blind verdict | Reviewers | After adjudication | Outcome |
|---|---|---|---|---|
| Round 1 10m 00s | REQUEST CHANGES | grok REQUEST CHANGES[3]or:deepseek-v4-pro-0813 APPROVE[6]or:qwen3-8-max TIMEOUTor:kimi-k3-1-pro REQUEST CHANGES[2]or:glm-5-3-flashx APPROVE[4] | REQUEST CHANGES revised | Not converged, 2 of 4 approved, 1 failed |
| Round 2 9m 59s | REQUEST CHANGES | grok REQUEST CHANGES[6]or:deepseek-v4-pro-0813 REQUEST CHANGES[5]or:qwen3-8-max TIMEOUTor:kimi-k3-1-pro REQUEST CHANGES[3]or:glm-5-3-flashx REQUEST CHANGES[3] | REQUEST CHANGES revised | Not converged, 0 of 4 approved, 1 failed |
Round 1
Blind verdict. Before any reviewer answered, the host agent recorded REQUEST CHANGES with 1 issue of its own: Host and Origin pinning, loopback bind, GET-only routes and the constant-time check are sound, but the bearer credential leaks to every local port by design, so the model's accepted-risk paragraph is the gap to close.
grok REQUEST CHANGES
Risk rating: HIGH. The dashboard is fit only for an opt-in single-user metadata view, not for wider enablement or content capture. Top issues: the session cookie is sent to every 127.0.0.1 port and can be replayed by any local listener; the same non-expiring token is printed to stdout and accepted as `?t=`. Confidence: high on the cookie and stdout leaks from the shown code; medium on residual exposure because journal modes and `/api/config` redaction were not in the diff. Those would raise this to critical if config or journals are world-readable or contain API keys. Host pinning and the DNS-rebinding defense look correct.
Full response, verbatim
The loopback bind, Host pinning, method allowlist, 0600 opener, and argv hygiene are sound. The trust boundary is not. A browser cookie cannot be port-scoped, and this process treats the cookie value as a long-lived bearer for every route, including content and config. Against the written model the guard mostly does what it claims: DNS rebinding fails the Host check, cross-origin browser reads fail the Origin check plus same-origin policy (no CORS headers are set), and `nosniff` plus `frame-ancestors 'none'` block XSSI and framing. `SameSite=Strict` also keeps a public website from attaching the cookie to a loopback request. That model is the wrong one for wider use. Loopback is a machine-wide bus, not a per-user or per-app boundary. `Set-Cookie: dlb_dash=<token>; HttpOnly; SameSite=Strict; Path=/` is stored for host `127.0.0.1` with no port. Any later first-party visit to `http://127.0.0.1:<other-port>/` sends the token to that listener. A different UID, a container published on loopback, or a dev server can then replay `Host: 127.0.0.1:<dashport>` plus the cookie or `?t=` and read every dashboard route. Same-origin policy does not stop a non-browser replay. "Any local listener is already trusted" is false, and a design-doc warning not to enable this on shared machines is not a control. Same-UID peers do not need the cookie: the state file stores the live token, and the journal is on disk beside it. The HTTP gate only matters for parties who can take a loopback connection but cannot read those files. Those are exactly the parties the cookie hands the secret to. Two further breaks of the stated secrecy design: `urlLine` prints `?t=<token>` to stdout, which the host transcript captures, and `?t=` stays valid for the process lifetime, so history, the opener page, and that transcript are full bearers. There is no logout or expiry; restart is the only revocation. `Sec-Fetch-Site` is not checked. That header would not stop curl, but a port-scoped session secret would. Do not rely on this for `capture: "content"` or for more users until the bearer is origin-scoped. <SUMMARY> Risk rating: HIGH. The dashboard is fit only for an opt-in single-user metadata view, not for wider enablement or content capture. Top issues: the session cookie is sent to every 127.0.0.1 port and can be replayed by any local listener; the same non-expiring token is printed to stdout and accepted as `?t=`. Confidence: high on the cookie and stdout leaks from the shown code; medium on residual exposure because journal modes and `/api/config` redaction were not in the diff. Those would raise this to critical if config or journals are world-readable or contain API keys. Host pinning and the DNS-rebinding defense look correct. </SUMMARY> VERDICT: REQUEST_CHANGES - [security] The dlb_dash cookie is a long-lived bearer and is not port-scoped, so any 127.0.0.1 listener the browser later visits can replay it and read every dashboard route. Replace it with a one-time `?t=` exchange for a session secret kept in sessionStorage and sent only as a request header. - [security] The live token is printed on stdout and remains valid in `?t=`, history, and the opener file for the whole process, so agent transcripts undo the argv and 0600 controls. Print the opener path only, and do not accept `?t=` after the first exchange. - [scope] The written model treats every local listener as trusted and leaves shared-machine refusal as a design-doc note. Loopback is shared by other UIDs, containers, and dev servers; that is the wrong boundary once more users, or content capture, turn this on.
or:deepseek-v4-pro-0813 APPROVE
No critical access-control defect found. Risk is LOW for the stated single-user default, MEDIUM for content capture/shared-host use. Top residual risks: bearer token emitted to stdout/agent transcripts with no expiry, no server-side session revocation, and docs-only enforcement of the shared-machine/content prohibition. Confidence is moderate; the review did not see `/api/config` redaction, serve-time PII redaction implementation, or static-asset realpath confinement, and Windows ACL behavior is unverified — any of those could raise the rating. The threat model itself is correct for a single-user workstation.
Full response, verbatim
**Threat Summary**: The dashboard’s access control is well matched to the stated single-user-laptop threat model. Loopback bind, exact `Host`/`Origin` pinning including the port, a 256-bit constant-time token, an `HttpOnly; SameSite=Strict` cookie, `nosniff`, `Referrer-Policy: no-referrer`, CSP `frame-ancestors 'none'`, and a GET/HEAD-only allowlist close the remote web-attacker route. The threat model itself is the right one for the default scope: any process already running as the same UID can read the journal directly, so the token only needs to defeat remote/browser attacks and other local users, which it does. The residual risks are lifecycle and operational: the bearer URL goes to stdout/agent transcripts, the session is non-revocable, and the shared-host/content-capture prohibition is documentation, not enforcement. **Critical Vulnerabilities** (exploit risk: high): None found in the reviewed access-control path. **High-Risk Issues** (should fix before broader rollout): - [security] Token printed to stdout / agent transcript — `urlLine` in `server/dashboard/index.js`. A host-agent transcript can leave the machine (cloud logging/model provider), and the token has no expiry, so a leaked transcript grants localhost access for the process lifetime. Remediation: treat tool output as a trust boundary — avoid emitting the full `?t=` token into captured output, or use a short-lived one-time exchange and rotate it; at minimum document and rotate. - [security] No logout or server-side token revocation — `guard`/`Set-Cookie` in `server/dashboard/server.js`. A leaked query string, browser history, or screenshot remains valid until process exit. Remediation: add a revocation/rotation mechanism and a session lifetime; clearing the cookie alone is not enough while `?t=` is accepted. - [security] Shared-host/content gating is docs-only — no startup enforcement. If users enable `capture: "content"` or `showPII` on a shared/multi-user box, the threat model no longer holds and prompt/answer text can be exposed through loopback if the token is replayed. Remediation: require an explicit `allowSharedHost`-style opt-in for `capture: "content"`/`showPII`, or refuse to start on detected multi-user systems. - [security] Windows file-mode assumptions — `0600`/`0700` via `fs.chmodSync`/`mkdirSync` do not give the same ACL guarantees on Windows; state/redirect files may be more broadly readable on some profiles. [unverified — confirm on Windows]. Remediation: validate ACLs on Windows if shared machines are supported. **Recommendations** (hardening suggestions): - Keep `SameSite=Strict` (not `Lax`) and add `Secure` only if the dashboard is ever served over TLS; do not add it for current plain HTTP loopback. - Apply `fs.chmodSync` to an already-existing cache directory too, not only on creation, so a pre-existing permissive dir cannot persist. - Verify `/api/config` truly excludes credentials and that serve-time PII redaction cannot be bypassed — these are behind the same token, so they are as sensitive as the token allows. - Consider a small brute-force/rate-limit note for localhost requests; not a practical risk with a 256-bit token, but cheap defense in depth. **OWASP status recap**: Broken Access Control: secure for single-user. Broken Authentication: secure with lifecycle caveats above. Sensitive Data Exposure: risk depends entirely on `capture`/`showPII` and config redaction (latter [unverified]). Injection/CSRF: not applicable (read-only GET/HEAD, no user-controlled rendering/commands). XSS: secure via CSP + `nosniff` + `textContent`. Misconfiguration: the main risk area above. Vulnerable components/logging failures: n/a; logging is only a risk because the token is in the URL/transcript. **Risk Rating**: **LOW** for the default single-user metadata dashboard; **MEDIUM** once `capture: "content"`/`showPII` or multiple local users are in play. `<SUMMARY>` No critical access-control defect found. Risk is LOW for the stated single-user default, MEDIUM for content capture/shared-host use. Top residual risks: bearer token emitted to stdout/agent transcripts with no expiry, no server-side session revocation, and docs-only enforcement of the shared-machine/content prohibition. Confidence is moderate; the review did not see `/api/config` redaction, serve-time PII redaction implementation, or static-asset realpath confinement, and Windows ACL behavior is unverified — any of those could raise the rating. The threat model itself is correct for a single-user workstation. `</SUMMARY>` VERDICT: APPROVE - [security] None found in the reviewed access-control path; the high-risk items above are not blocking for the stated single-user default but should be resolved before shared-host or content-capture rollout.
or:qwen3-8-max TIMEOUT
No answer:
Call deadline expired. A failed call is not a vote and does not count toward convergence.or:kimi-k3-1-pro REQUEST CHANGES
Risk is MEDIUM. The supplied Host, Origin, method, token, cookie, and loopback controls adequately implement the stated single-user laptop threat model; no remote authentication bypass was identified. Local cross-port cookie replay is real but explicitly and reasonably accepted within that boundary. Before broader rollout, stop placing the raw bearer token in host-captured stdout or guarantee redaction, and clearly prohibit shared machines and network forwarding/proxying. Confidence is moderate-high for the guard, but lower for the overall dashboard because route handlers, UI rendering, static-file confinement, config contents, and redaction implementations were not supplied.
Full response, verbatim
**Threat Summary**: The guard is sound for the stated single-user, loopback-only deployment: I see no practical remote web bypass in the supplied code. The main rollout blocker is operational secret handling—the bearer token is deliberately copied into host-agent transcripts—and the documentation must prevent the model from being stretched to shared or network-accessible deployments. **Critical Vulnerabilities** (exploit risk: high): - None identified in the supplied guard. The exact Host allowlist blocks ordinary DNS rebinding, Origin validation protects cross-origin requests that supply it, `SameSite=Strict` covers cross-site navigations where Origin may be absent, and browser same-origin policy prevents response reading. Routes are read-only, so there is no meaningful write-CSRF exposure. **High-Risk Issues**: - **Bearer token persisted in transcripts**: `server/dashboard/index.js`, `urlLine`/startup stdout - The host captures the complete tokenized URL, potentially retaining or transmitting it beyond the dashboard’s cache-directory protections. Disclosure still requires an attacker to reach the victim’s loopback service, so this is not by itself a remote compromise, but it unnecessarily expands the token’s trust boundary and lifetime. Print a non-secret URL plus instructions for retrieving the opener file, or guarantee transcript redaction; retain the full URL only in the 0600 file. - **Deployment scope must be enforced by documentation**: the threat model as a whole - The control is not an authorization boundary between OS users and must not be presented as one. Broad rollout documentation should explicitly prohibit shared machines, remote bind addresses, reverse proxies, port forwarding/tunneling, and exposing the service from shared development environments. `capture: "content"` and `showPII` deserve a separate prominent sensitivity warning; scrubbing/redaction should not be treated as guaranteeing that prompts, answers, config, or analyzer output are harmless. **Assessment of the design**: - The 256-bit random token and constant-time comparison are appropriate; brute-force throttling is unnecessary. - Loopback binding and exact host/port matching are correctly restrictive. Cookies are host-scoped but not port-scoped, so the documented local-listener replay is real. Accepting it is reasonable only because every local listener is explicitly inside the trusted boundary. - `HttpOnly` does not prevent that replay; it only prevents script access. Lack of `Secure` is not a finding for an HTTP loopback-only service. - Process-lifetime validity, no logout, and restart rotation are acceptable for this scope. A separate one-time bootstrap token and random session cookie would reduce URL-token exposure, but are hardening rather than prerequisites. - The 0600 state/opener files under a 0700 user cache directory are appropriate. Crash-leftover files remain protected, and tokens left in old transcripts become useless after restart. - The SSE buffered-client limit is relevant availability protection. No access-control performance concern is apparent. **Recommendations**: - Remove or redact the tokenized stdout URL before encouraging general adoption. - Add an explicit rollout warning that authentication is not multi-user isolation and that forwarding the port nullifies the loopback boundary. - Consider one-time bootstrap-token consumption, a distinct session cookie, and logout/session clearing as usability hardening. - Verify the complete UI and route handlers separately; the supplied excerpts do not establish output encoding, static-file confinement, config-field sensitivity, or redaction effectiveness. **OWASP status**: | Category | Status | |---|---| | Injection | Insufficient context outside the guard | | Broken authentication | Secure within the stated model; transcript exposure needs correction | | Sensitive data exposure | Vulnerable to unnecessary bearer-token retention in transcripts | | XXE | Not applicable to supplied code | | Broken access control | Secure for single-user loopback; intentionally unsuitable for shared deployment | | Security misconfiguration | Secure in supplied startup configuration | | XSS | Insufficient context; CSP and `textContent` are positive stated controls | | Insecure deserialization | Not applicable to supplied code | | Vulnerable components | Not applicable from supplied dependency information | | Logging/monitoring failures | Vulnerable: authentication secret written to captured stdout | **Risk Rating**: MEDIUM <SUMMARY>Risk is MEDIUM. The supplied Host, Origin, method, token, cookie, and loopback controls adequately implement the stated single-user laptop threat model; no remote authentication bypass was identified. Local cross-port cookie replay is real but explicitly and reasonably accepted within that boundary. Before broader rollout, stop placing the raw bearer token in host-captured stdout or guarantee redaction, and clearly prohibit shared machines and network forwarding/proxying. Confidence is moderate-high for the guard, but lower for the overall dashboard because route handlers, UI rendering, static-file confinement, config contents, and redaction implementations were not supplied.</SUMMARY> VERDICT: REQUEST_CHANGES - [security] Remove or reliably redact the full bearer-token URL from dashboard stdout before broader rollout; host transcripts otherwise become an additional persistent secret store. - [ambiguity] Make the rollout boundary explicit: single-user loopback only, with no shared machines, reverse proxies, tunnels, or port forwarding, and heightened warnings for content capture and PII display.
or:glm-5-3-flashx APPROVE
This reply has no summary line. The full response is below.
Full response, verbatim
## Review **Correctness of the guard**: The implementation matches the documented threat model. Host pinning blocks DNS rebinding and cross-port confusion (browsers always send the true port in `Host`). The `?t=` flow avoiding a 302 is correctly reasoned — a redirect from a `file://` opener would be cross-site and Chrome would withhold the Strict cookie; the meta-refresh same-site page is the right call. `SameSite=Strict` correctly covers the residual cross-origin GET risk (e.g. `<img src=".../api/runs">` from a hostile page sends no Origin but also no cookie). Constant-time compare with length pre-check is fine (length is not secret, 64 hex always). **Scope judgment**: The model — loopback bind, same-machine trust boundary, shared-machine opt-out — is the right model for a single-user developer laptop tool, and the code is consistent with it. Nothing serves write operations; GET/HEAD-only is enforced pre-routing. **Gaps worth fixing before broader adoption** (none are blockers for the stated scope): 1. **Token in stdout/transcripts** [security]: `urlLine` goes to stdout, which the host agent's transcript captures — and transcripts may sync to vendor clouds. The threat model treats the token as machine-local, but it now has an off-machine copy path. Recommendation: print a URL without the raw token (e.g. instruct "run `deliberation-mcp dashboard --open`", or print only the redirect-file path), or explicitly note the transcript-leak path in the threat model. Mitigated today by per-restart rotation, but a leaked token is valid until restart with no revocation. 2. **No expiry/revocation, cookie value = token** [security]: acceptable per scope, but for `capture: "content"` mode consider a separate stricter gate (re-enter token, or require the `?t=` grant per session) since the data is more valuable than metadata. 3. **Windows mode bits are advisory** [security]: `0600` on the state/redirect files is a no-op on NTFS/FAT; on Windows multi-user setups anyone with profile access reads the token. The docs say "do not enable on shared machines" — make the Windows case explicit in the warning, or gate startup on an effective-permission check. 4. **Redirect page persistence** [ops]: the opener file is only removed on `process.once("exit")`; a `SIGKILL`/crash leaves a tokenized file in the cache dir indefinitely. Delete it on first successful open, or after a short TTL. 5. **`Cache-Control` scope** [security, minor]: `no-store` is set only for `/api/`; `/` (which embeds nothing sensitive today) and `/assets/*` may be cached — fine, but if the UI ever inlines content-mode data, extend it. Also `?t=` responses are covered; good. 6. **Origin check nuance** [ambiguity, minor]: `https://localhost:<port>` is rejected (compared only against `http://`). Correct behavior, but worth a one-line doc note so a user behind an https proxy isn't confused. **Threat model itself**: Yes, it is the right model, and unusually honest — it explicitly names the cross-port cookie replay residual and accepts it within the same-user boundary. The one thing it understates is the transcript/stdout token path (item 1); amend it. Everything else checked and clean: static assets realpath-confined, no insecure deserialization, no injection surfaces (token compared, not interpreted), SSE backpressure bounded (`SSE_MAX_BUFFERED`), nosniff + CSP + textContent rendering appropriate for a read-only surface. VERDICT: APPROVE - [security] Token printed to stdout lands in host-agent transcripts, which may sync off-machine; the threat model doesn't cover this leak path and there is no revocation before restart. - [security] 0600 file modes are unenforced on Windows, so the state file and redirect page (both containing the token) are readable by other local users there; docs should gate or warn explicitly. - [ops] The 0600 redirect page persists after a crash/SIGKILL since cleanup runs only on `exit`, leaving a tokenized file on disk with no TTL. - [ambiguity] Behavior for `https://localhost` origins and the cookie-value-equals-token design are undocumented; state both in TECHNICAL.md.
| Issue | Raised by | Ruling | Reason |
|---|---|---|---|
| security The session credential is an ambient cookie whose value is the token itself, and cookies are not port-scoped, so the browser sends `dlb_dash` to every HTTP service on 127.0.0.1 and localhost. | host agent | accept | grok raises the same; the round 2 plan moves the credential out of an ambient cookie. |
| security The dlb_dash cookie is a long-lived bearer and is not port-scoped, so any 127.0.0.1 listener the browser later visits can replay it and read every dashboard route. | grok | accept | Same as the host issue; adopted as proposed. |
| security The live token is printed on stdout and remains valid in `?t=`, history, and the opener file for the whole process, so agent transcripts undo the argv and 0600 controls. | grok | accept | deepseek, kimi and glm raise the same leak path; the round 2 plan makes ?t= a one-time code that dies on first use. |
| scope The written model treats every local listener as trusted and leaves shared-machine refusal as a design-doc note. | grok | accept | Other UIDs, containers and dev servers share loopback without being the user; the round 2 plan rewrites the threat model's trust boundary. |
| security Token printed to stdout / agent transcript — `urlLine` in `server/dashboard/index.js`. | or:deepseek-v4-pro-0813 | accept | Same as the grok stdout issue. |
| security No logout or server-side token revocation — `guard`/`Set-Cookie` in `server/dashboard/server.js`. | or:deepseek-v4-pro-0813 | accept | The round 2 plan adds an idle lifetime and a revoke route. |
| security Shared-host/content gating is docs-only — no startup enforcement. | or:deepseek-v4-pro-0813 | defer | Real, but detecting a multi-user machine reliably is its own feature; the round 2 plan states the boundary in the threat model and lists enforcement as out of scope. |
| security Windows file-mode assumptions — `0600`/`0700` via `fs.chmodSync`/`mkdirSync` do not give the same ACL guarantees on Windows; state/redirect files may be more broadly readable on some profiles. | or:deepseek-v4-pro-0813 | accept | glm raises it too; the round 2 plan documents that Windows relies on the per-user profile ACLs. |
| ambiguity ). | or:deepseek-v4-pro-0813 | dismiss | A parse fragment of the reply's OWASP checklist that states no defect. |
| security None found in the reviewed access-control path; the high-risk items above are not blocking for the stated single-user default but should be resolved before shared-host or content-capture rollout. | or:deepseek-v4-pro-0813 | dismiss | Not an issue: the reply's closing note that it found no blocker. |
| security Remove or reliably redact the full bearer-token URL from dashboard stdout before broader rollout; host transcripts otherwise become an additional persistent secret store. | or:kimi-k3-1-pro | accept | Same as the grok stdout issue. |
| ambiguity Make the rollout boundary explicit: single-user loopback only, with no shared machines, reverse proxies, tunnels, or port forwarding, and heightened warnings for content capture and PII display. | or:kimi-k3-1-pro | accept | Folded into the threat model rewrite in the round 2 plan. |
| security Token printed to stdout lands in host-agent transcripts, which may sync off-machine; the threat model doesn't cover this leak path and there is no revocation before restart. | or:glm-5-3-flashx | accept | Same as the grok stdout issue and the deepseek revocation issue. |
| security 0600 file modes are unenforced on Windows, so the state file and redirect page (both containing the token) are readable by other local users there; docs should gate or warn explicitly. | or:glm-5-3-flashx | accept | Same as the deepseek Windows issue. |
| ops The 0600 redirect page persists after a crash/SIGKILL since cleanup runs only on `exit`, leaving a tokenized file on disk with no TTL. | or:glm-5-3-flashx | accept | The round 2 plan deletes the opener page as soon as its one-time code is used, and the code is dead after first use either way. |
| ambiguity Behavior for `https://localhost` origins and the cookie-value-equals-token design are undocumented; state both in TECHNICAL.md. | or:glm-5-3-flashx | dismiss | The server speaks plain HTTP only, so an https://localhost origin can never be its own and is rightly refused; the cookie-equals-token design is removed by the accepted credential change. |
Why the round closed this way. The panel split 2-2 among the four voices that answered: grok and openrouter:kimi-k3-1-pro voted REQUEST_CHANGES, openrouter:deepseek-v4-pro-0813 and openrouter:glm-5-3-flashx voted APPROVE but still listed issues, and openrouter:qwen3-8-max timed out at its 600 s ceiling. Every answering voice named the token on stdout, and grok matched the host's blind issue on the port-blind cookie. The host accepted 12 issues, deferred 1 and dismissed 3, so the remediation plan went to round 2.
revision One-time exchange code plus a header-only session secret instead of the token cookie; SSE tickets; idle lifetime and logout; only a dead code reaches stdout and disk; threat model narrows the trust boundary and documents Windows ACLs; shared-host enforcement deferred.
Round 2
Blind verdict. Before any reviewer answered, the host agent recorded REQUEST CHANGES with 1 issue of its own: Moving the credential out of a port-blind cookie into a header closes the round 1 gap, but the per-tab storage choice makes the dashboard unusable across tabs, so it needs one more change.
grok REQUEST CHANGES
HIGH. Top gaps: session secret in the URL fragment, pidfile/probe still tied to a replayable token, SSE logout not actually revoking live streams, non-atomic exchange, no re-open story. Confidence high from the plan plus the startup code shown. Unverified: exact probe call sites and whether the UI already uses inline scripts (CSP already forbids them).
Full response, verbatim
The direction is right: a one-time code, no cookie, and a header-only session secret removes the cross-port replay the current `dlb_dash` cookie allows. The rewritten boundary (other loopback listeners are not trusted) is the right model for what this server returns, including `capture: "content"`. It is not yet accurate or implementable as written. Several handoff and lifecycle holes would either keep a live credential on disk, put the 8-hour secret in the URL, or make logout fail to stop an open stream. Shared-host startup refusal can stay deferred. **Threat summary:** Adequate only after the exchange, pidfile, and SSE revocation stories are closed. Loopback bind, Host/Origin pinning, GET/HEAD, CSP, and nosniff should stay. **Critical vulnerabilities:** - Secret in `/#s=`: that is the implicit-flow leak (history, address bar, extensions, URL-recording client features), and fragment-on-redirect is client-dependent. Deliver the session secret only in the one-time exchange body. - `statePath` still stores `token`, and `probeInstance` redeems `/?t=`. The plan never replaces that path, so the code is burned before the browser opens or a live secret remains on disk past the opener unlink. `exit` does not run on SIGKILL. - Logout and idle expiry, as specified, do not abort an already-accepted `/api/events` stream, so revocation does not stop capture content. **High-risk issues:** - “Accepted once” is not specified as consume-before-respond. Two in-flight `?t=` requests can both win. - Native `EventSource` retries the same spent `?ticket=` and will sit on 401. Reconnect has to mint a new ticket. Idle vs an open stream is undefined. - Closing the tab drops `sessionStorage` with no re-mint path except full restart. That will push a durable secret back into the pidfile or stdout. **Recommendations:** - Exchange: atomic single-use, 10-minute bound, `Cache-Control: no-store`, 200 same-origin document (not a fragment redirect), secret only in that body, boot script reads it and `replaceState`s `?t=` away. Hex-only, constant-time, memory-only. - Re-open: a new one-time code for an already-running process, 0600 opener, nothing redeemable left in the pidfile. Probe liveness without presenting the code (`--stop` already uses pid, `procStartedAt`, and argv). - SSE: 32-byte single-use ticket, bound to the session, not logged; logout and expiry revoke unused tickets and end that session’s streams; client-driven reconnect. State whether an open stream refreshes the 8-hour idle timer. - Threat model: peers who can read the user profile, browser storage, or loopback payloads (raw socket, privileged shared netns) are out of scope. Stdout exposure is not remotely redeemable by itself. Windows DACLs do not enforce 0600, so multi-user Windows stays unsupported. Ship that on every surface AGENTS.md lists (README, SETUP, tool-guide, commands, schema), not only `design-decisions.md` and TECHNICAL.md. **Risk rating:** HIGH until those land. The control design is sound; the plan as specified is not. <SUMMARY> HIGH. Top gaps: session secret in the URL fragment, pidfile/probe still tied to a replayable token, SSE logout not actually revoking live streams, non-atomic exchange, no re-open story. Confidence high from the plan plus the startup code shown. Unverified: exact probe call sites and whether the UI already uses inline scripts (CSP already forbids them). </SUMMARY> VERDICT: REQUEST_CHANGES - [security] Do not put the session secret in the URL fragment or query. A redirect to `/#s=<secret>` leaves an 8-hour credential in history, the address bar, and anything that records the full URL, and fragment-on-redirect is client-dependent. Return it only in a `Cache-Control: no-store` one-time exchange body that a same-origin boot script reads, then strip `?t=` with `replaceState`. - [security] Reconcile `statePath` and `probeInstance`: today they store the token and redeem `/?t=`. As written, the probe burns the one-time code or a live secret stays on disk for the process lifetime (crash skips `exit`). Secrets must be memory-only; liveness checks must not present the exchange code. - [security] Logout and idle expiry must abort already-open `/api/events` streams and invalidate unused tickets for that session. A ticket checked only at connect keeps streaming capture content after revocation. Tickets need 32-byte entropy, atomic single-use, and session binding, and must not be logged. - [security] One-time exchange must be consume-before-respond so two in-flight `?t=` requests cannot both receive a session secret. Add a parallel-use test, not only a sequential second use. - [correctness] Do not rely on native `EventSource` retry: it reuses the spent `?ticket=` and sticks on 401. Specify a client reconnect loop that mints a new ticket with the header, and whether an open stream refreshes the 8-hour idle timer. - [ops] Closing the tab drops `sessionStorage` and the plan allows re-entry only via full restart, which will tempt a durable secret back onto disk or stdout. Specify an in-process re-mint of a one-time code (0600 opener, not a long-lived printed secret) and update README, SETUP, tool-guide, and commands, not only the threat-model docs.
or:deepseek-v4-pro-0813 REQUEST CHANGES
Risk rating: HIGH. The split-secret/header-only/SSE-ticket approach is correct, but the plan does not address the state file still holding a live token, leaves `probeInstance()` consuming the one-time code, under-specifies `/api/events` route auth, and may expire active SSE sessions. Missing context that would raise the rating: exact call sites of `probeInstance`, whether the state-file `token` field is dropped, and whether the server unlinks the opener page on exchange (not only on process exit).
Full response, verbatim
**Threat Summary**: The plan is a real improvement over the current cookie-equals-token design. Splitting the printed one-time exchange code from a header-only session secret, moving the secret out of an ambient cookie path, adding SSE tickets, and bounding lifetimes are all correct directions. However, as written it has several implementation-level gaps that would either break the dashboard or leave live credentials in predictable on-disk locations, so it is not ready to approve unchanged. **Critical Issues**: - [security] `statePath` currently stores `token` in the state file. Under the new plan that value would be the live one-time exchange code (or, worse, a session secret if someone reuses the field). A local process running as the same user can read the predictable `<XDG cache>/deliberation/` file and redeem the code before the user, then read all dashboard data. Remove all auth material from `statePath`; keep only `pid`/`port`/`argv`/`procStartedAt` for `--stop`. - [correctness] `probeInstance()` calls `GET /?t=${token}` and expects a `dlb_dash=` `Set-Cookie`. With a one-time exchange code and no cookie, any surviving probe/liveness/`--stop`/`--restart` flow consumes the code and fails. It must be replaced with an unauthenticated health/identity probe or otherwise not call the exchange endpoint with the live code. - [ambiguity] “Every `/api/*` route requires `X-Dashboard-Session`” conflicts with “`/api/events` takes `?ticket=`”. `EventSource` cannot send the header, so the guard must allow the ticket credential on `/api/events` only and reject ticket/query credentials on every other `/api/*` route. Specify and test the valid-ticket-without-header case, not just ticket expiry. - [correctness/ops] 8-hour idle expiry conflicts with a long-lived SSE connection. If idle is measured by request completion, a user watching `/api/events` makes no further requests and gets logged out mid-use. Idle must include open SSE connections, or the client must periodically re-arm via `/api/ticket`; otherwise the dashboard silently stops after 8h. - [security] The exchange response (`/?t=...`) must set `Cache-Control: no-store` and keep `Referrer-Policy: no-referrer`. The current code sets no-store only for `/api/*`, and the redirect fragment carries the session secret; caching/proxying the response would defeat the design. - [ops] There is no re-entry path after the tab closes: `sessionStorage` is per-tab and the code is single-use. A closed tab means the user must restart the dashboard process to view it again. This should be intentional and documented, or a safe re-auth command provided. **Risk Rating**: HIGH (plan directions are sound, but the above would introduce availability failures or preserve a live-credential file leak). `<SUMMARY>` Risk rating: HIGH. The split-secret/header-only/SSE-ticket approach is correct, but the plan does not address the state file still holding a live token, leaves `probeInstance()` consuming the one-time code, under-specifies `/api/events` route auth, and may expire active SSE sessions. Missing context that would raise the rating: exact call sites of `probeInstance`, whether the state-file `token` field is dropped, and whether the server unlinks the opener page on exchange (not only on process exit). `</SUMMARY>` VERDICT: REQUEST_CHANGESor:qwen3-8-max TIMEOUT
No answer:
Call deadline expired. A failed call is not a vote and does not count toward convergence.or:kimi-k3-1-pro REQUEST CHANGES
The plan fixes the principal cross-port credential disclosure and states a substantially better trust boundary. Confidence is high based on the supplied server and startup code. Blocking gaps remain: the existing instance probe is incompatible with a one-time, cookieless exchange; logout and idle expiry must revoke tickets and active SSE streams; and EventSource needs a fresh-ticket reconnect flow. Shared-host enforcement can remain deferred while that deployment is explicitly unsupported.
Full response, verbatim
**Threat Summary**: The exchange-code/header-only-session design correctly removes the port-insensitive bearer cookie and materially improves protection against other local listeners. The revised trust boundary is appropriate for a single-user machine with direct loopback access. However, the plan has one startup compatibility defect and two SSE lifecycle gaps that must be resolved before implementation. **Critical Vulnerabilities / Blocking Issues** - **Startup probing consumes or rejects the exchange**: `probeInstance()` in `server/dashboard/index.js` requests `/?t=${token}` and currently expects a `dlb_dash` cookie. Under the plan it will always return false because the exchange sets no cookie. Merely updating it to accept the redirect would be worse: probing would consume the one-time code and create an orphaned session, preventing the browser from exchanging it. Replace this with a non-consuming instance-identity check and test that repeated probes leave the exchange code usable. - **Logout and idle expiry do not necessarily revoke SSE access**: Tickets must be bound to their issuing session and accepted only while that session remains active. Logout, idle expiry, and restart must invalidate outstanding tickets and terminate already-open SSE responses. Otherwise a pre-minted ticket can still work after logout, and an established stream can continue receiving journal events indefinitely after revocation. - **Single-use tickets break the existing reconnect behavior**: Native `EventSource` reconnects to the same URL, so its first reconnect reuses the consumed ticket and receives 401. The UI must explicitly obtain a fresh ticket for each reconnect and either preserve the last event ID or perform a deliberate full resynchronization. Add a dropped-connection test; otherwise the live dashboard silently stops updating after an ordinary disconnect. **Recommendations** - Clarify that `/api/events` is the ticket-only exception to “every `/api/*` route requires the header”; never accept the session secret itself as a query parameter. - Define whether an open SSE stream counts as activity for idle expiry. Keepalive frames should not accidentally make a session immortal unless that is explicitly intended. - On 401 or logout, the UI should close its stream, stop retrying, clear `sessionStorage`, and explain that restart is required for a new exchange code. Document the one-exchange-per-start limitation for additional tabs or browsers. - Retain `Cache-Control: no-store` on the exchange response and scrub the fragment even if writing to `sessionStorage` fails. - Update every affected user-facing surface required by `AGENTS.md`, not only the two design documents: README, SETUP, tool guide, command prose, and stale references to `dlb_dash`, cookie authentication, and reusable `?t=` URLs. - Deferring automatic shared-host detection is reasonable now that shared machines are explicitly unsupported. No material performance concern is apparent. **Risk Rating**: HIGH until the probe and SSE revocation issues are addressed; the underlying authentication design is otherwise sound. <SUMMARY>The plan fixes the principal cross-port credential disclosure and states a substantially better trust boundary. Confidence is high based on the supplied server and startup code. Blocking gaps remain: the existing instance probe is incompatible with a one-time, cookieless exchange; logout and idle expiry must revoke tickets and active SSE streams; and EventSource needs a fresh-ticket reconnect flow. Shared-host enforcement can remain deferred while that deployment is explicitly unsupported.</SUMMARY> VERDICT: REQUEST_CHANGES - [correctness] probeInstance() must be replaced with a non-consuming probe; its current request/cookie check fails, and accepting the exchange instead would burn the one-time code. - [security] Logout, idle expiry, and restart must invalidate session-bound tickets and terminate active SSE streams so revoked sessions cannot continue receiving dashboard data. - [correctness] The UI must acquire a new ticket for every EventSource reconnect and preserve or deliberately rebuild its event cursor.or:glm-5-3-flashx REQUEST CHANGES
This reply has no summary line. The full response is below.
Full response, verbatim
## Review **Threat model (item 7):** The rewrite is the right model. Explicitly moving other local listeners, other OS users and containers out of the trust boundary, and stating Windows relies on profile ACLs, matches what the design actually delivers. Supported/unsupported lists are clear and actionable in docs. Good. **Credential split (items 1–2):** Sound. Header-only secret kills the ambient-cookie cross-port replay that round 1 flagged; fragment delivery plus `history.replaceState` keeps the secret out of server logs and Referer; sessionStorage is origin-scoped and CSP confines script. Serving `/` and `/assets/*` unauthenticated is fine — it's public repo code. **SSE ticket (item 3):** Correct approach given EventSource's header limitation. Single-use, 30 s, constant-time compared. Note the UI must fetch a fresh ticket on every reconnect (Last-Event-ID resume), and a browser that opens two EventSource races (retry firing before the first CONNECT lands) can burn a ticket — the boot script should tolerate one 401-and-refetch cycle. Minor, implementable. **Real gaps:** 1. **`probeInstance` is broken by this plan and the plan doesn't mention it.** `index.js` probes with `GET /?t=<token>` and requires `statusCode === 200` plus a `dlb_dash=` Set-Cookie. After the change: no cookie is ever set, and the probe itself *consumes the one-time exchange code* (or fails against an already-used one). Duplicate-start detection and any flow relying on the probe must be redesigned (e.g. a separate unauthenticated `/api/ping` that returns a startup nonce from the state file, or probe on a dedicated endpoint that doesn't accept `?t=`). This is a startup/ops correctness bug, not a polish item. 2. **Idle-expiry semantics vs. SSE are undefined.** Does an open `/api/events` stream keep the session non-idle? If not, an actively-watching dashboard dies at 8 h mid-stream; if yes, say how (each event? periodic keepalive?) and specify whether SSE connects revalidate the secret against the current idle window. Also specify what an established SSE does when the session is revoked by logout (should close, not linger). 3. **One-shot exchange has no recovery path.** If the browser fetch is interrupted after consuming the code (or the user opens the URL twice in tabs), the user is locked out until a full restart. Acceptable for a local tool, but the docs and the error page for a second/late `?t=` should tell the user exactly that ("run `/deliberation:dashboard restart`"), and `?t=` on an *expired-but-unused* code should say "expired" vs "used" ideally not distinguish — 401 for both is fine, but then the message must be generic. 4. **Ops:** the printed URL line still lands in host transcripts (acknowledged, and now carrying only a dead code — fine), but the plan should state the transcript-leak rationale explicitly in TECHNICAL.md so a future reader doesn't "fix" it back to something worse. Also document that sessionStorage means a second tab of the same origin works only via duplicate-tab/session-restore flows, and dies on browser restart — user-facing behavior worth one line in SETUP.md. Everything else — constant-time comparisons extended to tickets, Host/Origin pinning retained, GET/HEAD only, CSP unchanged, opener deletion timing, 0600 state file with chmod-after-write, deferred multi-user gating (reasonable defer with docs) — is correct and appropriately scoped. Item 8's test list is good; add: probe/duplicate-start behavior, SSE reconnect with expired ticket, and revoked-session SSE teardown. VERDICT: REQUEST_CHANGES - [correctness] `probeInstance` in server/dashboard/index.js consumes the one-time exchange code and asserts a `dlb_dash=` Set-Cookie that the plan removes; duplicate-start detection breaks and is unaddressed. - [ambiguity] Idle expiry vs open SSE streams is unspecified: what refreshes the idle window, and what happens to an established `/api/events` on logout/revocation. - [ops] No user-facing recovery path for a burned/failed exchange; the 401 page and docs must direct users to restart to get a new code.
| Issue | Raised by | Ruling | Reason |
|---|---|---|---|
| correctness sessionStorage is per tab. | host agent | accept | grok and deepseek raise the same; v3 keeps the secret in localStorage (origin- and port-scoped) with the server-side idle expiry, and adds an in-process re-mint of a one-time code. |
| security Do not put the session secret in the URL fragment or query. | grok | accept | A fragment survives in history and in anything that records full URLs; v3 has the boot script fetch the secret from a no-store JSON exchange and strip ?t= with replaceState. |
| security Reconcile `statePath` and `probeInstance`: today they store the token and redeem `/?t=`. | grok | accept | Checked index.js: the state file holds the token and probeInstance calls /?t= and expects dlb_dash. v3 keeps every secret in memory only and probes an unauthenticated identity route. |
| security Logout and idle expiry must abort already-open `/api/events` streams and invalidate unused tickets for that session. | grok | accept | A ticket checked only at connect would keep streaming content after revocation; adopted as proposed. |
| security One-time exchange must be consume-before-respond so two in-flight `?t=` requests cannot both receive a session secret. | grok | accept | Node handles both requests on one thread, but the plan must say consume-then-respond and test the parallel case; adopted. |
| correctness Do not rely on native `EventSource` retry: it reuses the spent `?ticket=` and sticks on 401. Specify a client reconnect loop that mints a new ticket with the header, and whether an open stream refreshes the 8-hour idle timer. | grok | accept | v3 replaces native retry with a client loop that mints a fresh ticket and resumes from Last-Event-ID; an open stream does not refresh the idle timer. |
| ops Closing the tab drops `sessionStorage` and the plan allows re-entry only via full restart, which will tempt a durable secret back onto disk or stdout. | grok | accept | Same as the host per-tab issue; v3 adds `dashboard --code`, which asks the running process for a new one-time code over the authenticated loopback, and lists every doc surface. |
| security statePath` currently stores `token` in the state file. | or:deepseek-v4-pro-0813 | accept | Same as the grok statePath issue. |
| correctness probeInstance()` calls `GET /?t=${token}` and expects a `dlb_dash=` `Set-Cookie`. | or:deepseek-v4-pro-0813 | accept | Same as the grok probe issue. |
| ambiguity “Every `/api/*` route requires `X-Dashboard-Session`” conflicts with “`/api/events` takes `?ticket=`”. `EventSource` cannot send the header, so the guard must allow the ticket credential on `/api/events` only and reject ticket/query credentials on every other `/api/*` route. | or:deepseek-v4-pro-0813 | accept | v3 accepts a ticket on /api/events only and rejects query credentials on every other route, with a test for a valid ticket without the header. |
| security The exchange response (`/?t=...`) must set `Cache-Control: no-store` and keep `Referrer-Policy: no-referrer`. | or:deepseek-v4-pro-0813 | accept | Today no-store is set only on /api/*; v3 sets it on the exchange routes too. |
| ops There is no re-entry path after the tab closes: `sessionStorage` is per-tab and the code is single-use. | or:deepseek-v4-pro-0813 | accept | Same as the host per-tab issue. |
| correctness probeInstance() must be replaced with a non-consuming probe; its current request/cookie check fails, and accepting the exchange instead would burn the one-time code. | or:kimi-k3-1-pro | accept | Same as the grok probe issue. |
| security Logout, idle expiry, and restart must invalidate session-bound tickets and terminate active SSE streams so revoked sessions cannot continue receiving dashboard data. | or:kimi-k3-1-pro | accept | Same as the grok revocation issue. |
| correctness The UI must acquire a new ticket for every EventSource reconnect and preserve or deliberately rebuild its event cursor. | or:kimi-k3-1-pro | accept | Same as the grok reconnect issue. |
| correctness probeInstance` in server/dashboard/index.js consumes the one-time exchange code and asserts a `dlb_dash=` Set-Cookie that the plan removes; duplicate-start detection breaks and is unaddressed. | or:glm-5-3-flashx | accept | Same as the grok probe issue. |
| ambiguity Idle expiry vs open SSE streams is unspecified: what refreshes the idle window, and what happens to an established `/api/events` on logout/revocation. | or:glm-5-3-flashx | accept | Same as the grok reconnect and revocation issues; v3 specifies both. |
| ops No user-facing recovery path for a burned/failed exchange; the 401 page and docs must direct users to restart to get a new code. | or:glm-5-3-flashx | accept | v3's 401 page names `dashboard --code`. |
Why the round closed this way. Every answering voice (4 of 5) voted REQUEST_CHANGES on the remediation plan; openrouter:qwen3-8-max timed out again. All four found that probeInstance and the state file would burn or store the new one-time code, and three that revocation must end open SSE streams. The host accepted all 18 issues, but round 2 was the cap (maxRounds 2), so the loop ended unresolved with a third plan that no reviewer saw.
revision Secrets memory-only with an unauthenticated identity probe; secret delivered in a no-store exchange body, never a URL; localStorage so tabs share it; tickets scoped to /api/events, session-bound and revoked with their streams; client reconnect loop; dashboard --code for re-entry; wider docs and tests.
Outcome
UNRESOLVED after 2 round(s)
Still in the report
What the run did not fix stays listed.
- Refusing capture: "content" or showPII on a detected multi-user machine needs a reliable detection method of its own; deferred and listed as out of scope.
- probeInstance's comment says the dashboard answers the token with a 302, while the server answers 200 with a meta refresh.
- /api/events has no cap on concurrent streams.