fix(security): harden the subagent enforcement bypass#154
Open
manzil-infinity180 wants to merge 3 commits into
Open
fix(security): harden the subagent enforcement bypass#154manzil-infinity180 wants to merge 3 commits into
manzil-infinity180 wants to merge 3 commits into
Conversation
…misconfig Templates/examples now deny both subagent-spawning tools; new policy.CheckSubagentMisconfig warns at MCP+hook startup (AFLOCK_STRICT=1 refuses) when Task/Agent is permitted without sublayouts. Re #100.
Stamp predicate.trustBoundaryCrossing for subagent spawns; verify warns when a session delegated work outside aflock's enforcement plane. Re #100.
Cover Task vs Agent, deny precedence + glob matching, MCP-vs-hook enforcement limits, and safe delegation patterns; correct the stale sublayouts status. Re #100.
Docs Preview
|
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.
Closes #100.
Subagents spawned via
Task/Agentuse Claude Code's native tools, which bypass aflock. Real-time enforcement of those inner calls is an upstream gap (claude-code#27661 / #34692, both closed-not-planned), so this PR hardens the boundary aflock can control:TaskandAgent(distinct tool names; deny one ≠ deny the other).policy.CheckSubagentMisconfiglogs a WARNING at MCP + hook startup when a policy permitsTask/Agentwithout declaring sublayouts;AFLOCK_STRICT=1refuses to start.Task/Agentattestations are taggedtrustBoundaryCrossing;aflock verifyflags sessions that delegated work out of the enforcement plane.Out of scope (noted in code/docs): real-time enforcement of a subagent's inner native calls (upstream), and protected-file tamper detection (follow-up). Tests: CheckSubagentMisconfig matrix + attestation-tag tests; suite green.