Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ private void InitNativeProcess()
{
startInfo.ArgumentList.RemoveAt(0);
}

// codeql[cs/microsoft/command-line-injection-shell-execution] - This is expected Poweshell behavior where user inputted paths are supported for the context of this method. The user assumes trust for the file path specified on the user's system to retrieve process info for, and in the case of remoting, restricted remoting security guidelines should be used.
startInfo.FileName = oldFileName;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ private string ResolveUri(string baseUri, bool verbose)
using (HttpClient client = new HttpClient(handler))
{
client.Timeout = new TimeSpan(0, 0, 30); // Set 30 second timeout
// codeql[cs/ssrf] - This is expected Poweshell behavior and the user assumes trust for the module they download and any URIs it references. The URIs are also not executables or scripts that would be invoked by this method.
Task<HttpResponseMessage> responseMessage = client.GetAsync(uri);
using (HttpResponseMessage response = responseMessage.Result)
{
Expand Down Expand Up @@ -783,6 +784,7 @@ private bool DownloadHelpContentHttpClient(string uri, string fileName, Updatabl
using (HttpClient client = new HttpClient(handler))
{
client.Timeout = _defaultTimeout;
// codeql[cs/ssrf] - This is expected Poweshell behavior and the user assumes trust for the module they download and any URIs it references. The URIs are also not executables or scripts that would be invoked by this method.
Task<HttpResponseMessage> responseMsg = client.GetAsync(new Uri(uri), _cancelTokenSource.Token);

// TODO: Should I use a continuation to write the stream to a file?
Expand Down
Loading