Merge pull request #2940 from mRemoteNG/fix/aikido-security-sast-8815714-tnsC

[Aikido] AI Fix for Possible command injection via Process.Start
This commit is contained in:
Dimitrij
2025-10-18 21:31:15 +01:00
committed by GitHub

View File

@@ -156,7 +156,8 @@ namespace mRemoteNG.Tools
ExternalToolArgumentParser argParser = new(startConnectionInfo);
process.StartInfo.UseShellExecute = true;
process.StartInfo.FileName = argParser.ParseArguments(FileName);
process.StartInfo.Arguments = argParser.ParseArguments(Arguments);
var parsedArgs = argParser.ParseArguments(Arguments).Split(' ');
process.StartInfo.ArgumentList.AddRange(parsedArgs);
if (WorkingDir != "") process.StartInfo.WorkingDirectory = argParser.ParseArguments(WorkingDir);
if (RunElevated) process.StartInfo.Verb = "runas";
}