mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-18 05:50:30 -07:00
Revert "fix(core): prevent SIGHUP kills in PTY environments" (#27401)
This commit is contained in:
@@ -56,11 +56,7 @@ export async function getCommandName(req: SandboxRequest): Promise<string> {
|
||||
const roots = getCommandRoots(stripped).filter(
|
||||
(r) => r !== 'shopt' && r !== 'set',
|
||||
);
|
||||
// Single-root enforcement: only grant named-command permissions when the
|
||||
// command is unambiguous. Multi-root chains fall back to basename so that
|
||||
// a chained command like `git; malicious_cmd` never inherits `git`'s
|
||||
// sandbox policy for the entire chain.
|
||||
if (roots.length === 1) {
|
||||
if (roots.length > 0) {
|
||||
return roots[0];
|
||||
}
|
||||
return path.basename(req.command);
|
||||
|
||||
Reference in New Issue
Block a user