Omniscia Sova Network Audit

RoleManager Static Analysis Findings

RoleManager Static Analysis Findings

RMR-01S: Inexistent Sanitization of Input Address

Description:

The linked function accepts an address argument yet does not properly sanitize it.

Impact:

The presence of zero-value addresses, especially in constructor implementations, can cause the contract to be permanently inoperable. These checks are advised as zero-value inputs are a common side-effect of off-chain software related bugs.

Example:

src/auth/RoleManager.sol
103function initializeRegistry(address _registry) external {
104 if (msg.sender != owner()) revert Unauthorized();
105 if (registry != address(0)) revert AlreadyInitialized();
106
107 registry = _registry;
108}

Recommendation:

We advise some basic sanitization to be put in place by ensuring that the address specified is non-zero.

Alleviation (e4d6885477438291b0d3ca477fab7e088522967b):

The input _registry address argument of the RoleManager::initializeRegistry function is adequately sanitized as non-zero in the latest in-scope revision of the codebase, addressing this exhibit.