Conversation
… (default 10), enforce limits + event/tests, and document rc3/nethermind finding #3 remediation
…C1404/ERC173 interface-ID support, and expand tests/docs
…h with cross-token denial tests
… and note token-privilege rule is operational guidance
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.
Security
RulesManagementModuleto mitigate transfer liveness risk from unbounded per-transfer rule iteration (Nethermind AuditAgent finding 3 follow-up).addRuleandsetRules, reverting withRuleEngine_RulesManagementModule_MaxRulesExceeded(uint256)when exceeded.RuleEngine.grantRolenow reverts for any role whenaccountis currently in the rules set.RuleEngineOwnableandRuleEngineOwnable2Stepnow rejecttransferOwnershiptargets that are currently in the rules set.bindToken(token)/unbindToken(token)now allow token self-calls (msg.sender == token) in addition to manager/owner authorization.Added
maxRules()andsetMaxRules(uint256)toIRulesManagementModule.DEFAULT_MAX_RULES = 10and initialize module state with this default cap.SetMaxRules(uint256)event emitted on cap updates.ERC1404InterfaceIdforIERC1404(0xab84a5c8)OwnableInterfaceIdforIERC173(0x7f5828d0)RuleEngine:DEFAULT_ADMIN_ROLEcan update cap.RuleEngineOwnableandRuleEngineOwnable2Step: owner can update cap.RuleEngine_RulesManagementModule_RuleAccountCannotReceivePrivileges()error for rule-account privilege/ownership target protection.Changed
ERC165inheritance inRuleEngineOwnableSharedfor base ERC-165 advertisement and extend it with RuleEngine + ERC-173 interface IDs.supportsInterfaceadvertisement now explicitly includesIERC1404in addition toIERC1404Extend.Testing
addRuleandsetRules, and access control onsetMaxRules.SetMaxRules.type(<mock interface>).interfaceIdfor
IERC1404andIERC173.Documentation
transferred,created,destroyed)bindToken,unbindToken, role grants, ownership changes, and rule management)