Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/core/src/policy/policies/read-only.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,8 @@ priority = 50
toolName = "google_web_search"
decision = "allow"
priority = 50

[[rule]]
toolName = "codebase_investigator"
decision = "allow"
priority = 50
Comment on lines +58 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While codebase_investigator currently uses only read-only tools, allowing it by default introduces a potential security risk due to an inconsistency in its definition in packages/core/src/agents/codebase-investigator.ts.

Specifically:

  • The agent's prompt (line 109) states it can use the web_fetch tool.
  • The agent's toolConfig (line 85) does not grant it this capability.

The web_fetch tool is not present in this read-only.toml allowlist, which implies it is not considered safe to run by default without user confirmation. If a future change "fixes" the agent by adding web_fetch to its toolConfig, this policy rule would silently permit a potentially unsafe tool to run.

This latent security vulnerability should be addressed before whitelisting the agent. I recommend resolving the inconsistency in codebase-investigator.ts (e.g., by removing the mention of web_fetch from the prompt) before merging this change.

Loading