Gate all built-in tools through PermissionFilter; confine read tools in trigger sessions #192
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!192
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-189-permission-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes: #189
permissionGatetool_callextension (bridge/permission-gate.ts) runsPermissionFilter.evaluatePermissionfor every tool that is neither a ClientBridge tool (bash/edit/delete/move) nor a deck custom tool. It is installed in normal sessions viaextensionsand in trigger sessions viapreloadedPreparedExtensions(restricted sessions ignoreextensions).PARAM_FIELD_MAPnow uses current tool names (grep/find/glob: path, nosearch). Multi-path calls are split on;, with a missing path treated as.. Allow rules must match every path; deny and ask rules match on any path.bridge/path-confinement.tsconfinesread/grep/find/globto the checkout in conversation, pull-request and CI-watchdog sessions. Paths are resolved with realpath (so symlinks are followed) andfile:N-M/archive:memberselectors are handled. http(s),local://andartifact://are allowed; every other URI scheme is denied. The implementer stays unconfined.extensionHandlers.toolCallTimeoutMsis raised to 24 h inDECK_SESSION_OVERRIDES. A throwaway script confirmed the isolated settings return86400000.Verification:
bun test src/bridge src/forgejo/dispatcher.test.tspasses (661 tests, 0 failures), andbun run typecheckis clean. New tests are inpermission-gate.test.ts,path-confinement.test.tsandpermission-filter.test.ts(multi-path). The manual UI check from the plan (deny.envread, ask onglobwaiting more than 30 s) has not been run, because this session is unattended.