Skip to content

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 06:15
· 838 commits to main since this release
098eacd

Highlights

  • The apps can run several commands at once. Inside, each command now
    runs as a call of its own, with its own output, flags, approvals and
    environment, so the Mac and iPhone apps can run a person's command and an
    AI agent's command side by side in one process.
  • See a secret or key again from the Mac app. secret show --reveal and
    key show --reveal from a program without a terminal ask the person in
    komando's own window and show the value only after Allow once. An AI
    agent still never gets a value.
  • Signed releases. This is the first release whose checksums.txt is
    signed with the komando project's key. komando update checks that
    signature before it downloads anything, so someone who replaced a
    release's files cannot make it install them. Releases up to 0.13.0 are
    unsigned: go back to one with the install line.
  • Your store is safer. A dry run never makes a new, empty store where
    store.db went missing, a keychain that cannot answer stops changes
    instead of guessing, and every store leaves a store.made marker that
    shows the folder had one.
  • Move everything in one sealed file. komando export --sealed puts
    your servers, secrets and (with --with-keys) private keys in one file
    locked with a passphrase, and export --for-phone seals it for the
    iPhone app.
  • More for apps and scripts. cache keys shows each key's type and time
    to live, --progress writes how far a copy is as JSON lines,
    cluster describe and cluster logs give structured detail, and
    komando schema lists the kinds each add takes.
  • More ways in. SSH certificates, security keys (FIDO2), agent
    forwarding per server, post-quantum key exchange, and imports from PuTTY,
    MobaXterm and AWS EC2.
  • The paid boundary is written down and tested. komando's own code
    never checks a plan, account or licence; a test fails if the binary links
    the sync library or a Komando Cloud client. Plus over 20 fixes, many for
    safety, among them links in a download folder and hidden terminal text.

Changed for scripts and agents

  • AGENTS.md has a new rule 11, the paid boundary: an agent that changes komando's own code never adds a plan, account or licence check, and gives a paid service only a neutral, open capability (an open format, a signature check, a local socket). The old rules 11 and 12 are now 12 and 13. A new test (internal/boundary) fails when the komando binary links the sync library or a Komando Cloud client, or names a komando-owned address (any scheme, or a bare host name) other than the release site.
  • fs replace and fs restore take a TARGET: on a group (@web) every server gets the same edit, or puts back its own newest backup. Their JSON is now one result per server, as fs rm and exec give: data.results[] (host, ok, path, changed or would_change, replacements, diff, backup, error) and data.summary; For one server the fields moved: data.path is now data.results[0].path, data.changed is data.results[0].changed, data.would_change is data.results[0].would_change, and the same for replacements, diff, backup, from and note. Error codes stay the same (NO_MATCH, BACKUP_NOT_FOUND ...). fs write stays one server.

Added

  • See a secret again from the Komando Mac app: secret show NAME --reveal from a program without a terminal now asks the person in komando's own window (with the approval code when it is on) instead of stopping, and shows the value only after Allow once. The window names the secret, the command and the programs that started komando. At a terminal nothing changes; an AI agent, and a key through ssh-gate, still never get a value and get no window. A Linux or BSD desktop gets the window only with the approval code.
  • key show NAME --reveal prints the private key of a key komando made (kept in its sealed store, with no file), for a person only, under the same rules; for a key added from a file it names the file.
  • Every value shown is in the audit log with how the person allowed it (via: terminal or window) and the programs that started komando (started_from), and every refused --reveal with the secret's or key's name.
  • komando export --sealed --to FILE moves everything, passwords included, in one sealed file: komando asks a person at the terminal for a passphrase twice (15 or more characters, hidden), seals the export and the secrets its records use with scrypt and AES-256-GCM, and prints a six-word check phrase. --with-keys adds the private keys the servers use. komando import komando FILE asks for the passphrase and puts the secrets into the vault, never over one that is there with another value unless --overwrite and the person says yes. komando export --for-phone --to FILE seals the same to the iPhone app's one-time key (HPKE, X25519 and AES-256-GCM), after checking the key against the key check the phone shows. Only a person makes or opens a sealed file: an AI agent gets NEEDS_PERSON; a dry run says what would be sealed. New codes: SEALED_FILE_INVALID, SEALED_FILE_UNSUPPORTED, PHONE_KEY_INVALID, KEY_FAILED. The format is in docs/design/sealed-file.md, with test vectors in internal/sealfile/testdata/vectors.json.
  • export lists the secrets of a VPN's config and a server's environment variables in secrets_needed too, and export --overwrite replaces the file as its help says (it stopped with FILE_EXISTS).
  • cache keys gives each key's type and time to live, never its value: the JSON has items (key, type, ttl_seconds; -1 = no expiry, null = unknown) next to the unchanged keys, and the text shows KEY, TYPE and TTL columns. On Redis and Valkey, TYPE and PTTL for the whole page go in one round trip (one per master in a Cluster); on memcached the type is string and the time to live comes from the LRU crawler's listing, with the server's clock read in the same round trip.
  • komando schema vpn add and komando schema conn add (and db add, cache add, queue add, storage add, cluster add, registry add) list the kinds each takes under add_kinds: for a VPN its ID, display name, family (portal, config file, server and pre-shared key, auth key, system, proxy), the flags it needs and may take, and whether vpn up opens a browser to sign in; for a conn its ID, display name, family, URL schemes, an example URL and the same flag lists. An app can build its add forms from it. vpn add --help now shows its "Which flags go with which VPN kind" table from the same list, and vpn add refuses a flag the list does not give that kind, as it did before.
  • --progress on upload, download, cp, sync and storage upload/download: with -o json, komando writes how far the copy is to stderr, one JSON object per line, at most about four a second ({"event":"progress","file":…,"bytes_done":…,"bytes_total":…,"files_done":…,"files_total":…}), then one {"event":"done",…,"ok":…} line, so an app or agent can draw a progress bar. A total is null when komando cannot know it. The result on stdout is unchanged, and without --progress (or in text mode) nothing changes.
  • cluster describe -o json of a Kubernetes object adds data.detail for a program to read: kind, name, namespace, status (a pod's phase, ready 2/3 for a workload), created_at, labels, conditions[] and events[] (type, reason, message, count, last_seen_at). It never holds a Secret's values. cluster logs -o json adds data.lines[] (logged_at, pod, container, text) and data.truncated (also meta.truncated) when a pod sent --limit lines. The fields there before stay as they were.
  • job start --stdin-file FILE gives the job's command FILE as its input, job start --sudo-user USER runs it as USER with sudo -u (both as in exec), and job start --timeout 2h stops the job after that long. A timed-out job is killed with timed_out: true in job status, and job wait says the timeout stopped it. When exec times out with --sudo-user or --stdin-file FILE, its hint now names the matching job start line.
  • komando status lists the AWS IAM Identity Center (SSO) logins of the profiles in ~/.aws/config, with the profiles that share each one, when its token runs out and whether it renews itself (data.aws_logins). komando logout aws --profile NAME (or --all) ends one as aws sso logout does: AWS is told to end the token and the login in ~/.aws/sso/cache is deleted. Before, komando logout aws was read as a server named aws.
  • Docs: "Restore from a backup" in the import guide: which backups of ~/.komando open on this computer and on a new one (passphrase, store.key, keychain), and what to do about STORE_OLD_COPY after a restore.
  • registry rm and its dry run check every tag of the repository (up to 10000) for other tags on the image it deletes; they read only the first 200. registry prune reads repositories of up to 10000 tags (it stopped above 1000 with TOO_MANY_TAGS), asking for the tags' digests 8 at a time.
  • key revoke --all-users (with sudo) removes the key from the authorized_keys of every user on the server, not only the login user's or one --user's: someone who left may have put it into another account. The dry run names each user whose file holds it (users), and each file is read and written as its own user.
  • config set vpn_idle to a longer time, or to 0 (never close), now counts as a safety setting like login_for: at a terminal komando asks first, and an AI agent needs a person's yes (SAFETY_SETTING). A VPN an agent can keep up for ever is a way into the network that nobody closes. A shorter time asks nothing.
  • SSH user certificates: a key's OpenSSH certificate (KEY-cert.pub next to the key file, as ssh uses it) is offered at login, then the key alone, so servers that trust an SSH certificate authority let komando in. key add --cert FILE and key edit --cert FILE (--unset cert) name one kept elsewhere or for a key komando made; a certificate for another key is refused (KEY_INVALID) and one that is not valid now is left out with a warning. Keys show cert_path when one is set.
  • A test now holds komando to the post-quantum SSH key exchange: with a server that offers mlkem768x25519-sha256 (OpenSSH 9.9 and later), komando uses it first, so traffic recorded today cannot be read later with a quantum computer. The security standards page says so.
  • A server's key and --via steps, and a conn's --via steps, now keep the record ID beside the name (key_id, via_ids in the JSON). The names stay what commands read and change; the IDs let a reference survive a rename made elsewhere, which sync between devices needs. An existing store gets the IDs at its next change.
  • Docs: "What komando sends" in the README and SECURITY.md: nothing on its own (no statistics, crash reports or background update check); it connects only to what you added or named, AWS for login aws, and GitHub for update.
  • logs --container (and docker logs) take --since today, yesterday and now, as the journal does: the server's own midnight or time, worked out on the server. They stopped with USAGE before.
  • net dns --type MX (and CNAME, NS, TXT, SOA, SRV, PTR, CAA) works on servers without dig: komando asks the server's own resolver from /etc/resolv.conf over TCP through the SSH connection and shows the records as dig +short does. DIG_MISSING stays for a server with no resolver listed or no TCP forwarding. A PTR question for an IP address now asks its reverse name.
  • sync --sudo sends a folder to servers as root, for folders the SSH user cannot write (/etc/nginx/conf.d): each file is installed as upload --sudo installs one (staged privately, checked by root, never through a folder another user may change, SHARED_FOLDER_CONFLICT), with the source file's mode, so the next run sends nothing new. --delete removes as root too.
  • komando import mobaxterm FILE adds MobaXterm's SSH sessions from an exported .mxtsessions file, with each session's folder as a group.
  • komando import putty FILE adds PuTTY's SSH sessions from a .reg file (reg export HKCU\Software\SimonTatham\PuTTY\Sessions putty.reg, UTF-16 or plain): user, address and port; a key file path is kept, a .ppk key, a proxy and telnet or serial sessions are listed with what to do.
  • MongoDB: db explain shows a read's plan (queryPlanner; --analyze runs it and adds executionStats), and db activity lists what runs now (currentOp; --all adds idle connections), in the same row shape as for SQL databases. They said NOT_SUPPORTED before.
  • komando import aws-ec2 adds a server for each running EC2 instance of each AWS profile in ~/.aws/config, in the profile's region, read with the profile's own login (SSO and roles too; nothing is changed in AWS): named by its Name tag, grouped by region, labelled with its instance ID. An instance with no public address, a Windows one and the key pair to add are listed with what to do.
  • host edit --forward-agent lends a server your ssh-agent while komando is connected, as ssh -A does (for a git pull over SSH on it, or a hop komando does not make). It is off by default and set per server; turning it on asks first (SAFETY_SETTING, a person's yes for an AI agent), because root there can use your keys meanwhile. --unset forward-agent takes it back; host ssh-command adds -o ForwardAgent=yes for such a server.
  • Security keys (FIDO2: ed25519-sk, ecdsa-sk): key add takes their key file (the public key from FILE.pub), and a server that logs in with one uses the copy in ssh-agent, found by its public key, as ssh does; the device asks for a touch. Without the agent holding it, the error says to ssh-add it instead of calling the file broken.
  • S3 versioning: storage list --all-versions shows every version and delete marker under a prefix, and storage rm KEY --all-versions removes a key with all its versions, so it is really gone (plain rm leaves them behind). It asks first like any rm; Google Cloud and Azure buckets say NOT_SUPPORTED.

Changed

  • download -r from a server keeps the files that are already on this computer and copies the rest, as download -r from storage does; it used to stop at the first one with FILE_EXISTS. The result says how many it kept (kept). --overwrite still replaces them.
  • A job's --env values and its input (--script, --stdin-file) now reach the command through a pipe from the job's private folder instead of being read from files there, so a command run as another user gets them too. With a sudo password, the job first asks sudo whether it needs one and deletes it unread when it does not.
  • Inside the engine (no change you can see): each command now runs as a call of its own, with its own output, flags, approvals and environment, instead of package-wide ones. A dry run previews only its own command's changes to the store and the vault, and only doctor or a dry run may look at an old copy of the store, never a command running beside it. cli.RunCall runs one command for an engine.Call (its environment, input, output and approval window), so the Mac and iPhone apps can run a person's command and an AI agent's command at the same time in one process. A call that still holds the store after another call opened it again (the file was replaced, or its key changed) gets STORE_CONFLICT ("run it again") instead of a raw database error, and such handles are closed once nothing uses them, so a long-running process keeps no pile of them. The plan, and what the lower packages still share, is in docs/design/engine-per-call.md.

Fixed

  • A symbolic link inside the folder a download -r or a sync from a server or storage writes into was followed: a file could land wherever the link leads, outside the folder, and sync --delete could remove a file there. komando now stops at such a link (UNSAFE_PATH) and writes nothing through it; a file that is itself a link is replaced, never written through.
  • job kill on a server whose /bin/sh is dash (Debian, Ubuntu) stopped only the job's shell, not the commands it had started: dash refuses kill -SIG -- -PGID, and komando then fell back to the shell alone. It now signals the whole process group there too.
  • cluster logs --limit 0 showed no lines; it now reads every line, as --limit 0 does elsewhere.
  • A server could hide text in its output on your terminal (ESC[8m), make a line read in another order than it runs with bidi overrides (U+202E), or print over the [web1] name in front of its lines with a carriage return (exec on several servers, cluster logs of several pods). These now show as \e[8m, \u202e and \r. Colours and progress bars on one server stay as they were.
  • The ssh gate let a key run commands on this computer through a listed server that is this computer under another name: its LAN address, a DNS name, a public IP or a port forward. It now refuses a server at one of this computer's own network addresses, or whose pinned host key is this computer's own SSH host key, as it refuses localhost.
  • doctor checked only komando's folder and its main files for access by other users, not the vpn/, login/ and tunnels/ folders and the logs and state in them. It checks those too now, and the fix it names covers everything inside (chmod -R go-rwx).
  • On Linux, another process of the same user (an AI agent's shell among them) could attach to a running komando or read its memory and environment through /proc, where vault values and the store's key are. komando now makes itself not dumpable (PR_SET_DUMPABLE); programs it starts are not affected.
  • The logs of tunnels, server logins and VPN sessions stayed in komando's folder for good (tunnel logs piled up, one per tunnel). A log that nothing running uses is now removed after a week, when the next tunnel, login or VPN starts.
  • A komando folder that was already there with others' access (after a copy, an unzip or a chmod) stayed readable by them; komando now makes its own folder (one that holds store.db or store.key) private again (0700) on Linux, macOS and BSD. The komando-ssh-* folders host ssh-command leaves in the temporary folder are removed by the next run once they are a day old.
  • komando could leave a core file when it crashed, holding vault values and the store's key (Go strings cannot be wiped). It now turns core files off for itself (and the programs it starts) on Linux, macOS and BSD.
  • reboot kept all the output of its commands on the server: a server that flooded it could fill this computer's memory. It now keeps 64 KiB, and a test checks that every remote command komando runs bounds its output.
  • A job start --sudo that sudo refused before it began (no rights, a wrong password) left its env file, with the server's env values from the vault, and its script in the job folder on the server. Both are removed when the job ends, whatever happened.
  • cluster run TARGET -- cp POD:PATH DST wrote a pod's files to this computer as they were for an AI agent (a .env, a key, real secret values), and held any amount of data in memory. It now copies as download does: for an agent a file that is a secret by its name is refused (SENSITIVE_FILE), a text file is written with its secret values [hidden], and a binary or larger file holding a vault value is refused, all before anything is written; for everyone a copy from a pod stops at 512 MiB (FILE_TOO_LARGE).
  • A second Ctrl-C, or closing the terminal (SIGHUP), ended komando without removing its temporary files: a half-copied download, a sign-in browser profile in the temporary folder, a database CA copy, an AWS token file being written. The first signal (SIGHUP too) now stops the command cleanly; the second removes what this run made, then exits. Sign-in profiles, CA copies and AWS token files left by a run that was killed outright are removed by the next run that makes one, once they are a day old.
  • A server's own env value from the vault (host edit --env API_TOKEN=secret:NAME) went into every AI agent's command there, where printenv API_TOKEN | rev read it back unmasked. For an agent such values are now left out (a warning on exec and job start says which) unless it adds --yes and the user allows it in komando's window (SECRET_DESTINATION). Plain env values, and people's and scripts' commands, are unchanged.
  • Hiding vault values in output told an AI agent which of its guesses was a secret: secret show GUESS or exec web1 -- echo GUESS printed [secret:NAME] on a hit. An agent's arguments, flags, --script, --stdin-file and db query --file that hold a vault value are now refused before anything runs, a dry run too (SECRET_INPUT_INVALID, exit 2), and the refusal is written to the audit log. The message never says which secret matched.
  • An AI agent could switch off the old-copy check with KOMANDO_KEYCHAIN=off: komando then did not read the store's change count from the keychain, so an agent could move store.db and store.key aside (or put an old copy back) and work with a store that has no pinned host keys or protected servers. For an agent, off no longer covers the change count; a missing or older store stops with STORE_OLD_COPY as it does without off.
  • docker ps, docker stats, docker images and docker inspect with --sudo on a server where sudo wants a password, or the login user may not use sudo, stop with PERMISSION_DENIED and a hint that names the fix, as the other docker commands do; they gave a plain remote error. Without sudo on the server it is TOOL_MISSING, and their docker failures are typed too (DOCKER_MISSING, DOCKER_PERMISSION, NOT_FOUND). For a login as root, the hint of every docker command now says to leave out --sudo (docker has no --no-sudo).
  • On Windows, the hints for an encrypted key wrote it as ~/'.ssh\id_ed25519'; they now write ~/.ssh/id_ed25519.
  • On Windows, the AI agent guard (komando guide guard) let globs such as cat ~/.komand?/vault.ke? through, and reads of /proc/*/environ (which Cygwin and MSYS shells have): it split paths only by /.
  • On Windows, cluster run TARGET -- cp C:\data pod:/tmp took C:\data for pod C: it copied from that pod instead of sending the folder, and so skipped the check that keeps komando's data and secret files on this computer for an AI agent. A path with a drive letter is a path on this computer, as kubectl cp reads it.
  • On Windows, a server, cluster or registry that refuses the connection is CONNECTION_REFUSED ("connection refused") as on other systems, not CONNECT_FAILED or KEYSCAN_FAILED with Windows' own words; test --wait and host trust tell it apart again.
  • On Windows, a VPN's web sign-in stopped with "fork/exec ...: not supported by windows" when Chrome, Edge or Brave was installed: komando cannot give a browser its DevTools pipe there. The sign-in now opens in your own browser and you paste the address it ends on, as on a computer without one of those browsers.

Security

  • komando update checks that a release comes from the komando project, not only that its files match its checksums.txt: someone able to replace a release's files could replace checksums.txt too. The release workflow now signs checksums.txt with the project's Ed25519 key (checksums.txt.sig), and komando checks it with the public key built in, before anything is downloaded or asked (in --dry-run too). A release without that signature stops with RELEASE_SIGNATURE_NOT_FOUND, a wrong one with RELEASE_SIGNATURE_INVALID; nothing is changed. Releases up to 0.13.0 are unsigned: to go back to one, use the install line with KOMANDO_VERSION.
  • A dry run no longer starts an empty store where store.db went missing while the keychain still remembers its change count. Its audit record made a new, empty store and set the keychain's count down to it, so the next plain command ran on the empty store, without its servers, rules, secrets and pinned host keys. Now no command makes a store there: a dry run reads it as missing, and every command stops with STORE_OLD_COPY until store.db is put back or a person runs komando doctor --accept-old-copy. When the keychain cannot say whether it remembers a count for the folder (locked, or no answer in time), an AI agent's command makes no store (STORE_OLD_COPY, or KEYCHAIN_SLOW), and nobody's command does in a folder that had a store. Every store now leaves store.made in its folder and keeps it there, also a store whose key is in the keychain (it has no store.key); a store made by an older komando gets it the next time it is opened. With it, store.key, runtime.pids and the other files listed in docs/features/settings.md show that a folder had a store; the lock files a refused command leaves do not. A person or a script in a folder that never had a store still gets one, with its key in store.key and a note on stderr that the key file alone guards it. A keychain that says it has no count, or a computer with no keychain, starts a new store as before. A dry run or doctor looking at an older copy of the store can no longer write into it either (a dry run's audit record now says it could not be written there).
  • A store whose key is in store.key or a passphrase is no longer changed while the keychain cannot say whether it remembers a newer count for the folder (locked, or no answer in time). It may be a backup from before komando secret keychain, and each change would raise its count until it passed for the newest copy. Such a store is read; a change stops with KEYCHAIN_FAILED (or KEYCHAIN_SLOW) and nothing is changed. Unlock the keychain and run it again; on a computer with no working keychain, a person sets KOMANDO_KEYCHAIN=off. An AI agent's KOMANDO_KEYCHAIN set to a keychain file is no longer used, for the store's key or its change count: an agent's call keeps both in the login keychain, so a path cannot hide the count, and a store's key and count are never split between two keychains. A person's keychain file works as before for the person; a store whose key is in it is not opened by an agent's call.
  • The release can sign the macOS binaries with the project's Developer ID and have Apple notarize them, so Gatekeeper accepts them. Until the owner adds the signing secrets, macOS binaries stay unsigned and the release log says so.

Update: komando update (sudo komando update when komando is in
/usr/local/bin). From 0.6.0 or older, or to install, run:

curl -fsSL https://raw.githubusercontent.com/sgnd/komando/main/install.sh | sh

Check a download: gh attestation verify FILE --repo sgnd/komando