Repository navigation
Remove all dependencies on github.com/loft-sh modules and harden the SSH server - #22
Merged
Merged
Conversation
The loft-sh Go modules are no longer maintained, so their code now lives in this repository: - loft-sh/log becomes pkg/log. Prompts use charmbracelet/huh instead of the archived AlecAivazis/survey, tables are rendered by our own code instead of tablewriter v0.0.5, and mgutz/ansi, acarl005/stripansi and k0kubun/go-ansi are replaced by a few lines of code. - loft-sh/ssh becomes pkg/ssh/sshd: gliderlabs/ssh v0.3.8 plus unix socket forwarding, without Session.Command (and go-shlex). - loft-sh/programming-language-detection is replaced by pkg/language/detect.go. This also fixes detection of C++, C# and PHP projects, prompting for required options without allowed values, and log rotation at 10 MB instead of 10 TB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fix low-severity issues inherited from upstream in the SSH server that runs in the dev container: - Remove the hidden `agent container ssh-server` command. Only DevPod Pro started it, and it accepted any client without authentication and ran the shell as whichever user the client named. - A reverse unix socket forward only replaces a socket that nothing listens on and that belongs to the server's user (any user when it runs as root), and is refused otherwise, so sessions forwarding the same socket no longer steal or remove each other's. - The shared ssh-agent socket directory (/tmp/auth-agent-<id>) must not be a symlink, must be owned by the server's user and have mode 0700; the socket is 0600. A session removes the directory only when empty. - Track TCP and unix reverse forwards per connection, so one connection can't cancel another's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
renatoathaydes
force-pushed
the
claude/remove-loft-sh-deps-382523
branch
from
October 20, 2026 08:40
cde6493 to
504c238
Compare
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.
Summary
The
github.com/loft-shGo modules are no longer maintained, so DevPod no longer depends on any of them. Their code now lives in this repository, and the unmaintained libraries they pulled in are gone too.loft-sh/logpkg/log(copied; Apache 2.0 licence kept inpkg/log/LICENSE)loft-sh/ssh(fork ofgliderlabs/ssh)pkg/ssh/sshd:gliderlabs/sshv0.3.8 plus loft-sh's unix socket forwarding, agent listener and port-0 fix (BSD licence kept)loft-sh/programming-language-detectionpkg/language/detect.go(own code)Transitive dependencies removed:
AlecAivazis/survey(archived),mgutz/ansi,acarl005/stripansi,k0kubun/go-ansi,anmitsu/go-shlex,kballard/go-shellquote,mattn/go-colorableandolekukonko/tablewriterv0.0.5. Replacements:charmbracelet/huh, which was already a dependency.tablewriterv1 would have added seven modules, including the unmaintainedolekukonko/ts.x/sys/windows.Session.Command()was removed fromsshd; it had no callers, and callers useRawCommand().Fixes found on the way (see CHANGELOG):
env,distorcache.The stripped linux/amd64 binary is about 390 KB smaller.
go-licensesnow ignores onlygithub.com/loft-sh/devpod, so any futureloft-shdependency gets checked.Security hardening
A security review of the change found no new high or medium severity issues. It found four low-severity issues inherited from the upstream SSH server code that runs in the dev container, and this PR fixes them (last commit):
devpod agent container ssh-servercommand is gone. Only DevPod Pro started it, and it accepted any client without authentication and ran the shell as whichever user the client named./tmp/auth-agent-<id>must not be a symlink, must be owned by the server's user and must have mode 0700, and the socket is 0600. A session removes the directory only when it is empty.Test plan
main(after Embed the Linux agents in the CLI instead of downloading them #19);go build ./...,go vet ./..., cross-builds for windows/amd64 and linux/arm64go test ./pkg/... ./cmd/..., and-raceon the changed packagesdevpod provider add/list/optionsanddevpod listoutput looks as before🤖 Generated with Claude Code