You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sandbox-escape-ssh-self misses an ssh-to-self call after ; or && inside a command substitution #36949
I searched open issues and this is not already reported.
KiroCrew version
main at 967f4e0 (source checkout, not a release build)
Release channel
Not sure
How is it installed?
From source
Platform
Not platform-specific
What happened
The ssh-to-self guard (sandbox-escape-ssh-self) lets an ssh-to-this-host call through when it is the second command of a ; or && chain inside a command substitution. Bash runs every command in the body, so the ssh runs.
The -p 22 keeps the rule's catalog pattern from matching, so only the argv floor judges these lines. The payload walk does find the body frame, but its tokens come out as ['echo', 'hi;', 'ssh', ...]: the floor reads the frame as one command and never splits it at the ; or &&.
Steps to reproduce
On main, call kiro_crew.security.deny_gate.is_denied with the lines above.
The top-level chain and the piped body are refused with rule=sandbox-escape-ssh-self component=argv-floor.
The ; and && bodies are allowed, although bash runs the same ssh.
Anything else
Expected: a substitution body is split into its commands the same way a top-level line is, so each command in it is judged.
Found while working on #36903; the gap is the same on main and on that PR's head.
The payload walk does produce the frame ssh -p 22 localhost id for the second backtick span, but the ssh floor does not refuse it when an earlier backtick substitution sits on the same line.
Activity
buluoray commentedon Nov 14, 2026
A second shape with the same symptom, also allowed on main at c275f70, will be fixed in the same PR:
The payload walk does produce the frame
ssh -p 22 localhost idfor the second backtick span, but the ssh floor does not refuse it when an earlier backtick substitution sits on the same line.fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
fix(security): judge every command of a substitution list for ssh-to-…
14 remaining items
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self
fix(security): judge each substitution body for ssh-to-self (kirodotd…
fix(security): judge each substitution body for ssh-to-self (#37616)
fix(security): judge each substitution body for ssh-to-self (#37616)
fix(security): judge each substitution body for ssh-to-self (#37616)
fix(security): judge each substitution body for ssh-to-self (#37616)