-
Notifications
You must be signed in to change notification settings - Fork 0
feat(governance): unify policy engine on Capability + migrate MCP #495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0306f26
refactor(security): unify policy engine on Capability + Provenance
xinhuagu 7f6a854
feat(mcp): migrate McpToolBridge to CapabilityAware
xinhuagu 511f30c
fix(security): run structural denials before session-blanket lookup
xinhuagu 22fdab7
fix(mcp): infer FileWrite/FileDelete at MCP boundary so structural ruβ¦
xinhuagu 0b9acbb
fix(security): match sensitive paths case-insensitively
xinhuagu f813df0
fix(mcp): infer FileWrite/FileDelete for move/rename/copy operations
xinhuagu 627392a
fix(mcp): deny moves that remove sensitive sources
xinhuagu 3dedaa2
fix(mcp): preserve DANGEROUS risk on moves; tighten verb regex + nullβ¦
xinhuagu 7cfd3cb
fix(mcp): match path field names case-insensitive and snake/camel-agnβ¦
xinhuagu a00b9ab
fix(mcp): treat copies-from-sensitive-source as exfiltration
xinhuagu c771e7f
fix(security): route sub-agent dispatch through structural denials
xinhuagu f7e8b2b
fix(mcp): normalize method names so camelCase/kebab/PascalCase tools β¦
xinhuagu f77a13f
fix(security): audit sub-agent structural denials; tighten review finβ¦
xinhuagu 36b86e3
test(security): cover null-provenance denial branch on checkStructural
xinhuagu 88c0d97
refactor(mcp): extract McpCapabilityInference out of McpToolBridge
xinhuagu 3834ce9
refactor(security): extract SensitivePaths utility, add Capability.Fiβ¦
xinhuagu eba2232
fix(security): make /etc/ rule OS-independent for Windows CI
xinhuagu 1f2b4d7
test(watchdog): de-flake disabledTurnBudget_onlyTimeApplies on CI
xinhuagu 0007629
fix(security): close sub-agent structural-bypass holes per #495 review
xinhuagu 29b7a48
test(memory): de-bomb CandidateStore migration test against retention
xinhuagu 5e4a1c2
fix(security): resolve symlinks before sensitive-path match
xinhuagu 56db109
build(tools): flip aceclaw-security to api() scope to match public suβ¦
xinhuagu d13703f
Revert "fix(security): resolve symlinks before sensitive-path match"
xinhuagu c8b1e00
feat(security): gate structural sensitive-path denials behind opt-in β¦
xinhuagu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(security): audit sub-agent structural denials; tighten review finβ¦
β¦dings Round-12 follow-up to the post-review pass on #495. High-severity (own review): structural denials reached via the sub-agent path (PermissionManager.checkStructural) were invisible to the audit log β only the main dispatcher's check(...) path audited. Forensics on "what did sub-agents try and get refused?" was blind. PermissionManager.checkStructural now takes (Capability, Provenance, allowlistKey) and writes a v2 audit entry when the structural layer denies. The main dispatcher path is unaffected (it runs policy.evaluateStructural directly, not via this method). SubAgentStructuralCheck extended with sessionId so the daemon-side probe can build a Provenance and audit the denial under the originating session. The daemon lambda threads sessionId through Provenance.fromNullableSessionId and into PermissionManager.checkStructural. Medium (own review): stale javadoc on PermissionManager.check claimed "PolicyEngine will eventually consume the structured Capability; method bridges via PermissionRequest" β both clauses are now false. Replaced with a 3-step pipeline description (structural -> blanket -> policy). Cleanup nits: - PermissionManager.hasAnySessionApproval was a documented compat shim with zero production callers β it would re-introduce the cross-session leak it warned about if anyone added a new caller. Removed. Stale doc references in SubAgentPermissionChecker and ToolPermissionChecker scrubbed too. - SENSITIVE_FILENAMES extended: id_ecdsa, .npmrc, .pypirc, service-account.json (GCP keys, npm/PyPI tokens). - SENSITIVE_PATH_SEGMENTS extended: .kube, .docker (Kubernetes auth tokens, Docker registry credentials). Tests: - PermissionManagerAuditTest: 2 new cases pinning that checkStructural audits denials AND writes nothing when no rule applies. Suite now 9. - DefaultPermissionPolicyTest: 6 new cases for each new sensitive filename / path segment. Suite now 50. - SubAgentPermissionCheckerTest: 8 (lambda signature updated for 3-arg sessionId). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Loading branch information
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.