Repository navigation
fix(security): restrict durable rule creation to Access credentials - #56
Merged
Merged
Conversation
AndroxxTraxxon
marked this pull request as ready for review
November 15, 2026 06:24
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.
A delegated Execution credential with Rules/Create could persist an ad hoc rule that later used its subject's broader Execute/configuration/Key authority when an event matched. Empty execution permission selections did not prevent that expansion.
Require Access credentials before rule creation effects. Canonical v1 rules retain a sponsor identity, without an originating credential ceiling; a one-time Execute/input check cannot constrain later sponsor grants. Access creation and trusted pack deployment remain supported. Existing behavioral-update, enabled-transition, scoped standard and recorded admission contracts remain unchanged.
Coverage:
access_created_rule_retains_sponsor_and_inputs_through_event_consumerscreates the rule through the Access API route and drives real RabbitMQ EventProcessor/EnforcementProcessor consumers. It asserts exact resolved flat input, retained sponsor/standard refs, event/enforcement lineage and explicit delegated execution selection with executable/schema/grant bindings. Test-only executor dependency; no production consumer changes. This external-service case is explicitly ignored by default and was explicitly run against owned PostgreSQL18/RabbitMQ3.12.Status: ready for human review and merge consideration at
70b0f2591e9c36f50a40c1b3d4eefb700f9f8e54. Coordinator verified all required merged-head CI complete (15 successes; Release Configuration Checks skipped), clean merge state, and the qualified owning and real-consumer evidence below. No implementation or validation work remains pending. Issue150 stays open until user merge/acceptance; no merge or deployment performed.Validation:
cargo check --locked -p attune-api --lib --test execution_mutation_authz_testsand corresponding Clippy with-- -D warningspassed. Ordinary mutation target:2 passed,1 explicitly ignored; separate explicit ignored selection of the real consumer positive:1 passed. Four test threads, unique run IDs, jobs2/debug0, one campaign lease and issue-owned target./tmp/attune-150-create-d3efd12e-r6.*and preceding r2 receipts. Real consumers were stopped/joined before fixture cleanup. Owned PG/MQ containers and anonymous volumes were removed with absence proofs; issue150 target removed only after success and is absent. Failed fixture executable and failure logs retained. No background validation work remains.Integration:
git fetch origin mainthengit merge --no-edit origin/maincreated conflict-free merge70b0f2591e9c36f50a40c1b3d4eefb700f9f8e54, parents d3efd12 and8abbdea258c6b35c8b61a526b888ae4ca018e056. Draft verified before push; no history rewrite. r6 process reaped, own capture/waiter absent, resource cleanup receipts and target absence verified first.git diff --check origin/main HEADpassed and worktree clean. Diff against main contains exactly six intended remediation files; all main core4/native1.0.7/timer0.7.5/catalog4, mapping Permission/Manage bindings, expiry fixture and rustix1.1.6 changes are retained.Protected input comparison against tested d3:205 files hashed; only common/value_schema/tests.rs changed (main core-catalog test anchors). Rule create/update/enable implementation, owning tests/helpers, event/enforcement consumers, authority production, schema compiler production and migrations compared unchanged. Proof retained in
/tmp/attune-150-main-merge-proof.json, residual patch/tmp/attune-150-main-merge.diff, clean status and merge commit receipts alongside. Commands included git status/fetch/merge/show/diff, SHA256 comparisons, push and PR link. No new local build/test/reviewer was needed for mechanical integration. Prior local passes and Astra review remain qualified to their exact SHAs; new native/dependency inputs prevent claiming combined merged-head compilation/runtime validation from those old results. Normal exact merged-head CI subsequently passed, including Tests, Clippy, full-stack smoke, Windows CLI and web API generation checks. These results are separate from the qualified earlier local evidence.Review: actual Codex GPT-6 Astra reviewed published a18bcc0 read-only, found no actionable implementation/security regression and traced the actual authority consumers. Its coverage objection is addressed by the subsequently added and now passing real-consumer test; Astra did not review that fixture. Subsequent source changes are tests/dependency wiring only.
Limits: exact merged-head CI passed; no local compiled validation was rerun on70b0f259. Prior real consumer positive covers rule-to-execution creation, not worker completion or downstream secret delivery; no dynamic exploit reproduction claimed. Earlier failed harness/fixture receipts are retained and were not counted as passes. Runtime shutdown logs included consumer stream/ack-close warnings; compiler/Clippy warnings were zero.