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
3 changes: 3 additions & 0 deletions .agent/scripts/generate-opencode-agents.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ def get_agent_config(display_name, filename, subagents=None, model_tier=None):
# Bash has granular permissions for read-only file discovery commands
# Path-based permissions: deny by default, allow specific paths
config["permission"] = {
# Allow reading from external directories (e.g., ~/.aidevops/agents/)
# Required for version check greeting and reading agent documentation
"external_directory": "allow",
Copy link

Choose a reason for hiding this comment

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

external_directory: "allow" removes the user prompt for any external path access, which could unintentionally let Plan+ read sensitive files in $HOME (e.g., ~/.ssh, ~/.config). Is it possible/desirable to scope external access to just ~/.aidevops/agents/ (or the specific VERSION file) to keep Plan+ as locked down as intended?

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎

Comment on lines +340 to +342

Choose a reason for hiding this comment

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

security-high high

While this change fixes the immediate issue, granting a blanket allow for external_directory access introduces a significant security risk. This could potentially allow the agent to read any file on the user's filesystem outside of the project directory, which is contrary to the principle of least privilege.

Given the history of security hardening for the Plan+ agent (e.g., path-based write permissions in #112, permission bypass fix in v2.5.3), it would be much safer to use a more granular, path-based permission.

The suggested change restricts read access to only the ~/.aidevops/agents/ directory, which is what's required according to the PR description. This significantly reduces the potential attack surface.

Suggested change
# Allow reading from external directories (e.g., ~/.aidevops/agents/)
# Required for version check greeting and reading agent documentation
"external_directory": "allow",
# Allow reading from the aidevops agent directory for version checks and documentation.
"external_directory": {
"read": ["~/.aidevops/agents/"]
},

"bash": {
# File discovery commands (fast alternatives to mcp_glob)
"git ls-files*": "allow",
Expand Down
Loading