Skip to content
Merged
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
7 changes: 6 additions & 1 deletion samples/apps/SmartLauncher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@

using var discoveryClient = httpClientFactory.CreateClient();
var smartConfigUrl = new Uri(fhirServerUri, ".well-known/smart-configuration");
var smartResponse = await discoveryClient.GetAsync(smartConfigUrl);

// CodeQL SSRF suppression: smartConfigUrl is NOT user-tainted. The host originates
// from the server-side FhirServerUrl configuration value (validated above as an
// absolute HTTP(S) URI) and the path is the hardcoded SMART discovery endpoint.
// See https://aka.ms/codeql#guidance-on-suppressions
var smartResponse = await discoveryClient.GetAsync(smartConfigUrl); // lgtm[cs/ssrf]
smartResponse.EnsureSuccessStatusCode();
var smartJson = await smartResponse.Content.ReadAsStringAsync();
var smartConfig = System.Text.Json.JsonDocument.Parse(smartJson);
Expand Down
Loading