Skip to content

🤖 fix: harden the dev-server browser-open recipe (warning first, named failures, per-sandbox session) - #7911

Merged
ThomasK33 merged 2 commits into
mainfrom
fix/dev-server-skill-hardening
Nov 4, 2026
Merged

ThomasK33 merged 2 commits into
mainfrom
fix/dev-server-skill-hardening

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Four small fixes to the browser-open recipe in .xum/skills/dev-server-sandbox/SKILL.md that the advisor raised on #7910. They change the skill text only.

Background

#7910 made the recipe turn agent-browser's credential-less stream off before the token goes in. The advisor's review of that PR found four gaps. This PR closes them.

Implementation

  1. The warning for hosts with other accounts now comes before the recipe, and it says more. Chrome's DevTools port is open from the moment Chrome launches, not only while the page is open. Another account can catch the token while the page navigates, or read it from the page's storage afterwards, and the token works until the sandbox restarts. The Windows daemon-port note moved up with it.

  2. Each failure message names the step that failed: 'open about:blank' failed, 'stream disable' failed and the stream is still on, or 'stream status' does not show the stream off. All end with "so the token was not sent". A stream disable that exits 1 because the stream was already off is not a failure when the status check shows it off.

  3. The status check is a node check of data.enabled === false on the JSON (off()), not a grep of the text. Unreadable JSON counts as "not off".

  4. The session name is xum-sandbox-$VITE_PORT, so two sandboxes in one workspace do not share a session. The later commands in the text use the same name.

  5. The recipe refuses to start unless VITE_PORT is digits and $XUM_ROOT/server.lock is readable. An unset VITE_PORT would otherwise build http://localhost:/?token=..., which is port 80. Nothing is sent and no agent-browser command runs.

  6. The warning says the default token is new for every run and works until the sandbox restarts, and that a token set with XUM_DEV_SERVER_AUTH_TOKEN works for as long as you reuse it.

  7. The three protections are described as extra protection on a host where you are the only account. On a shared host they are not enough, because of the DevTools port.

The recipe also gets two small shell helpers (ab runs agent-browser --session "$S", fail prints the message). The post-load re-check, the close on a re-enabled stream, and the token redaction are unchanged. Items 5 to 7 come from the root checker's review of the first version of this PR.

Validation

I ran the recipe as written (extracted from the skill, session xum-sandbox-<vite port>) against make dev-server-sandbox with a token of Xq+9/aZ=_proof&k#z, and probed as nobody:

  • Control, a plain session: the stream port answers nobody with 101.
  • Recipe: the stream port recorded just before stream disable (the page is about:blank) answered nobody with 101. After the recipe, nobody got Connection refused there, and stream status said Streaming disabled. The session's daemon had no TCP listener left.
  • The recipe printed nothing on stdout and 33 bytes on stderr ([agent-browser] launched browser), with 0 hits for the raw and URL-encoded token. The page loaded authenticated (the first-run provider dialog) and its URL had no token.
  • The first run on the freshly started sandbox timed out in the batch (Operation timed out) and exited 1 with no token in the output. The rerun on the same sandbox passed. I did not find the cause: the sandbox was still warming up.
  • Unset or bad inputs (stand-in tool, plus one run with the real tool): VITE_PORT unset, empty or not digits, XUM_ROOT unset, and an XUM_ROOT without server.lock each exit 1 with set VITE_PORT (digits) and XUM_ROOT (the sandbox root, with a server.lock), so the token was not sent. The stand-in saw 0 calls, and no output held the token. With the real tool and VITE_PORT unset: exit 1, nothing on stdout, and no xum-sandbox- session was created. The real-tool proof above was rerun on the final recipe with the same result.
  • Stand-ins for agent-browser (they log every call). Each row is exit code and what the recipe printed:
    • open about:blank fails: exit 1, 'open about:blank' failed, so the token was not sent, no batch call.
    • stream disable fails and status says on: exit 1, 'stream disable' failed and the stream is still on, ....
    • stream disable works but status says on: exit 1, 'stream status' does not show the stream off, ....
    • Status prints something that is not JSON: the same 'stream status' message.
    • stream disable exits 1 because the stream is already off: exit 0, token sent.
    • The batch echoes the URL: exit 0 prints nothing, exit 1 prints ?token=<redacted> and exits 1.
    • The stream turns on after the batch: exit 1 with session was closed, and with a failing close exit 1 with could not be closed: close it yourself.
    • 0 hits for the token in every output. Every call carried --session xum-sandbox-<port>, and a second port gave a second name.

Risks

Skill text only. The remaining exposure is the one the new warning describes: Chrome's DevTools port has no credential, so the recipe is for hosts where you are the only account.


Generated with xum • Model: anthropic:claude-sonnet-5-5 • Thinking: xhigh • Cost: $43.87

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-04T02:55:28.124085Z e518b2e Manual request
🔒 Security Review ✅ Completed 2026-11-04T02:57:50.533881Z e518b2e Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Head: c39e3fa

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: c39e3fa8c9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: c39e3fa8c9

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

…M_ROOT lockfile; clarify token lifetime and the shared-host limit
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

Head: e518b2e

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: e518b2ecab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: e518b2ecab

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33
ThomasK33 added this pull request to the merge queue Nov 4, 2026
Merged via the queue into main with commit 0b688bf Nov 4, 2026
26 checks passed
@ThomasK33
ThomasK33 deleted the fix/dev-server-skill-hardening branch November 4, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant