The checkUpkeep function in the LiquidationKeeper contract, which implements the IAutomationCompatible interface, lacks the cannotExecute modifier. This modifier is recommended by the interface documentation to ensure the function is only simulated and not executable directly. The absence of this modifier introduces a potential vulnerability, allowing the function to be called directly and possibly impacting the contract's intended functionality and security.
The IAutomationCompatible interface specifies that the checkUpkeep function is designed for simulation purposes to determine if any upkeep work is required. The interface documentation suggests adding the cannotExecute modifier to prevent this function from being called directly. However, the LiquidationKeeper contract does not implement this modifier, making the function executable.
The absence of the cannotExecute modifier on the checkUpkeep function allows it to be called directly, rather than being restricted to simulation. Unauthorized invocation of the checkUpkeep function, which could bypass intended access controls or conditions.
Add the cannotExecute modifier to the checkUpkeep function. This ensures that the function is only used for simulation and cannot be called directly.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.