Repository navigation
v0.14.0
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 --revealand
key show --revealfrom 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.txtis
signed with the komando project's key.komando updatechecks 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.dbwent missing, a keychain that cannot answer stops changes
instead of guessing, and every store leaves astore.mademarker that
shows the folder had one. - Move everything in one sealed file.
komando export --sealedputs
your servers, secrets and (with--with-keys) private keys in one file
locked with a passphrase, andexport --for-phoneseals it for the
iPhone app. - More for apps and scripts.
cache keysshows each key's type and time
to live,--progresswrites how far a copy is as JSON lines,
cluster describeandcluster logsgive structured detail, and
komando schemalists the kinds eachaddtakes. - 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.mdhas 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 replaceandfs restoretake 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, asfs rmandexecgive:data.results[](host,ok,path,changedorwould_change,replacements,diff,backup,error) anddata.summary; For one server the fields moved:data.pathis nowdata.results[0].path,data.changedisdata.results[0].changed,data.would_changeisdata.results[0].would_change, and the same forreplacements,diff,backup,fromandnote. Error codes stay the same (NO_MATCH,BACKUP_NOT_FOUND...).fs writestays one server.
Added
- See a secret again from the Komando Mac app:
secret show NAME --revealfrom 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 throughssh-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 --revealprints 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:terminalorwindow) and the programs that started komando (started_from), and every refused--revealwith the secret's or key's name. komando export --sealed --to FILEmoves 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-keysadds the private keys the servers use.komando import komando FILEasks for the passphrase and puts the secrets into the vault, never over one that is there with another value unless--overwriteand the person says yes.komando export --for-phone --to FILEseals 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 getsNEEDS_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 indocs/design/sealed-file.md, with test vectors ininternal/sealfile/testdata/vectors.json.exportlists the secrets of a VPN's config and a server's environment variables insecrets_neededtoo, andexport --overwritereplaces the file as its help says (it stopped withFILE_EXISTS).cache keysgives each key's type and time to live, never its value: the JSON hasitems(key,type,ttl_seconds; -1 = no expiry, null = unknown) next to the unchangedkeys, and the text shows KEY, TYPE and TTL columns. On Redis and Valkey,TYPEandPTTLfor the whole page go in one round trip (one per master in a Cluster); on memcached the type isstringand 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 addandkomando schema conn add(anddb add,cache add,queue add,storage add,cluster add,registry add) list the kinds each takes underadd_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 whethervpn upopens 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 --helpnow shows its "Which flags go with which VPN kind" table from the same list, andvpn addrefuses a flag the list does not give that kind, as it did before.--progressonupload,download,cp,syncandstorage 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 isnullwhen komando cannot know it. The result on stdout is unchanged, and without--progress(or in text mode) nothing changes.cluster describe -o jsonof a Kubernetes object addsdata.detailfor a program to read:kind,name,namespace,status(a pod's phase,ready 2/3for a workload),created_at,labels,conditions[]andevents[](type,reason,message,count,last_seen_at). It never holds a Secret's values.cluster logs -o jsonaddsdata.lines[](logged_at,pod,container,text) anddata.truncated(alsometa.truncated) when a pod sent--limitlines. The fields there before stay as they were.job start --stdin-file FILEgives the job's command FILE as its input,job start --sudo-user USERruns it as USER withsudo -u(both as inexec), andjob start --timeout 2hstops the job after that long. A timed-out job iskilledwithtimed_out: trueinjob status, andjob waitsays the timeout stopped it. Whenexectimes out with--sudo-useror--stdin-file FILE, its hint now names the matchingjob startline.komando statuslists 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 asaws sso logoutdoes: AWS is told to end the token and the login in~/.aws/sso/cacheis deleted. Before,komando logout awswas read as a server named aws.- Docs: "Restore from a backup" in the import guide: which backups of
~/.komandoopen on this computer and on a new one (passphrase,store.key, keychain), and what to do aboutSTORE_OLD_COPYafter a restore. registry rmand 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 prunereads repositories of up to 10000 tags (it stopped above 1000 withTOO_MANY_TAGS), asking for the tags' digests 8 at a time.key revoke --all-users(with sudo) removes the key from theauthorized_keysof 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_idleto a longer time, or to0(never close), now counts as a safety setting likelogin_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.pubnext to the key file, assshuses it) is offered at login, then the key alone, so servers that trust an SSH certificate authority let komando in.key add --cert FILEandkey 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 showcert_pathwhen 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
--viasteps, and a conn's--viasteps, now keep the record ID beside the name (key_id,via_idsin 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 forupdate. logs --container(anddocker logs) take--since today,yesterdayandnow, as the journal does: the server's own midnight or time, worked out on the server. They stopped withUSAGEbefore.net dns --type MX(and CNAME, NS, TXT, SOA, SRV, PTR, CAA) works on servers withoutdig: komando asks the server's own resolver from/etc/resolv.confover TCP through the SSH connection and shows the records asdig +shortdoes.DIG_MISSINGstays for a server with no resolver listed or no TCP forwarding. A PTR question for an IP address now asks its reverse name.sync --sudosends a folder to servers as root, for folders the SSH user cannot write (/etc/nginx/conf.d): each file is installed asupload --sudoinstalls 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.--deleteremoves as root too.komando import mobaxterm FILEadds MobaXterm's SSH sessions from an exported.mxtsessionsfile, with each session's folder as a group.komando import putty FILEadds PuTTY's SSH sessions from a.regfile (reg export HKCU\Software\SimonTatham\PuTTY\Sessions putty.reg, UTF-16 or plain): user, address and port; a key file path is kept, a.ppkkey, a proxy and telnet or serial sessions are listed with what to do.- MongoDB:
db explainshows a read's plan (queryPlanner;--analyzeruns it and addsexecutionStats), anddb activitylists what runs now (currentOp;--alladds idle connections), in the same row shape as for SQL databases. They saidNOT_SUPPORTEDbefore. komando import aws-ec2adds 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 itsNametag, 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-agentlends a server your ssh-agent while komando is connected, asssh -Adoes (for agit pullover 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-agenttakes it back;host ssh-commandadds-o ForwardAgent=yesfor such a server.- Security keys (FIDO2:
ed25519-sk,ecdsa-sk):key addtakes their key file (the public key fromFILE.pub), and a server that logs in with one uses the copy in ssh-agent, found by its public key, assshdoes; the device asks for a touch. Without the agent holding it, the error says tossh-addit instead of calling the file broken. - S3 versioning:
storage list --all-versionsshows every version and delete marker under a prefix, andstorage rm KEY --all-versionsremoves a key with all its versions, so it is really gone (plainrmleaves them behind). It asks first like anyrm; Google Cloud and Azure buckets sayNOT_SUPPORTED.
Changed
download -rfrom a server keeps the files that are already on this computer and copies the rest, asdownload -rfrom storage does; it used to stop at the first one withFILE_EXISTS. The result says how many it kept (kept).--overwritestill replaces them.- A job's
--envvalues 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.RunCallruns one command for anengine.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) getsSTORE_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 indocs/design/engine-per-call.md.
Fixed
- A symbolic link inside the folder a
download -ror asyncfrom a server or storage writes into was followed: a file could land wherever the link leads, outside the folder, andsync --deletecould 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 killon a server whose /bin/sh is dash (Debian, Ubuntu) stopped only the job's shell, not the commands it had started: dash refuseskill -SIG -- -PGID, and komando then fell back to the shell alone. It now signals the whole process group there too.cluster logs --limit 0showed no lines; it now reads every line, as--limit 0does 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 (execon several servers,cluster logsof several pods). These now show as\e[8m,\u202eand\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. doctorchecked only komando's folder and its main files for access by other users, not thevpn/,login/andtunnels/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.dborstore.key) private again (0700) on Linux, macOS and BSD. Thekomando-ssh-*foldershost ssh-commandleaves 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.
rebootkept 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 --sudothat 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 DSTwrote 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 asdownloaddoes: 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, whereprintenv API_TOKEN | revread it back unmasked. For an agent such values are now left out (a warning onexecandjob startsays which) unless it adds--yesand 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 GUESSorexec web1 -- echo GUESSprinted[secret:NAME]on a hit. An agent's arguments, flags,--script,--stdin-fileanddb query --filethat 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 movestore.dbandstore.keyaside (or put an old copy back) and work with a store that has no pinned host keys or protected servers. For an agent,offno longer covers the change count; a missing or older store stops withSTORE_OLD_COPYas it does withoutoff. docker ps,docker stats,docker imagesanddocker inspectwith--sudoon a server where sudo wants a password, or the login user may not use sudo, stop withPERMISSION_DENIEDand a hint that names the fix, as the other docker commands do; they gave a plain remote error. Without sudo on the server it isTOOL_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 ascat ~/.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:/tmptookC:\datafor podC: 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, notCONNECT_FAILEDorKEYSCAN_FAILEDwith Windows' own words;test --waitandhost trusttell 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 updatechecks that a release comes from the komando project, not only that its files match itschecksums.txt: someone able to replace a release's files could replacechecksums.txttoo. The release workflow now signschecksums.txtwith 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-runtoo). A release without that signature stops withRELEASE_SIGNATURE_NOT_FOUND, a wrong one withRELEASE_SIGNATURE_INVALID; nothing is changed. Releases up to 0.13.0 are unsigned: to go back to one, use the install line withKOMANDO_VERSION.- A dry run no longer starts an empty store where
store.dbwent 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 withSTORE_OLD_COPYuntil store.db is put back or a person runskomando 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, orKEYCHAIN_SLOW), and nobody's command does in a folder that had a store. Every store now leavesstore.madein its folder and keeps it there, also a store whose key is in the keychain (it has nostore.key); a store made by an older komando gets it the next time it is opened. With it,store.key,runtime.pidsand the other files listed indocs/features/settings.mdshow 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 instore.keyand 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.keyor 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 beforekomando secret keychain, and each change would raise its count until it passed for the newest copy. Such a store is read; a change stops withKEYCHAIN_FAILED(orKEYCHAIN_SLOW) and nothing is changed. Unlock the keychain and run it again; on a computer with no working keychain, a person setsKOMANDO_KEYCHAIN=off. An AI agent'sKOMANDO_KEYCHAINset 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 | shCheck a download: gh attestation verify FILE --repo sgnd/komando