Omniscia Mitosis Audit
OptimismBridgeAdapter Static Analysis Findings
OptimismBridgeAdapter Static Analysis Findings
OBA-01S: Inexistent Sanitization of Input Address
Type | Severity | Location |
---|---|---|
Input Sanitization | OptimismBridgeAdapter.sol:L13-L17 |
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/helpers/adapter/OptimismBridgeAdapter.sol
13constructor(IOptimismGateway _bridge, uint32 _minGasLimit) {14 bridge = _bridge;15
16 minGasLimit = _minGasLimit;17}
Recommendation:
We advise some basic sanitization to be put in place by ensuring that the address
specified is non-zero.
Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):
The input bridge_
address argument of the OptimismBridgeAdapter::_setBridge
function is adequately sanitized as non-zero in the latest in-scope revision of the codebase, addressing this exhibit.