The missing zero address check in the constructor of TadleFactory when setting guardian could result in rendering it unusable and unable to deploy contracts.
Commit Hash: 04fd8634701697184a3f3a5558b41c109866e5f8
Repository URL: https://github.com/Cyfrin/2024-08-tadle/tree/main
The constructor of TadleFactory receives an address for the guardian, however, no zero address check is performed.
If address(0x0) is passed to the constructor, it would prevent from further calling the TadleFactory::deployUpgradeableProxy function, due to the onlyGuardian modifier.
Constructing a TaddleFactory with address(0x0) as a guardian results in loss of ownership of the TaddleFactory.
Add the following TadleFactory.t.sol contract to the test directory
Run forge test --match-contract TadleFactory
Observe the result
Manual Code Review: Analyzing the contract code directly.
Static Analysis Tools: Slither - https://github.com/crytic/slither
Add a check for address(0x0) in the TadleFactory::constructor
The following issues and its duplicates are invalid as admin errors/input validation/malicious intents are1 generally considered invalid based on [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). If they deploy/set inputs of the contracts appropriately, there will be no issue. Additionally admins are trusted as noted in READ.ME they can break certain assumption of the code based on their actions, and
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.