Description: LevelOne::graduateAndUpgrade
does not verify that each enrolled student has received the mandated four weekly reviews before allowing graduation. Although 'giveReview' tracks individual review calls, there is no check in the graduation logic to ensure 'reviewCount[student] >= 4' (or exactly 4) prior to performing upgrades and payouts.
Impact: A principal can invoke graduateAndUpgrade
after only one, two, or three reviews per student (or even zero), allowing under-reviewed and potentially under-qualified students to graduate. This completely subverts the project’s 4-week, 4-review business invariant and may lead to undeserved upgrades, misallocated bursaries, and violation of academic rules.
Proof of Concept: Include the following test in the LevelOneAndGraduateTest.t.sol
file:
Recommended Mitigation: Before any upgrade or payout in graduateAndUpgrade
, enforce per-student review counts:
All students are graduated when the graduation function is called as the cut-off criteria is not applied.
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.