carlos / platform Public

Ledger · claim-ux-edge

Human

<task-notification> <task-id>a3b2569a598bdee7c</task-id> <tool-use-id>toolu_015NbV1bbsuyPZT6cE73QSXM</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/a3b2569a598bdee7c.output</output-file> <status>completed</status> <summary>Agent "Opus review edge banner/moved + census" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>**Verdict: APPROVE WITH NITS.** None of the nine questions turned up a security problem. **Tests:** `go test ./internal/edge -run TestDemo` passed (niced) with one subtest skipped. `TestDemoAPIAliasBoundary/local_transports` fails in my sandbox because creating a unix socket is not permitted there. It is not related to this branch. ## Security and correctness - **Only moved.css is served.** `serveDemoAsset` (`internal/edge/demo_banner.go:107-113`) compares the path exactly against `moved.css` or `banner.css` and returns 404 for anything else. The bytes are compiled in. The moved-host branch (`demo_moved.go:66`) also needs the exact path and GET/HEAD. - **Unnoticed hosts can't reach it.** That branch only runs after `demoHost`, a lookup in the signed, verified notice map, and the `ExpiresAt` check. Without a valid notice, the request falls through as before. One small change: live demo hosts (`demo_traffic.go:296`) now also return moved.css instead of a 404. The bytes are fixed and the reserved prefix already covered that path, so nothing is revealed. - **The style-src origin can't be steered.** `r.Host` only reaches line 73 after `demoAuthority` passes. That allows only `host` or `host:&lt;1-65535 digits&gt;`, and rejects `;`, spaces, `@`, trailing dots, wildcards and CR/LF. No header injection or redirect of the stylesheet is possible. - **The other CSP directives and the sandbox are unchanged.** `style-src` is the only insertion. - **HEAD, POST and the refusal are unchanged.** HEAD is bodyless. POST, PUT and OPTIONS still return 410 with `MovedMethodRefusal`, including on moved.css (tested). - **The banner markup is escaped.** Hours come from `strconv.Itoa`. The date goes through `stdhtml.EscapeString`. The moved page uses `html/template`. - **A missing or garbage `DemoExpiresAt` fails safe.** Zero or negative means no counter. A huge value saturates `Duration` and doesn't panic. - **The expiry is display only.** It is captured into the transport, and admission still uses `demoRouteOK`. - **The banner CSS is scoped.** Every rule is under `#carlos-demo-warning`, and the old `body { padding-top }` rules are gone. As before, a tenant's `!important` rules or scripts can still hide the banner. ## Findings **Low, `internal/edge/demo_moved.go:73`:** on port 80, `redirectDemoRequest` (`demo.go:91`) serves the moved page over plain HTTP. The CSP names an `https://` source, so the browser blocks the stylesheet and the page shows unstyled. A `Host: x:80` header also produces `https://x:80/...` in the header. This is cosmetic only. - Fix: build the source from the request's actual scheme and drop the port when it is the default, or redirect moved hosts on port 80 to HTTPS. **Nit, `internal/edge/demo_assets/banner.css:14-16`:** the banner changed from `position: fixed` to `position: sticky` inside the page flow. A tenant `body { display: flex }` or an ancestor with `overflow: hidden` can move the banner sideways or stop it sticking. It is still shown. - Fix: accept this, or add `width: 100%; flex: 0 0 100%`. **Nit:** the census card's units leave out `serveDemoAsset` and `serveDemoMoved`. The envelope covers them and they make no root reads. ## Census Neither file reading nor registry access is widened, and nothing a tenant, app or box agent can create or name is newly opened or followed. - `internal/edge/demo_assets/banner.css` external: **APPROVE**. Fixed embedded bytes with no imports or URLs. - `internal/edge/demo_banner.go` `transformDemoHTMLResponse`: **APPROVE**. Same 512-byte sniff and injector. It only gains an int64. - New `internal/edge/demo_assets/moved.css` external: **APPROVE**. Fixed embedded bytes, served only at the exact reserved path. - `internal/edge/demo_traffic.go` `Edge.demoProxy` (+`registry:DemoExpiresAt`): **APPROVE**. It reads a field already on the route that admission already uses. The value is used for display only and grants no authority. - Envelope `internal/edge`: **APPROVE**. The changed functions are `demoBannerMarkup`, `serveDemoAsset`, `serveDemoMoved` and `demoNoticeDate`. The new admission is gated on the signed notice plus its expiry, and serves fixed bytes only. No check the basis relies on is weakened. - Envelope `internal/edge/demo_assets`: **APPROVE**. Reviewed at tip 7423dd50. I created no scratch files.</result> <usage><subagent_tokens>71341</subagent_tokens><tool_uses>12</tool_uses><duration_ms>225620</duration_ms></usage> </task-notification>

Human

<task-notification> <task-id>bv3s3e1bm</task-id> <tool-use-id>toolu_01HWnnB7MbJkawWw5DrVSFPW</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bv3s3e1bm.output</output-file> <status>completed</status> <summary>Background command "sleep 45; until amadan ci status carlos/platform -branch claim-ux-edge 2&gt;&amp;1 | head -1 | grep -q '@ 7423dd50'; do sleep 30; done; while amadan ci status carlos/platform -branch claim-ux-edge 2&gt;&amp;1 | head -1 | grep -q 'running\|queued\|pending'; do sleep 60; done; amadan ci status carlos/platform -branch claim-ux-edge 2&gt;&amp;1 | head -3" completed (exit code 0)</summary> </task-notification>

Human

<task-notification> <task-id>bskpnfskk</task-id> <tool-use-id>toolu_01Y28gpDBu4ogC87ZnJvS8Vj</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bskpnfskk.output</output-file> <status>completed</status> <summary>Background command "amadan ci rerun carlos/platform -commit 7423dd50 2&gt;&amp;1 | tail -1; sleep 30; while amadan ci status carlos/platform -branch claim-ux-edge 2&gt;&amp;1 | head -1 | grep -q 'running\|queued\|pending'; do sleep 60; done; amadan ci status carlos/platform -branch claim-ux-edge 2&gt;&amp;1 | head -1" completed (exit code 0)</summary> </task-notification>

Human

<paseo-system version="1" kind="agent-message" source-agent-id="8a3d302a-eac7-407c-b61c-f5ccc66b5544" message-id="524a83bf-a033-4fe4-a5c5-806932542d1a"> Agent manager 8a3d302: release agent d99e59f cuts v0.34.22 (dev canary only: sophie + the demo box), with your claim check before restarts; it sends you &apos;canary done&apos;. Your console change later takes the next free number; ask me first. </paseo-system>

Human

<task-notification> <task-id>bffrqyozr</task-id> <tool-use-id>toolu_01XtW6XsnEV72U8J9u5EDmvs</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/22215d20-2b53-4378-8426-ae55e2362d13/tasks/bffrqyozr.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.cache/tmp/cux; until [ -f $S/a/done ]; do sleep 30; done; tail -1 $S/a/log; cat $S/a/final.md" completed (exit code 0)</summary> </task-notification>