Repository navigation
Board: one password set in a terminal, no random secret, no Tailscale coupling (T229) - #115
Merged
Merged
Conversation
…aders (T229) - Setup and ensure write no secret. An old "secret" still loads but signs no one in. - Until a password is set, every request that is not the Mac path gets 403 that names the set-password command; the ensure line says the same. - board --set-password refuses when its input is not a terminal. - The sign-in rule keeps X-Forwarded-* and Forwarded and drops Tailscale-* names. - The board guide describes a private HTTPS tunnel that adds X-Forwarded-For, and says that a raw TCP forward bypasses the sign-in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…config (T229) - The board password rule refuses, in every mode, a command that runs the board command with --set-password, and a command, Read or Grep that names the board config (board.json in a sage-board folder, or ~/.config/sage-board). The board command may name its config after --config. - The PreToolUse matcher now sends Read and Grep to the hook. - The board note tells the chief to give the owner the set-password command to run in Terminal. - README: what's new and the board section. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ok limits (F-T229-7, F-T229-8) The 403 away from the Mac is one fixed sentence; the exact set-password command stays only in the output of board --ensure on the Mac. The guide no longer claims that the terminal check stops an agent: the hook stops ordinary command shapes only, and full protection needs the sandbox. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d covers file tools (F-T229-4, -5, -6, -8, -9) - The set-password option counts in any word or quoted argument, with quotes and backslashes taken out, unless every program is grep or rg. - A board command takes no variable, substitution, pattern or xargs words. - Each path word resolves against its working folder (., .., //, ~, links) and matches only ~/.config/sage-board: the folder, board.json and the temporary .board-*.json files. Repository paths and search words such as board.json pass. - A recursive search, copy, move or link of that folder or a folder above it is refused, and so is the Grep tool there. - Write, Edit, MultiEdit and NotebookEdit get the real-path check. - A line the reader cannot read is refused when it names the board or a config. Each word is checked once per call, so 1 MB stays fast. - One table test for the chief, an agent and a plain session. - The README no longer claims that the hook stops every agent. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…F-T229-13, -14, -17, -18, -19) - F-T229-17: a linear matcher replaces the path regex. It steps through the path once per piece, so no word makes it backtrack; above 16 pattern pieces a word keeps only its first and last text (fail closed). - F-T229-18: the rule checks the value of key=value words, the path of file:// URLs, the git -C folder for the path words after it, the words of an xargs here-string, and texts with a slash in node -e or python3 -c code (also F-T229-13). - F-T229-19: the terminal tool's cwd is the folder of its command. - F-T229-14: the Glob tool goes to the hook and has the Grep path check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Ls, curl files and interpreter stdin (F-T229-20, -21, -22, -24) - F-T229-20: a path resolves with one lstat for each new folder in a call, and realpath only for a link. A pattern word whose text is not in the config path stops early. real() starts a path over 4096 characters within them. The gh rule stats a file once before its realpath. 1 MB shapes now take 0.02 to 1.4 s of CPU (the old code: 3 to 69 s). - F-T229-21: a word over 4096 characters with a pattern, a variable, board or .config fails closed. - F-T229-22: a file: URL with any number of slashes, with and without its query and fragment; the files that curl reads after @ or =<. - F-T229-24: an interpreter's code on stdin is read as its code argument. Co-Authored-By: Claude Opus 5.5 <[email protected]>
README What's new: keep both first lines. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ory has (F-T229-27) T53 asserted 2 timing bounds; a justified bound in another test broke it. It now counts the bounds before and after the sample escape, so the escape adds exactly 1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ounds CPU time only (F-T229-28, F-T229-29) F-T229-29: the cheap path walk caught the too-many-links error of a link loop and read the part as missing, so an agent could touch or rm through a loop. The walk now lets the error through, and the logbook rule refuses the command, as before the walk. A table test covers writes, a read and the chief. F-T229-28: the F-T229-20 test failed under load on its 10 s wall-clock kill. Each shape now runs in a child that measures the hook's own CPU time; a 120 s wall-clock limit only stops a hung test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s for a restart (F-T229-32) A server of older code can still take the old random secret, so ensure no longer says that phone access is off for it: it prints the stop command and asks for the board again. It decides by the start time against the code's own file times, not by the secret key in the config, which stays until set-password and would ask for a restart again after every restart. The allowedHosts line now says how to turn phone access on (QA R836). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 11, 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.
Sage task T229. The board has no random secret any more. On the Mac it needs no sign-in. Through a private HTTPS tunnel it needs one password that the owner sets once in a terminal; until then, access from outside the Mac is off. No agent can set the password or read the board config. The board code names no tunnel vendor.
References #108 (T216, already closed): this replaces its "random secret" with the owner's password.
What changes for the owner
board --setup/--ensurewith no configsecretsecretshow boardline, allowedHosts set, no passwordboard --set-passwordfrom a pipe or an agentsecret--set-passworddrops itTailscale-*header with a loopback HostX-Forwarded-*andForwardedcount--set-password, or readsboard.jsonin asage-boardfolder (Bash, Read, Grep)Status 403 (not 401) for the not-set case: no credential can pass, so the browser should not show a sign-in dialog.
Evidence
npm run build,npm run check: all checks pass.board --set-passwordin a pseudo-terminal (script) asked twice with the echo off and set the scrypt record; from a pipe it refused with exit 1.Not verified
scripts/board-enhancement.test.mjsneeds Playwright, which is not installed here (it is not innpm test).🤖 Generated with Claude Code