The following function is found in VotingBoothTest.t.sol:
This function is not related to the `Voting Booth' project. It creates a text file for no particular reason.
foundry.toml has the ffi flag set to true. ffi allows arbitrary code to be executed, see the details here. This is potentially dangerous. Arbitrary commands can include those with embedded or accidental malicious actions. In this example, only a text file is created, but in general it's easy to fail to notice this when testing.
Medium. In this particular case, it was not a security issue, but in other cases, this command could be abused by malicious actors.
Manual check
Inspect the code before execution
Set the `ffi' flag to false
Use an isolated testing environment
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.