Documented default permission doesn't match the one in the code (no default restriction for `external_directory`)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- documentation
Research direction
Start with the default permissions in packages/schema/src/agent.ts at the linked line, then compare them with the permissions documented at the linked defaults page. Check whether the external_directory ask rule is absent elsewhere in the source. Done when the documented default and the code agree on that rule.
Written by the indexing model from the issue text.
Description
Description
Hello,
As documented here, default permission should be:
[
{ "action": "*", "resource": "*", "effect": "allow" },
{ "action": "external_directory", "resource": "*", "effect": "ask" },
{ "action": "read", "resource": "*.env", "effect": "ask" },
{ "action": "read", "resource": "*.env.*", "effect": "ask" },
{ "action": "read", "resource": "*.env.example", "effect": "allow" },
]
But in the source code (AFAIK):
permissions: [
{ action: "*", resource: "*", effect: "allow" },
{ action: "read", resource: "*.env", effect: "ask" },
{ action: "read", resource: "*.env.*", effect: "ask" },
{ action: "read", resource: "*.env.example", effect: "allow" },
],
The { "action": "external_directory", "resource": "*", "effect": "ask" } is missing.
(and it doesn't seems to be add in the code somewhere else).
Regards
Plugins
No response
OpenCode version
80fb31ebb7e8dfa5c26fc51ca81da8e06b618a52
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
- Dominant language
- TypeScript
- Stars
- 213k
- Forks
- 28.4k
- Avg merge
- 8h 32m
- Merged PRs (30d)
- 253
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
reproduced
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
anomalyco/opencode#55676 · 1 comment ·
Maintainers usually reply within 1 day
-
tui: NumPad End/Home ignored under kitty keyboard protocol (Windows Terminal reports KP_END 57424)Possibly taken @argszero claimed this today. Openreproduced
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anomalyco/opencode#55533 · 2 comments ·
Maintainers usually reply within 1 day
-
pending close triaging
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
anomalyco/opencode#55392 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
anomalyco/opencode#55383 · 3 comments ·
Maintainers usually reply within 1 day
-
web: second Firefox tab never connects to /api/event - Cache-Control: no-cache lets Firefox's HTTP cache block concurrent SSE requestsPossibly taken @zonemeen claimed this 1 day ago. Openreproduced
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#55369 · 2 comments ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
xdjs/MusicNerdWeb#1532 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
sebastian-software/ardo#352 ·
Maintainers usually reply within 1 day
-
@react95/core good first issue
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
@shikijs/stream: `ShikiStreamTokenizer.clone()` shares its `tokensStable` array with the originalPossibly taken @xyrolle claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day