Skip to content

security: remove bash_execute, harden code-agent skill#29

Open
initializ-mk wants to merge 1 commit intomainfrom
skills/code-agent
Open

security: remove bash_execute, harden code-agent skill#29
initializ-mk wants to merge 1 commit intomainfrom
skills/code-agent

Conversation

@initializ-mk
Copy link
Contributor

Summary

  • Remove bash_execute tool entirely — it ran bash -c which bypasses all 12 security layers of cli_execute (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.
  • Update docs — removed bash_execute references from docs/tools.md and docs/skills.md
  • Update SKILL.md — removed bash_execute from denied_tools in both embedded and standalone skill definitions (no longer needed since the tool doesn't exist)

Files changed

File Change
forge-core/tools/builtins/bash_execute.go Deleted
forge-core/tools/builtins/register.go Removed registration functions and WriteTools entry
forge-core/runtime/loop.go Removed from phase classification
forge-core/runtime/loop_test.go Removed test case
forge-core/tools/builtins/code_agent_tools_test.go Removed 5 test functions, updated expected count
forge-skills/local/embedded/code-agent/SKILL.md Removed from denied_tools
skills/code-agent/SKILL.md Removed from denied_tools
docs/tools.md Removed bash_execute references
docs/skills.md Removed bash_execute references

Test plan

  • cd forge-core && go test ./... — all tests pass
  • cd forge-cli && go test ./... — all tests pass
  • golangci-lint run — 0 issues across all modules
  • No remaining references to bash_execute in codebase

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant