Repository navigation
feat(tools): centralize execution policy - #46
Merged
Merged
Conversation
Reject invalid or out-of-scope calls before approval. Bind grants to reviewed arguments and resolved targets, then recheck before dispatch. Require approval for sensitive diffs and reject replacement symlinks during file reads.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Use one canonical workspace path for runtime and audit requests. This tests audit scope rejection on macOS and Windows instead of an earlier workspace prefix rejection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tool approval and audit scope checks used separate paths. JSON fallback calls also skipped shared schema validation. One execution policy now returns allow, deny, or require approval for every tool call.
The policy resolves targets and rejects invalid arguments, conflicting aliases, workspace escapes, and audit scope violations before approval. Approval covers a private snapshot of the arguments and targets. The runtime checks them again before dispatch. A deny decision cannot be overridden.
Sensitive diffs now require approval because they can expose file contents. Text reads use the existing capability-based file helper to reject replacement symlinks. Patch checks cover every source and destination. README, command docs, and help describe the behavior.
Shell commands still require approval and run without an OS sandbox. The policy checks their working directory. It does not restrict paths or network targets inside command text. No dependencies were added.
Validation passed:
OSV checked all 388 resolved Rust packages. It returned existing maintenance notices for zbus_names 4.3.4, zvariant 5.15.0, and zvariant_derive 5.15.0. These records provide no severity, CVE alias, or fixed version. Dependency updates remain outside this PR.
Local checks ran on Linux. CI will check macOS and Windows. Real cloud providers were not called.