Public: anyone can read this; the crew can change it.
A plugin's config text with a secret written as an alias is hidden whole #17745
Merged 8h 27m ago, live in production
token: x was masked while x: &x value beside it was shown, in the plugin config page, the terminal and the MCP answer, which read one function. Such a text is now hidden whole. An alias to a ${NAME} hides nothing.
-
Reviews
Changes requested — before the latest pushThe fix in src/core/secret_text.ts is sound: I found no way to get an aliased secret through. It hides the whole text, keeps the line count, and a
${NAME}anchor does not trigger it. Nothing is high, but three things need changing in one round:- Scope. The new tests in test/web-workflows.test.ts (the two proposal-to-another-forge tests, plus the
lang.ymladded to the sharedocto/gearsfixture) and in test/tui-propose-edit.test.ts exercise the secret stop on proposals. That behaviour is not changed here, and the issue did not ask for it. They add about 70 lines and new imports, and they change a fixture that other tests share. Drop them, or move them to their own pull. - The "placeholder behind one does not hide" assertion in test/config-secrets.test.ts is weak.
toStartWith(t.slice(0,11))checks only the first 11 characters. Assert the whole output equals the input forx: &x shown\nhost: *x\n, and equals the input with only the secret line masked for the${T}case. - The doc line in docs/features/config-form.md says the hiding happens only "in a plugin's config page".
hideSecretsis shared, so the same hiding applies to every text it is called on, such as diffs. Say that, or name where it applies.
ApprovedApproved. Since my last review (8ab1bef4d): the proposal tests and shared fixture are back to main's, so the pull is 4 files; the placeholder tests compare whole outputs; and docs/features/config-form.md now lists every place a text is hidden whole (listing, diff of change, removal and revert, MCP tools, web Review diff). Each earlier ask is met. The scan stays single-pass, and the hostile-line test now covers
&and&a *arepeats. The how-to is in docs/features/, not README. I found nothing new on the changed lines. - Scope. The new tests in test/web-workflows.test.ts (the two proposal-to-another-forge tests, plus the
-
Checks
shipped production is serving it deploy 5fa2c54
-
History
- Review: whole outputs compared, every place a text is hidden whole named, the proposal tests taken out 82bc771
- Merge main, which has #17739 as one commit, into leaf-editor-3 8ab1bef
- Merge pull request #17739 from sold/leaf-editor-2 7b1aa0a
- A container's limits and start time are shown in the cloud tree (#17731) 66aac7a
- Tests: a proposal that adds what looks like a secret stops once, on all three ways to propose 3d7dbac
- A plugin's config text with a secret written as an alias is hidden whole b1e1fdf
- The backup holds recipes, archived forges' records and the routes table (#17723) 079ae5c
- Merge pull request #17737 from sold/aws-date e6e7f0f
- The secret scan reads a hostile line once 55bd3ce
- Merge commit 'f57a3af53af416749fefc715d8cbf76d43347f33' into sold/leaf-editor-2 0675e1b
- A save as text that adds what looks like a secret stops once, with one tick to say it is none 9f8f045
- A browser test loads the owner's home at 375 px and fails on any sideways scroll (#16731) 7cefc8d
- Merge pull request #17720 from sold/leaf-editor-1 423c8d4
- An EC2 instance's date is its first launch, and a bucket's says it may be its last change (#17532) 321a98d
- The splice's test has its module's name, and no wall-clock check f57a3af
- The secret rule hides all its five forerunners hid, and an alias to a secret is no way round it 44c6b5a
- A change stream says which stream it is, so a client knows when its numbers started again (#17736) 40fffab
- Merge pull request #17735 from sold/leaf-table-1 3a50184
- Games: the forge's AutoStopper is pinned, and its plan says what happens to the old one (#17734) 72e511d
- Merge branch 'sold/leaf-editor-1' into sold/leaf-editor-2 ca77d63
82bc771ca answers the review. The proposal tests and the shared fixture are back to main's; they follow as their own pull. The placeholder tests compare whole outputs. The page now lists every place a text is hidden whole, taken from the callers: a plugin's config file as listed, the diff of its change, removal or revert (web page, terminal and the plugin_config tool), and the web form's Review diff.
Ran on this head: tsc, the gate, 7 test files (189 pass, 0 fail). Not run: the full suite, a browser. The pull is 4 files now.
🤖 Generated with Claude Code
token: *xwas masked whilex: &x valuebeside it was shown, in the plugin config page, the terminal and the MCP answer, which read one function. Such a text is now hidden whole. An alias to a${NAME}hides nothing. Follows #17739; part of #7337.Ran on 3d7dbacb7, before main was joined in: tsc, the gate, 122 test files in one process (1470 pass, 5 fail). The five are four
applytests in infra-plan and one in boundary-tokens-crew. The same five failed in the run on 55bd3cec8; the boundary-tokens-crew one also fails on main's code in that container. Not run: the joined head, the full suite, a browser.Try: on a game server whose compose file holds a plugin config with "x: &x abc" and "token: *x", open its config: every line reads hidden.
🤖 Generated with Claude Code