mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 21:36:40 -10:00
smolvm forwards only listed ports, and only to servers on the guest's 0.0.0.0. ports-all is now an emulation, reviewed: - devvm _smolvm-ports, started with the VM and ended with its lifeline, holds one ssh master connection to the VM's sshd (its key alone, the host key pinned, no agent, no forwarding asked) and relays each host connection as an ssh -W channel, so every connection starts on the host. - assets/smolvm/ports.sh reports the guest's TCP listeners; the host parses the report as untrusted (sizes capped, loopback addresses only, applied at most every 500 ms). - Ports from 1024 up, at most 256, bound on 127.0.0.1 and ::1 with platform.ListenExclusive: never a port another host program holds, nor any VM's ssh, proxy, decider or listed ports (netpolicy.UsedPorts). - Its log is rate- and size-limited; reads through smolvm exec (host key, the sshd probe) are capped at 64 KiB and 30 s. - sshd's AddressFamily is any, for channels to the guest's ::1. - vm checks the VM's port features at every start. Messages: smolvm_ports_no_ssh, smolvm_ports_failed, smolvm_forwarder_failed. Docs: smolvm.md (every port), backends.md, security.md, design.md (the design note and threat check), limits.md, testing.md. e2e: the smolvm section's every-port checks, and its fake decider reads smolvm's request before closing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
180 lines
10 KiB
Go
180 lines
10 KiB
Go
package msg
|
|
|
|
// docs links messages to the docs page that says more: message ID to
|
|
// "page#anchor", a page in docs/content/docs and a heading on it. devvm
|
|
// prints the page's address on the line after the message's text.
|
|
// TestDocLinks checks every entry.
|
|
var docs = map[string]string{ //nolint:gosec // message IDs and pages, not credentials
|
|
"backend_lacks": "backends#missing-and-unreviewed-features",
|
|
"backend_unreviewed": "backends#missing-and-unreviewed-features",
|
|
"backend_unreviewed_used": "testing#unreviewed-emulations",
|
|
"backend_unknown": "backends#choosing-a-backend",
|
|
"backend_unknown_default": "backends#choosing-a-backend",
|
|
"backend_unknown_vm": "backends#choosing-a-backend",
|
|
"smolvm_missing": "smolvm#requirements",
|
|
"smolvm_missing_fix": "smolvm#requirements",
|
|
"smolvm_broken": "smolvm#requirements",
|
|
"smolvm_broken_fix": "smolvm#requirements",
|
|
"smolvm_old": "smolvm#requirements",
|
|
"smolvm_old_fix": "smolvm#requirements",
|
|
"smolvm_host_unsupported": "smolvm#requirements",
|
|
"smolvm_machine_foreign": "smolvm#its-machines",
|
|
"smolvm_from_registry_only": "smolvm#building-images",
|
|
"smolvm_mount_colon": "smolvm#what-devvm-sets-on-a-vm",
|
|
"smolvm_too_many_ports": "smolvm#what-devvm-sets-on-a-vm",
|
|
"smolvm_no_agent": "smolvm#what-devvm-sets-on-a-vm",
|
|
"smolvm_ports_no_ssh": "smolvm#every-port",
|
|
"smolvm_ports_failed": "smolvm#every-port",
|
|
"smolvm_port_ssh": "smolvm#ssh-for-editors",
|
|
"smolvm_no_ssh": "smolvm#ssh-for-editors",
|
|
"smolvm_no_sshd": "smolvm#ssh-for-editors",
|
|
"smolvm_ssh_port_forwarded": "smolvm#ssh-for-editors",
|
|
"smolvm_script_failed": "smolvm#looking-inside",
|
|
"lima_missing": "lima#requirements",
|
|
"lima_broken": "lima#requirements",
|
|
"lima_old": "lima#requirements",
|
|
"lima_host_unsupported": "lima#requirements",
|
|
"qemu_missing": "lima#requirements",
|
|
"lima_missing_fix": "lima#requirements",
|
|
"lima_broken_fix": "lima#requirements",
|
|
"lima_old_fix": "lima#requirements",
|
|
"qemu_missing_fix": "lima#requirements",
|
|
"lima_arch_unsupported": "lima#requirements",
|
|
"macos_old": "lima#requirements",
|
|
"no_kvm": "lima#requirements",
|
|
"kvm_access": "lima#requirements", "lima_global_config": "lima#a-lima-home-of-its-own",
|
|
"vm_has_networks": "lima#a-lima-home-of-its-own",
|
|
"lima_home_too_long": "lima#limits",
|
|
"mount_comma": "lima#limits",
|
|
"disk_shrink": "lima#limits",
|
|
"image_in_use": "lima#clones-and-overlays",
|
|
"qemu_refused": "lima#confinement",
|
|
"start_no_ssh": "lima#limits",
|
|
"no_ubuntu_image": "images#ubuntus-cloud-image",
|
|
"ubuntu_bad_signature": "images#ubuntus-cloud-image",
|
|
"ubuntu_unsigned": "images#ubuntus-cloud-image",
|
|
"unknown_layer": "images#layers",
|
|
"layer_name_invalid": "customizing#your-own-layers",
|
|
"layer_name_reserved": "customizing#your-own-layers",
|
|
"layer_created": "customizing#your-own-layers",
|
|
"base_features": "customizing#choosing-features",
|
|
"base_features_none": "customizing#choosing-features",
|
|
"unknown_feature": "customizing#choosing-features", "feature_shadowed": "customizing#your-own-features",
|
|
"script_failed": "images#build-logs-and-interrupts",
|
|
"rebuild_replaces": "images#rebuilding",
|
|
"vm_outdated": "images#outdated-vms",
|
|
"bad_path": "lima#limits",
|
|
"vm_name_no_room": "backends#vm-names",
|
|
"vm_other_folder": "commands#a-folder-made-again",
|
|
"vm_other_folder_rm": "commands#a-folder-made-again",
|
|
"vm_other_folder_adopt": "commands#a-folder-made-again",
|
|
"vm_unfinished": "commands#an-existing-vm",
|
|
"no_terminal_confirm": "commands#adding-to-a-vm",
|
|
"add_layer_failed": "commands#adding-to-a-vm",
|
|
"size_next_start": "commands#an-existing-vm",
|
|
"ports_next_start": "commands#an-existing-vm",
|
|
"rm_export_failed": "coding-agents#history",
|
|
"history_not_exported": "coding-agents#history",
|
|
"git_replaced": "git-protection#on-each-launch",
|
|
"git_appeared": "git-protection#on-each-launch",
|
|
"git_embedded_new": "git-protection#on-each-launch",
|
|
"git_hooks_unlocked": "git-protection#on-each-launch",
|
|
"unsafe_folder": "security#only-the-project-folder",
|
|
"unsafe_folder_inside": "security#only-the-project-folder",
|
|
"cpus_not_number": "commands#size-and-ports",
|
|
"size_not_gib": "commands#size-and-ports",
|
|
"too_many_cpus": "commands#size-and-ports",
|
|
"too_much_memory": "commands#size-and-ports",
|
|
"port_invalid": "commands#size-and-ports",
|
|
"ports_list_needed": "images#ports",
|
|
"ports_rm_all": "images#ports",
|
|
"no_image_for": "images#which-image-a-new-vm-gets",
|
|
"net_direct_route": "network#the-self-check",
|
|
"net_unenforced_stop": "network#the-self-check",
|
|
"net_unenforced": "network#the-self-check",
|
|
"net_off_log": "network#turning-it-on-or-off",
|
|
"net_off_policy": "network#turning-it-on-or-off",
|
|
"net_flag_ignored": "network#turning-it-on-or-off",
|
|
"net_on_old_tokens": "network#turning-it-on-or-off",
|
|
"net_off_next_start": "network#turning-it-on-or-off",
|
|
"not_a_rule": "network#rules",
|
|
"proxy_start_failed": "network#the-proxy",
|
|
"proxy_port_taken": "network#the-proxy",
|
|
"net_proxy_down_stopped": "network#the-proxy",
|
|
"no_secret": "network#secrets",
|
|
"codex_login_kept": "network#agents-logins-and-settings",
|
|
"opencode_login_kept": "network#agents-logins-and-settings",
|
|
"setid_files": "security#what-it-doesnt-protect",
|
|
"git_protect_needs_macos_new": "git-protection#linux-hosts",
|
|
"git_protect_on_needs_macos": "git-protection#linux-hosts",
|
|
"git_protect_running": "git-protection#turning-it-on-or-off",
|
|
"git_unlocked": "git-protection#turning-it-on-or-off",
|
|
"git_protect_flag_ignored": "git-protection#turning-it-on-or-off",
|
|
"git_locked_strict": "git-protection#strict",
|
|
"git_config_failed": "git-protection#strict",
|
|
"git_commondir": "git-protection#what-a-lock-cant-stop",
|
|
"git_worktree_stray": "git-protection#what-a-lock-cant-stop",
|
|
"git_not_locked": "git-protection#whats-locked",
|
|
"git_lock_raced": "git-protection#whats-locked",
|
|
"git_hooks_path": "git-protection#not-covered",
|
|
"git_include_inside": "git-protection#not-covered",
|
|
"git_hook_link_inside": "git-protection#not-covered",
|
|
"git_gitdir_outside": "git-protection#not-covered",
|
|
"ssh_remote_hint": "ssh#agent-forwarding",
|
|
"agent_on_risk": "ssh#agent-forwarding",
|
|
"agent_devvm_risk": "ssh#devvms-own-agent",
|
|
"agent_no_keys": "ssh#devvms-own-agent",
|
|
"agent_key_changed": "ssh#devvms-own-agent",
|
|
"agent_key_unpinned": "ssh#devvms-own-agent",
|
|
"agent_key_no_fingerprint": "ssh#devvms-own-agent",
|
|
"agent_key_mounted": "ssh#devvms-own-agent",
|
|
"agent_lifetime_invalid": "ssh#devvms-own-agent",
|
|
"agent_confirm_needs_askpass": "ssh#devvms-own-agent",
|
|
"ssh_include_yourself": "ssh#ssh-access-by-name",
|
|
"no_code_command": "ssh#devvm-ssh-and-devvm-code",
|
|
"clone_not_top": "clone#requirements",
|
|
"clone_no_commits": "clone#requirements",
|
|
"clone_detached": "clone#requirements",
|
|
"clone_needs_new_vm": "clone#requirements",
|
|
"remotes_taken": "clone#the-remote",
|
|
"fetch_until": "clone#the-remote",
|
|
"no_terminal_fetch": "clone#deleting-the-vm",
|
|
"saved_names_taken": "clone#deleting-the-vm",
|
|
"remote_kept": "clone#deleting-the-vm",
|
|
"no_terminal_delete": "clone#deleting-the-vm",
|
|
"tools_need_resolve": "images#versions",
|
|
"mise_checksum": "images#versions",
|
|
"tool_stepped_back": "images#versions",
|
|
"tool_no_download": "images#versions",
|
|
"tools_check_failed": "images#versions",
|
|
"newer_tools": "images#versions",
|
|
"tool_unbuilt": "images#building-tools",
|
|
"tool_bad_output": "images#building-tools",
|
|
"share_lock_held": "images#building-tools",
|
|
"tools_not_images": "images#building-tools",
|
|
"custom_layer_remove": "images#adding-and-removing-tools",
|
|
"agent_dir_comma": "lima#limits",
|
|
"agent_dirs_added": "coding-agents#mounts",
|
|
"agent_dirs_removed": "coding-agents#mounts",
|
|
"no_claude_token": "coding-agents#claude-code-login",
|
|
"claude_token_invalid": "coding-agents#claude-code-login",
|
|
"no_github_token": "network#secrets",
|
|
"not_setup_token": "coding-agents#claude-code-login",
|
|
"secret_unuse_copied": "network#secrets",
|
|
"keychain_save_failed": "network#secrets",
|
|
"login_copy_failed": "network#agents-logins-and-settings",
|
|
"config_redacted": "coding-agents#keys-in-settings-files",
|
|
"config_not_copied": "coding-agents#keys-in-settings-files",
|
|
"claude_mcp_secrets_copied": "coding-agents#mcp-servers",
|
|
"bad_from": "from#digests",
|
|
"from_unreachable": "from#digests",
|
|
"from_cached_unreachable": "from#digests",
|
|
"from_not_found": "from#images-only-docker-has",
|
|
"from_cached_not_found": "from#images-only-docker-has",
|
|
"docker_only": "from#images-only-docker-has",
|
|
"docker_image_changed": "from#images-only-docker-has",
|
|
"convert_failed": "from#supported-images",
|
|
"convert_bad_output": "from#the-image-is-untrusted",
|
|
"from_ignored": "from",
|
|
}
|