Repository navigation
feat(identity): migrate ssh surface to charm v2 (wish/v2 v2.0.6) — #17343 slice 1 - #17410
Merged
Merged
Conversation
…) — #17343 slice 1 Moves the only live CVE-2026-41589 exposure (pkgs/identity's SCP file handler) from wish v1.4.7 to charm.land/wish/v2 v2.0.6, whose scp package confines resolved paths to the configured root via os.Root. - cmd/ssh, auth, observability: charmbracelet/ssh -> charm.land/ssh; wish middleware (scp/bubbletea/comment/elapsed/logging) -> wish/v2. - TUI ported to bubbletea v2: View() returns tea.View (AltScreen on the view; tea.WithAltScreen no longer exists), tea.KeyPressMsg, bubbles v2 viewport options API. - promwish has no published v2 module: replaced in-package by metrics.go mirroring promwish v0.8.0 exactly (wish_sessions_created_total, wish_sessions_finished_total, wish_sessions_duration_seconds; metrics server wrapper swallowing http.ErrServerClosed). - treilik/bubbleboxer has no bubbletea v2 release: replaced by layout.go, a minimal layout tree (CreateLeaf/ModelMap/UpdateSize/View) preserving the vertical SizeFunc stack + horizontal column rendering. - New tests: metrics counter/command oracles, layout render/allocation oracle. Existing ssh_logging_test still passes. wish v1.4.7 remains in go.mod as an indirect dependency of the charm fork replace; removing it is slice 2 (charm stack) on #17343. The live SCP serving path no longer runs the vulnerable code. Refs #17343
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Refs #17343 — slice 1 of the charm-v2 migration (AN's slicing, comment 7286833051): the pkgs/identity ssh surface, the only package that actually serves the vulnerable SCP handler.
What changes
pkgs/identity/cmd/ssh(+auth,observability, whose signatures carry the ssh types) migrate fromgithub.com/charmbracelet/wishv1.4.7 tocharm.land/wish/v2v2.0.6 — the release whosescppackage confines resolved paths to the configured root viaos.Root(the CVE-2026-41589 fix; no patched v1 exists and v1.4.8 is docs-only).charmbracelet/ssh→charm.land/sshv0.4.3 throughout.View()returnstea.View(AltScreen declared on the view;tea.WithAltScreenno longer exists),tea.KeyPressMsg, viewport options API.@latestand@main: the repo contains nopromwish/v2package), so it is replaced in-package bycmd/ssh/metrics.go, mirroring promwish v0.8.0 exactly: same counters (wish_sessions_created_total,wish_sessions_finished_total,wish_sessions_duration_seconds), same const/command labels, and a metrics-server wrapper that swallowshttp.ErrServerClosed(load-bearing — the caller treats any ListenAndServe error as fatal).cmd/ssh/layout.go: a minimal layout tree with the same surface the TUI used (CreateLeaf / ModelMap / UpdateSize / View; vertical SizeFunc partition, horizontal even column split, lipgloss join rendering).Verification
cmd/ssh4/4 PASS (new layout + metrics oracles + pre-existing log-hygiene test),auth1/1 PASS,webPASS. Localgo veton the touched packages clean.Not in this slice
github.com/charmbracelet/wishv1.4.7 remains inpkgs/identity/go.modas an indirect dependency of the charm forkreplace— no first-party code imports it after this PR, and the live SCP path runs the patched v2 handler. Removing the fork stack is slice 2; pkgs/chat + pkgs/launcher are slice 3 (pkgs/tea already landed via PR #17389). Alert #331 clears when slice 2 lands; #17343 stays open.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.