Patch Changes
-
#88
51cd60cThanks @tufantunc! - Security. Treat every shell metacharacter as disqualifying when deciding whether a command is read-only.The gate that decides whether an allowlisted binary counts as
read-onlytested
only>,;and|. Command substitution —$(...)and backticks — was not in
that set, so a command likels $(...)was classified read-only, accepted by
read-command, and expanded by the remote shell, which ran the inner command.
Theread-commandtool is what theviewerrole is restricted to, so its
read-only guarantee could be escaped.The gate now rejects every character with syntactic meaning to a shell —
; & | < > \$ ( ) { }` and newlines — rather than enumerating dangerous
constructs, which is a list that is never finished.Behaviour change: commands using shell syntax are no longer classified
read-only even when the binary is allowlisted.echo $HOMEandls | grep xnow
fall to thesafeclass, whichread-commandrefuses andrun-commandaccepts
under the profile's approval policy. If you granted a client standing permission
forread-command, that permission is now narrower — which is what it was
supposed to be.Reported privately. Upgrading is recommended for anyone relying on the
viewer
role or onread-commandas a security boundary.