mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
devvm upgrade [--check] [--to VERSION] [-f/--force] [--json] installs devvm's newest release the way this devvm was installed, asking first (upgrade_confirm, answered by --force). upgrade is a top-level exception in the cli skill: it acts on devvm itself, not this folder's VM, and it's the name other tools give the verb. It skips the layout check, as a layout a newer devvm wrote is a reason to run it. - install.sh's (<prefix>/lib/devvm/<version>/devvm, which <prefix>/bin/devvm links to): SHA256SUMS and its .minisig over HTTPS, the signature checked against the key built in from packaging/minisign.pub (packaging/key.go embeds the folder; no file, no key, and upgrade_no_key), the archive's SHA-256, unpacked into lib/.<v>.new.<pid>, run (--version), renamed to lib/<v>, the link switched atomically (symlink beside, rename over), run again through the link, rolled back on any failure; then older versions pruned as install.sh does (kept: the one that ran, any a running process names, another upgrade's staging folder). - Homebrew's (a Cellar/devvm/ keg): brew upgrade devvm, asked first, through the run log; --to refused. - Anything else: says how it was installed (a checkout build, go install, a copy elsewhere) and fails. - Already latest says so; a newest release older than this devvm is refused even with --force (rollback); --to installs a named one, older asked about (upgrade_confirm_older). --check and --json install nothing. minisign verification is Go's: ed25519 over blake2b.Sum512 for the default prehashed ED signature (legacy Ed refused), the key ID, the global signature over signature||trusted comment, and the trusted comment "devvm <version>" as scripts/release.sh writes it. Verified against a signature minisign 0.12 made. golang.org/x/crypto v0.58.0 added for blake2b only (approved; depguard allows only golang.org/x/crypto/blake2b); MVS raised x/text to v0.43.0 and x/tools to v0.51.0. mise run vuln: no vulnerability reached; the module-level GO-2026-5932 is x/crypto/openpgp, which devvm doesn't import. New: internal/upgrade (Detect, Source: Latest, Check for the release notice to call, Fetch; ParsePublicKey/Verify; Valid/Compare; Upgrader), internal/upgrade/upgradetest (TLS release server, minisign signer; tests only, a structure layer), fetch.Resolve (where a HEAD's redirects end), fetch.Download's size cap (mise's 256 MiB too). Test-build overrides: DEVVM_REPO_URL, DEVVM_RELEASE_KEY, DEVVM_RELEASE_CA, DEVVM_TEST_VERSION; script command release_server [-badsig]. Security review (security-audit skill, guidance mode, a fresh reviewer): - Prerelease order compared suffixes as text (rc.10 < rc.9), which let an older signed prerelease past the rollback refusal: fixed, semver precedence, with table cases. - No cap on the archive download (a host could fill TMPDIR before the checksum failed): fixed, fetch.Download takes a limit. - Two upgrades at once: prune removed another's staging folder: fixed, .<v>.new/old.<pid> folders are kept while that pid runs. - A failed rollback of the link was silent: fixed, upgrade_rollback_failed names the link and the old devvm, and the new folder stays so the link isn't left dangling. - QEMU's guestfwd names devvm with commas doubled, which the in-use check missed: fixed. - Freeze (a host serving the current version as newest forever): no boundary crossed, inherent without signed expiring metadata; documented in internals/install.md. Checked sound: nothing untrusted runs or unpacks before the signature and SHA-256; versions from the redirect and --to pass Valid before any URL or path; tar takes only regular files in its one folder (no links, subfolders, ..), 512 MiB cap, fixed modes; test overrides are read only by test builds. Tests: minisign (real minisign fixture, tampering, legacy, other key), each install kind against the fake TLS server, bad signature, wrong trusted comment, replaced archive (wrong SHA), bad archives, a new devvm that fails before and after the switch, a failed switch (old kept), a failed rollback, downgrade refused and --to, pruning, Homebrew via a brew script, Check, Latest's failures, Compare; CLI test upgrade.txtar. Docs: getting-started/install.md (Upgrading: how, what it checks, an older release, --json), getting-started/commands.md (This machine row, Upgrading devvm, questions, output for scripts), internals/install.md (devvm upgrade), contributing (release_server), the CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]>
51 lines
1.2 KiB
Plaintext
51 lines
1.2 KiB
Plaintext
# Each package's test coverage, in percent: the unit tests and the CLI tests together.
|
|
# mise run test fails when a package drops below its line; mise run coverage raises them.
|
|
cmd/devvm 100.0
|
|
internal/agentlogin 94.8
|
|
internal/backend 97.1
|
|
internal/backend/backendtest 74.4
|
|
internal/backend/lima 90.4
|
|
internal/backend/registry 100.0
|
|
internal/build 88.5
|
|
internal/cli 88.7
|
|
internal/cli/docgen 85.3
|
|
internal/daemon 97.9
|
|
internal/desktop 77.2
|
|
internal/devcontainer 96.8
|
|
internal/fetch 96.6
|
|
internal/from 91.3
|
|
internal/gitprotect 93.0
|
|
internal/hostgit 100.0
|
|
internal/hostsafety 87.5
|
|
internal/image 99.3
|
|
internal/jsonc 97.1
|
|
internal/msg 68.6
|
|
internal/msg/gen 93.3
|
|
internal/netpolicy 88.5
|
|
internal/paths 98.1
|
|
internal/platform 81.4
|
|
internal/ports 90.9
|
|
internal/project 98.4
|
|
internal/proxy 90.9
|
|
internal/redact 97.7
|
|
internal/secrets 91.8
|
|
internal/settings 96.2
|
|
internal/shell 100.0
|
|
internal/sshagent 84.2
|
|
internal/sshconfig 94.8
|
|
internal/state 94.0
|
|
internal/stubtest 81.4
|
|
internal/stubtest/stub 93.1
|
|
internal/stubtest/stubstate 91.2
|
|
internal/testbuild 100.0
|
|
internal/tools 89.7
|
|
internal/trust 94.1
|
|
internal/ubuntu 97.3
|
|
internal/ui 94.6
|
|
internal/upgrade 90.0
|
|
internal/upgrade/upgradetest 95.0
|
|
internal/vm 85.9
|
|
internal/vmname 100.0
|
|
internal/vmssh 88.7
|
|
packaging 40.0
|