Appearance
Why It Matters
Shell trampolines hide the real execution path behind an extra shell layer. In committed MCP config that increases quoting risk, makes review harder, and often turns a direct command launch into a generic shell execution surface.
What Triggers
The rule triggers only when all of these are true:
- the file is parsed as MCP configuration
- the launch path includes
shorbash - the same launch path also includes
-c
Supported exact shapes:
command: "sh"orcommand: "bash"withargscontaining"-c"args[0]: "sh"orargs[0]: "bash"with the sameargsarray containing"-c"
Example Trigger
json
{
"command": "env",
"args": ["bash", "-c", "echo hacked"]
}Clean Cases
These stay clean:
- direct launches without
sh -corbash -c args[0]shell values when-cis not present- reviewed direct commands with explicit arguments
False Positives
The rule is intentionally narrow. It does not guess about arbitrary shell-like strings. It only fires on parsed MCP command structure with exact shell-wrapper tokens.
Remediation
Replace the shell wrapper with the direct executable and explicit arguments so the committed MCP launch path stays reviewable and least-privileged.