Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Platforms CI failed with no Vitest suite because the test used node:test. Lint failed on perfectionist/sort-imports for scrub-child-env. Co-authored-by: Cursor <cursoragent@cursor.com>
teknium1
left a comment
There was a problem hiding this comment.
Thanks for addressing a real child-process credential boundary: current main still forwards process.env to the updater (apps/desktop/electron/main.ts:2963), streamed updater (apps/desktop/electron/main.ts:3091), and bootstrap scripts (apps/desktop/electron/bootstrap-runner.ts:469, :567).
Problems
apps/desktop/electron/scrub-child-env.ts:20does not classifyFAL_KEYas a credential. It matches neither the listed names nor a suffix, so it remains in updater/bootstrap child environments.FAL_KEYis a documented FAL API key (hermes_cli/config_defaults.py:3572) and is treated as a credential by the repository test filter (tests/conftest.py:121).- The shared helper duplicates the implementations in open #70370 and #70372, matching the member's consolidation request. This PR is currently reported as conflicting.
Suggested changes
- Consolidate the three sibling changes around one helper and all intended call sites.
- Add
FAL_KEYto the explicit credential set and cover it inscrub-child-env.test.ts.
Automated hermes-sweeper review.
| '_OAUTH_TOKEN' | ||
| ]) | ||
|
|
||
| const CREDENTIAL_NAMES = new Set([ |
There was a problem hiding this comment.
FAL_KEY is a documented FAL API credential (hermes_cli/config_defaults.py:3572) but is absent here and does not match any suffix below, so this scrubber forwards it. Please add it to the explicit credential names and assert its removal in this helper's test.
|
Bound to the child-process credential-inheritance class under #83565 (#83565) — same bug class, different surface. desktop updater and bootstrap children env; Wave F — shares main.ts + scrub-child-env.ts with #70370/#70372: consolidate or strictly sequence, never merge independently. The EPIC carries the live class table, dedup adjudication, and the dependency-driven merge order. |
|
Consolidation coordination: this updater/bootstrap scope is being folded into survivor PR #70372 together with #70370, following the Wave F interlock in #83565. The re-port targets current |
andrexibiza
left a comment
There was a problem hiding this comment.
Re-reviewed this against current main and the Wave F consolidation under #83565.
The original vulnerability is valid, but I do not think #70373 should be repaired or merged independently anymore. Its topology is substantially stale: current Desktop update handling has moved beyond the old runStreamedUpdate path, while the live credential-inheritance surface now includes the Windows repo hand-off, staged-updater fallback, Windows bootstrap recovery, POSIX hand-off, bootstrap PowerShell/Bash children, and the uninstall --gui-summary probe.
There are also policy defects in the helper that should not be carried forward unchanged:
- credential-name matching is case-sensitive;
- several documented non-secret
*_BASE_URLendpoint overrides are classified as credentials; - the generic
overridesmap is applied after scrubbing and can therefore reintroduce an arbitrary credential; - the policy does not close effective-name tunnelling through
APPTAINERENV_/SINGULARITYENV_; - the Desktop policy should converge with the broader child-process boundary semantics rather than maintain a weaker parallel denylist.
FAL_KEY itself is fixed at this head, so the old inline finding is no longer the important blocker.
The right disposition is the one already recorded in the coordination comments: fold #70370 + #70373 into survivor #70372, re-port against current main, use one canonical case-insensitive policy, scrub every input map, allow exceptional secrets only through narrow purpose-built constructors, and cover every live Desktop child-process sink with composed regression tests.
I would close #70373 once that consolidated implementation actually exists on #70372. Until then, keep it as provenance for the updater/bootstrap portion of the class rather than treating this stale branch as independently mergeable.
|
Closing this sibling in favor of the requested consolidated survivor, #70372. The updater/bootstrap work from this branch is preserved in #70372 and updated for the current live hand-off topology, alongside the terminal and backend child-process boundaries. The consolidated branch is rebased onto official |
Summary
HERMES_HOMEand rebuilt PATH entries required for the updater/bootstrap to run.Why
Detached updater and first-launch bootstrap scripts previously inherited the full Electron parent env, including provider and messaging secrets they do not need.
Salvages the Desktop half of the subprocess scrub pattern used in #70342 / #70351 / #70357.
Test plan
npx tsx --test apps/desktop/electron/scrub-child-env.test.ts