chore: Added a little dev script to help contributors #4793
1 issue
find-bugs: Found 1 issue (1 medium)
Medium
Command injection via solution argument on Windows - `dev.cs:53`
The solution argument in CleanSlateAsync and SolutionRestoreAsync is interpolated into a command string with only double-quote escaping. On Windows, when the command is routed through cmd.exe /c (lines 130-136), an attacker can escape the quotes using characters like " & malicious_command &. For example, a solution argument of test" & calc & echo " would execute arbitrary commands. While this is a dev helper script and the risk is limited to developers running it manually, it violates secure coding practices for command execution.
Duration: 37.0s · Tokens: 35.0k in / 1.4k out · Cost: $0.14 (+extraction: $0.00)
Annotations
Check warning on line 53 in dev.cs
sentry-warden / warden: find-bugs
Command injection via solution argument on Windows
The `solution` argument in `CleanSlateAsync` and `SolutionRestoreAsync` is interpolated into a command string with only double-quote escaping. On Windows, when the command is routed through `cmd.exe /c` (lines 130-136), an attacker can escape the quotes using characters like `" & malicious_command &`. For example, a solution argument of `test" & calc & echo "` would execute arbitrary commands. While this is a dev helper script and the risk is limited to developers running it manually, it violates secure coding practices for command execution.