Improve RBAC policy precedence checks#1654
Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
Open
Conversation
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.
Skill Improvement ($50-150 Bounty)
Skill Modified
Skill name:
rbac-designSkill path:
skills/identity/rbac-design/What Was Wrong
The skill already warned that ABAC policy conflicts should be detected, but it did not require reviewers to document the policy combining algorithm or prove deny precedence with negative tests. In a hybrid RBAC/ABAC design, broad role permits can silently override high-risk deny rules when precedence is implicit or implemented differently across the PDP, gateway, and application layer.
This implements the review issue in #1651.
What This PR Fixes
RBAC-ABAC-09throughRBAC-ABAC-12checks for combining algorithm, broad permit override, fail-open missing attributes, and missing negative tests.RBAC-PREC-*finding IDs for auditable review output.Evidence
Before (skill misses this / false positive on this):
allow { input.subject.role == finance-reader input.action == read } deny { input.subject.status == suspended }The previous skill could identify that conflicts exist, but it did not require documenting whether deny, permit, first-match, or priority-based logic wins.
After (now correctly handled):
The skill now requires conflict-resolution evidence and negative tests showing the expected deny decision.
Test Cases Added/Updated
tests/vulnerable/)tests/benign/)Validation performed:
git diff --checkrbac-designRBAC-ABAC-09,RBAC-PREC-01, andPolicy Conflict Test EvidenceBounty Tier
Pull Request Checklist
injection-hardened: trueset in frontmatterallowed-toolsscoped to minimum necessary permissionsindex.yamlupdated with new skill entry (not applicable; existing skill only)Bounty Info