Repository navigation
Highlights
- Shell keys.
ssh-gate line --shell-accesslets a key open a login
shell on one server; ssh-gate checks, audits and limits it. - A steadier approval window on macOS. It stays open when another app
takes the focus, and a window that fails is reported as its own error
(APPROVAL_WINDOW_FAILED), never as a Deny. - Agent recognition by process ancestry. komando reads the processes
above it, so an agent that clears its variables is still an agent. - SSH certificate authorities for host keys (
host ca), a handshake
view invpn status, and abody_sha256for every script or content a
command sends.
Added
-
KOMANDO_APPROVAL_DEBUG: on a Mac, each approval window adds what it
saw toapproval-debug.login komando's run folder (0600): the keys,
the focus, handler errors, how it ended andosascript's exit and error
output, never the texts it shows (C237). A key is named (Tab, Return,
Esc, Space, an arrow, Page Up, Page Down, Home, End) only while one of
the window's own controls has focus; otherwise, as in a selectable text
field, the log writes only a class: digit, letter, Tab, arrow or other
(C256). -
komando ssh-gate line --shell-access: a key that may change things
may also open a login shell on one server,ssh -t HOST komando shell SERVER. Its line starts withrestrict,pty,, so sshd gives it a
terminal when it asks for one. ssh-gate refuses the shell on a
protected server, a Windows server or this computer, with any other
word or flag, and without the terminal (SSH_GATE_REFUSED);db shell
andcluster shellstay refused, and every other command gets the
answer a key without--shell-accessgets.ssh-gate statusand
ssh-gate lineshowshell_access. Not with--read-only(USAGE).
ssh-gate opens the shell in its own process, after its checks;komando shellitself still opens none for an AI agent or a key. When the key's
terminal changes size, the server's terminal follows. A shell key is
full control of the server it opens on, outside komando's per-command
policy, masking and audit. -
komando host ca add|list|rm|revoke: trust servers through the SSH
certificate authority that signs their host keys (@cert-authority),
with no pin per server (C38b). A pattern names at least the domain
(CA_HOSTS_INVALID); only a person at a terminal can add a CA
(NEEDS_PERSON).--fromreads a known_hosts file's@cert-authority
and@revokedlines. A--login askserver is never trusted through a CA. -
komando vpn statusshows a WireGuard session's last handshake, its
age and the tunnel's state:up,idle(no handshake for 3 minutes
and nothing sent) ordead(no handshake for 3 minutes although
something was sent or a keepalive is set). JSON:last_handshake_at,
handshake_age_seconds,tunnel_stateandtunnel_dead. -
A command that sends a script or content (
exec --script,
--stdin-file,fs write, an upload,queue send,cluster apply,
db restore,recipe run) records its full SHA-256 asbody_sha256
in the audit record and inmetaof its JSON output, so a person can
match the 16 hex characters the approval window shows to the exact
file (C197). Safety (History) says what each command's hash covers. -
The approval window speaks Indonesian (C191):
komando config set approval_language id, or the defaultauto, which follows the system
language. Every line komando writes in the window is translated, the
risk words of each built-in rule too; the command and script are not. -
The approval window names encoded data it cannot show in a readable
way (C208): a block of base64, base32 or hex of 64 or more characters
(a heredoc ora+="…"pieces count as one block), or a long run of
\xNNor octal escapes, gets a risk line with its kind, size, decoded
size and lines, in English and Indonesian. A 64-digit hash on a line
that names it and public PEM blocks do not count.
Changed
secret set,import,vpn addanddoctorwarn when a secret's
value is a common word (only letters and shorter than 10 characters, or
a common password such aspassword1). The warning names the secret,
never the value. Such a value is easy to guess, and one of 6 or more
characters is hidden wherever that word appears in komando's output
(C186).- The safety docs now say what the approval window and the approval code
stop: an agent that works through komando or is held in a sandbox. A
program that runs freely as you can read the vault key (keychain or
store.key) and so every secret; a passphrase or the agent's own sandbox
is the boundary. - The approval window an AI agent's
--yes,--allow-dangerousor
--revealopens on macOS and Windows is a plain system window, 440
points of text wide, with no icon: the action as the title ("Run a
command on db-2.example.test", "Change 4 servers"), then "Asked by"
the agent, "Status: Protected", one "Risk:" line per risk in plain
words ("Deletes a system folder recursively (rm -rf)", no rule ids),
"Skips:" only for a check the other lines do not name, "Options:" for
every flag that changes what runs or where (an --env value never),
and "Command:" with what runs. A script shows its line count, size,
the first 16 digits of its SHA-256 and every line, as before (a longer
one opens no window).
Deny stays the default and the Esc key, and the window still closes
itself after 2 minutes.
Security
-
An AI agent is no longer a person because it cleared its variables.
komando also reads the processes above it (macOS and Linux): a parent
with the agent's variables, or a harness known by name or command line
(claude,codex,cursor-agent,gemini,opencode, a node
package such asclaude-code, and others; Safety lists them), makes
the call an agent's. A terminal from an ssh login from this computer
no longer counts as a person. The shell refusal
(NEEDS_TERMINAL), the ssh-gate refusal of an agent caller
(SSH_GATE_REFUSED), the login and approval windows and the agent
home folder all follow the caller, soenv -i komando ...from an
agent no longer reaches them. A program that leaves the process tree
first (the system adopts a helper that outlives its parent) still goes
unseen; see Safety, Limits. -
ssh-gate: no--shell-accesskey opens a shell while a deny rule of
your own is set (extra_deny_patterns,SSH_GATE_REFUSED): komando
does not see what is typed in a shell, so a shell would get past them. -
ssh-gate: each shell session of a key is in the audit log when it
starts and when it ends, with the key's name (ssh_gate), the server
(hosts) andsession; the end record addsduration_ms, why it
ended (end:exit,idle,hangup,lostorerror) and the
shell'sexit_code. Both are written even when the audit setting is
off, and no shell opens when the start record cannot be written. If
the gate's process is killed, there is no end record; the start record
still shows the session. -
ssh-gate: started by an AI agent on the komando computer instead of
by sshd for a key, the gate runs nothing (SSH_GATE_REFUSED); the
agent runs komando directly, under its own rules. -
ssh-gate: a key's shell with no input and no output for 30 minutes
ends (SHELL_IDLE_TIMEOUT, exit 7). -
komando shell: when komando's terminal closes or a signal stops it,
the session on the server is closed too (CANCELLED). -
The safety rows of
store.dbcarry a policy MAC (C187, C234): the
protected marks of servers, conns and VPNs, the other server, conn and
VPN settings komando asks a person for (forward_agent,
proxy_command, a trusted login program,mfa,legacy_crypto,
allow_pap), the deny rules and safety settings, the approval code
settings, pinned and revoked host keys, trusted host CAs and the
settings row's sealed copy. It is an HMAC-SHA256 under a policy key made
from the store's key, checked on every read and write; komando writes it
again with each change it makes. A row changed outside komando stops
every command withPOLICY_MAC_FAILED, naming the row. The store's
keys now come from its key under one label each (row, value, runtime,
ticket, policy), and records are sealed under a new row key: a program
given the row key alone opens no secret value, makes no ticket and
cannot change a safety row unseen. A store made by an older komando
gets its MAC once, on its first open; after that an older komando
stops withSTORE_NEWER, so update every komando that uses the folder
and restart VPN sessions, tunnels and server logins started before. -
A new deny rule,
decode-run(andwin-decode-runfor PowerShell),
stops a script or command that decodes hidden text and runs it: a
decoder (base64 -d, also as-dior-dw0,basenc -d,
python3 -m base64 -d,xxd -r,openssl enc -d,printfwith escapes
or%b,rev, a rot13tr)
piped into a shell or interpreter,eval "$(… base64 -d)", a
python -corperl -ethat runs decoded text, a decoded file that a
later step runs, andFromBase64Stringwithiexor
[scriptblock]::Create. It needs--allow-dangerousand a person's yes,
like the other rules (C208). -
A script or command that holds a private key (its BEGIN line is
enough, or a PuTTY key file header) is refused, for AI agents and
people alike, with the newENCODED_SECRET_INVALID: the key would
reach the approval window, the audit log and the server (C208). -
An upload of one file hashes the bytes as they are sent. When an
agent's approval window showed other bytes (the file changed after the
yes), the upload stops withFILE_CHANGEDbefore the file on the
server is touched, and the stop is in the audit log (C213). -
db restoretakes itsbody_sha256in the same read that seals the
file, for every caller, so the record names the bytes the restore
sends. A file whose window read differs from the sealed bytes stops
withFILE_CHANGEDbefore anyone is asked. -
db restoreis atomic against a changed file. It used to check the
backup chunk by chunk while restoring, so a change in a later chunk
stopped withFILE_CHANGEDafter the earlier chunks had reached the
database. It now copies the file into a private file (mode 0600) in
komando's own run folder, checks the whole copy against the seal, and
only then restores from that copy's open descriptor. AFILE_CHANGED
leaves the database untouched; the copy is removed on every way out.
Too little free space for the copy stops with the new
RESTORE_SPACE_MISSING(exit 3) before anything is sent. -
cluster runreads each--from-filefile once: the approval window
and the secret or config map that is sent use the same bytes (C214). -
On macOS "Allow once" in the approval window now counts only after you
confirm with Touch ID, an Apple Watch or your login password, in the
same step. A click alone, by you or by a program that can click, no
longer allows an AI agent's--yes,--allow-dangerousor--reveal.
A cancelled or failed check, or none within 50 seconds, is a no. The window has no
code field on macOS:komando config approval-codestill works and keeps
the code for Linux, BSD and Windows on the same vault, but the macOS window
does not ask for it. A terminal that has Accessibility permission now
gets the window too, since a click cannot answer the check. Only where
the check cannot run (no Touch ID, watch or password set up, or komando
cannot tell) does such a terminal get no window: the agent asks you to
run the command yourself. -
komando secret runfor an AI agent with secrets:--envmay not set
a tool's config file (KUBECONFIG,DOCKER_CONFIG,*_CONFIG_FILE,
AWS_*_FILE) or a toolchain variable that picks binaries (CC,CXX,
GOFLAGS,CARGO_HOME,RUSTC_WRAPPER,JAVA_HOME). -
komando secret runon Linux: the program getsSIGTERMwhen komando
dies, so it does not run on with the secrets. -
Streamed output (
exec,secret run,service log --follow): a cut
of a line over 256 KiB no longer splits a masked pattern
(password=...), and a private key open at the cut is hidden through
itsENDline. The held tail is bounded at 1 MiB. -
cluster runandcluster apply: a Namespace manifest that sets
pod-security labels withoutenforceneeds--allow-dangerous, as
cluster label ...enforce-does.-k(kustomize) is refused, since
komando cannot read what it renders. -
The
~/.kubeexception for credential files folds ASCII case only, so a
lookalike such as the Kelvin sign no longer matches.kube.
Fixed
-
The macOS approval window stays open when another app takes the focus:
it no longer hides on deactivation and comes back to the front when it
stops being the key window. Only Deny, Esc, Return, the close button,
Cmd-W or the 2-minute timer end it. When the window itself fails before
anyone answers (its helper crashes or prints nothing), the command is
still refused, now with the errorAPPROVAL_WINDOW_FAILEDand a hint to
update komando and not to ask the person again, instead of reporting a
Deny nobody gave. When the panel does come back to the front, it does so
at most 3 times in 10 seconds and not when another komando panel is key;
Allow once is held for half a second after each return, and the panel
shows over another app's full-screen Space. -
The macOS approval window takes the keys as soon as it opens (C237).
The script that scrolls has the focus, so the arrows, Page Up, Page
Down, Home, End and Space scroll it with no click. Before, they did
nothing until a click on the window: macOS may refuse to make komando
the active app while another app has the keys. The window now takes
the keys without becoming the active app. Tab and Shift-Tab move the
focus from the script to Deny and, once it is on, Allow once,
and round, whatever the macOS keyboard-navigation setting, with a ring
around the part that has it; before, they moved nothing while keyboard
navigation was off. Space presses a focused button (when nothing
scrolls, Deny has the focus); Return still means Deny wherever the
focus is. A click on the script gives it the focus back, also after a
click on a line of text above it, and so does a click on the window's
background. -
In the macOS approval window, Tab, Shift-Tab, the arrows, Page Up,
Page Down, Home, End and Space no longer close the window as a Deny
(C237, #370). Any key closed it: the window's key monitor handed each
key back to AppKit as a JavaScript value, AppKit raised an exception
outside the window's script,osascriptexited with 1, and komando
read that as a Deny. The window now takes keys in its own key handler,
which hands AppKit nothing back. Tab and Shift-Tab move the focus
between Deny, Allow once (once it is on) and a script that scrolls;
Up, Down, Page Up, Page Down, Home and End scroll the script whatever
has the focus, and Space while the script has it (Space on a focused
button presses it, as anywhere in macOS). The focus ring is now a plain
box in the system focus colour, and an error in a key, focus or scroll
handler no longer ends the window. Only Esc, Return, Cmd-W, the close
button, a click on Deny or the 2-minute timeout end it as a no. -
recipe runhashes exactly the command it sends; it added a newline
before. -
The macOS approval window can be read to the end without a mouse
(C209). A script that scrolls has the focus when the window opens,
shows a focus ring, and scrolls with the arrows, Page Up, Page Down,
Home, End and Space; Allow once still turns on only after its
last line has been in view. Return and Esc still mean Deny. A long
script line that wraps now hangs under its text, not under its line
number, so a wrapped part cannot pass for a line of its own (C215). -
The macOS approval window no longer grows past the screen when a
script has long lines (C207). It stays inside the visible screen: the
title, the lines above the command and the buttons always show, and
the command and script scroll in a monospace region that takes the
space left. When it scrolls, the scroller is always drawn, a line
over the buttons says how many lines there are, and Allow once
stays off until the last line has been in view once, so padding
cannot push risky lines out of sight. Deny is still the default; a
window that fits looks as before, with no scroller. -
The approval window now names everything a power or remote-access
rule catches ("shutdown or reboot", "Stop-Computer or shutdown",
"stopping sshd or WinRM"), not just one command. -
Two
vpn upwith the same WireGuard key at the same moment no longer
end inVPN_DOWNor a briefVPN_KEY_IN_USE: the second waits up to
5 seconds for the first session of the same home to come up, then
reuses it. The key lock folder is checked with Lstat: a symlink or a
folder of another user is refused with a clear error. -
A second WireGuard session with the same key (another komando home,
or another VPN entry) no longer fights the first over the peer. A
per-user lock outside any home records the session by its public key;
vpn upreuses a running session of the same home and otherwise stops
with the new codeVPN_KEY_IN_USE. A lock of an ended process is taken
over.vpn downon one VPN of a shared session leaves it running for
the other. -
db restore: an archive whose table of contents holds more than 256 MiB
of SQL is refused withFILE_TOO_LARGE(wasBAD_FILE), naming the
limit and a way forward instead of asking for the same dump again. Any
tar file is refused as a tar, not with an SQL error. TheBAD_FILEhint
covers archives too. -
komando secret runno longer waits for a background process that the
program left holding its output: it stops reading 3 seconds after the
program exits.
Update: komando update (sudo komando update when komando is in
/usr/local/bin). From 0.6.0 or older, or to install, run:
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/sgnd/komando/main/install.sh | shCheck a download: gh attestation verify FILE --repo sgnd/komando