From 7cc6ed435b26ac3834a226efa3908891a20b619b Mon Sep 17 00:00:00 2001 From: Keith Patrick Date: Sun, 8 Mar 2026 20:11:47 +0000 Subject: [PATCH] feat(security): add env parameter to exec tool schema - Add env parameter to tool definition for LLM - Document blocked vars in description --- pkg/tools/shell.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkg/tools/shell.go b/pkg/tools/shell.go index 8a48b8661..66e3c2ca7 100644 --- a/pkg/tools/shell.go +++ b/pkg/tools/shell.go @@ -175,6 +175,13 @@ func (t *ExecTool) Parameters() map[string]any { "type": "string", "description": "Optional working directory for the command", }, + "env": map[string]any{ + "type": "object", + "description": "Additional environment variables to set for this command. Cannot override: PATH, HOME, USER, LOGNAME, SHELL, LD_PRELOAD, LD_LIBRARY_PATH, LD_AUDIT, LD_DEBUG", + "additionalProperties": map[string]any{ + "type": "string", + }, + }, }, "required": []string{"command"}, }