The startSession function accepts a _cutOffScore parameter but performs no validation on it. The principal can set an unreasonably high _cutOffScore (e.g., greater than 100, the initial student score) making graduation impossible, or a very low score (e.g., 0) making graduation trivial.
In LevelOne.sol#startSession:
Students start with a score of 100, and bad reviews decrease it. Good reviews do not increase it. If _cutOffScore is set to, for example, 101, no student can ever graduate. If set to 0, almost any student (unless they get many bad reviews to reach exactly 0 and the comparison is >=) might graduate.
Unfair or Impossible Graduation Conditions: The principal can unilaterally set graduation criteria that are either impossible to meet or trivially easy, undermining the fairness and intended functionality of the school system.
Violation of Implicit Fairness: While the principal has control, an implicit expectation of a reasonable system usually exists. Allowing extreme, unvalidated values for cutOffScore can violate this.
Manual Review, Logical Analysis.
Add a require statement in startSession to ensure _cutOffScore is within a reasonable range. For instance, it should be greater than 0 and less than or equal to the maximum possible score (which is 100 in this system, as scores only decrease).
Code Modification for LevelOne.sol::startSession:
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.