-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)needs:complianceThis means the issue will auto-close after 2 hours.This means the issue will auto-close after 2 hours.
Description
Problem
PermissionNext.ask evaluated only the raw incoming pattern. When tools passed relative paths, absolute path-scoped rules could lose to broad wildcard rules.
Expected
Path-scoped rules should apply consistently whether the tool path is relative or absolute, and more specific rules should win over generic ones.
Repro
- Configure
edit: "allow"globally and a scoped deny/allow rule under a specific directory. - Trigger an edit using a relative path inside that directory.
- Observe wildcard behavior can override the scoped intent without absolute evaluation + specificity selection.
Proposed fix
In PermissionNext.ask, evaluate both relative and worktree-resolved absolute candidates, then choose the decision from the longest matched rule pattern.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
coreAnything pertaining to core functionality of the application (opencode server stuff)Anything pertaining to core functionality of the application (opencode server stuff)needs:complianceThis means the issue will auto-close after 2 hours.This means the issue will auto-close after 2 hours.