Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low

Test coverage not sufficient

Summary

Test coverage must be improved

Vulnerability Details

Testing is critical to catching bugs, vulnerabilities, and ensuring project works as assumed

Impact

Example is leaving out the test cases of arrays with zero addresses leads to bugs as indicated in report
Tests are crucial to catching bugs
Consider this test OnlyDistributor // any calls from non-factory address will fail, so tests end here it tests calls from NON_FACTORY but uses zero values in input
``
vm.startPrank(organizer);
...
distribute(address(0), new address, new uint256, "");

Test expects revert so reader, auditor, dev, maintainer will to be sure if reverts were really caused by calling test with account not FACTORY of the zero values without running test to see errors. Sadly some maintainers, auditors, developers maintaining project only read through tests.
Tests need to be robust and focus on testing specific item being tested without leaving doubts
## Tools Used
Manual Analysis
## Recommendations
Recommended to test more functionality, edge cases, corner cases, various scopes, aspects and depths of all functions, flows, interrelations to ensure robust tests that secure the code

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.