fix: add external_directory permission to Plan+ agent#204
Conversation
Plan+ was prompting for permission to access ~/.aidevops/agents/ when reading the VERSION file for the greeting message. Added 'external_directory': 'allow' to Plan+ permissions while maintaining the restricted write/edit permissions for planning files.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue with the Plan+ agent that caused it to incorrectly prompt for external directory access during its startup sequence. By granting the necessary Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughPlan+ agent configuration now grants Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sun Jan 25 14:03:12 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
🤖 Augment PR SummarySummary: Updates Plan+’s generated OpenCode agent config to allow external directory access. 🤖 Was this summary useful? React with 👍 or 👎 |
| config["permission"] = { | ||
| # Allow reading from external directories (e.g., ~/.aidevops/agents/) | ||
| # Required for version check greeting and reading agent documentation | ||
| "external_directory": "allow", |
There was a problem hiding this comment.
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?
🤖 Was this useful? React with 👍 or 👎
There was a problem hiding this comment.
Code Review
This pull request adds the external_directory permission to the Plan+ agent to allow it to read the VERSION file on startup without prompting the user. The fix is correct, but the implementation introduces a potential security risk by granting overly broad read permissions. My review includes a suggestion to scope down this permission to only the required directory, following the principle of least privilege.
| # Allow reading from external directories (e.g., ~/.aidevops/agents/) | ||
| # Required for version check greeting and reading agent documentation | ||
| "external_directory": "allow", |
There was a problem hiding this comment.
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.
| # 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/"] | |
| }, |



Summary
Plan+ was prompting for permission to access
~/.aidevops/agents/when reading the VERSION file for the greeting message.Fix
Added
'external_directory': 'allow'to Plan+ permissions while maintaining the restricted write/edit permissions for planning files only.Testing
After this fix, Plan+ will no longer prompt for external directory access on startup.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.