security: remove bash_execute, harden code-agent skill#29
Open
initializ-mk wants to merge 1 commit intomainfrom
Open
security: remove bash_execute, harden code-agent skill#29initializ-mk wants to merge 1 commit intomainfrom
initializ-mk wants to merge 1 commit intomainfrom
Conversation
bash_execute runs `bash -c` which bypasses all cli_execute security layers (shell denylist, binary allowlist, argument validation, path confinement). Although denied_tools blocked it at runtime, that is a soft boundary. Defense in depth: remove the capability entirely. - Delete bash_execute.go - Remove registration functions and WriteTools entry - Remove from runtime loop phase classification - Remove from denied_tools in both SKILL.md files - Update tests and documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bash_executetool entirely — it ranbash -cwhich bypasses all 12 security layers ofcli_execute(shell denylist, binary allowlist, argument validation, path confinement). Althoughdenied_toolsblocked it at runtime, that is a soft boundary. Defense in depth: remove the capability entirely.bash_executereferences fromdocs/tools.mdanddocs/skills.mdbash_executefromdenied_toolsin both embedded and standalone skill definitions (no longer needed since the tool doesn't exist)Files changed
forge-core/tools/builtins/bash_execute.goforge-core/tools/builtins/register.goforge-core/runtime/loop.goforge-core/runtime/loop_test.goforge-core/tools/builtins/code_agent_tools_test.goforge-skills/local/embedded/code-agent/SKILL.mdskills/code-agent/SKILL.mddocs/tools.mddocs/skills.mdTest plan
cd forge-core && go test ./...— all tests passcd forge-cli && go test ./...— all tests passgolangci-lint run— 0 issues across all modulesbash_executein codebase