fix: harden explore agent permissions and bash tool validation#7881
fix: harden explore agent permissions and bash tool validation#7881antigremlin wants to merge 4 commits intoanomalyco:devfrom
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #6073: refactor(agent): set Explore subagent bash permissions to read-only This PR appears to be directly related to the current PR #7881. Both PRs address hardening the Explore agent's bash permissions. PR #6073 specifically sets bash permissions to read-only, which aligns with the current PR's goal of changing the bash permission from Related PRs (similar scope but different focus):
|
Summary
This PR addresses security and scope concerns with the Explore agent by implementing stricter permission controls and better path validation in the Bash tool.
Changes
bash.tsto include common exploration commands likels,find,grep,cat, etc. This ensures that commands targeting external directories (e.g.,ls /) correctly trigger theexternal_directorypermission check.bashpermission for the Explore agent fromallowtoaskinagent.ts. This ensures users are prompted before the agent executes shell commands, preventing unmonitored system exploration.explore.txtto explicitly instruct the agent to stay within the project directory and warn about permission prompts for bash commands.Testing
npm run test) to ensure no regressions.