[BUG] System.UriFormatException when deserializing Microsoft.SecurityInsights/Entities of type Url #47282
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
Mgmt
This issue is related to a management-plane library.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
SecurityInsights
Library name and version
Azure.ResourceManager.SecurityInsights 1.2.0-beta.1
Describe the bug
When deserializing a Sentinel Entity of the type Url which contains an uri which is not a valid url the System.UriFormatException exception occurs. Below an example with redacted customer information which throws an exception:
The exception is thrown within the file SecurityInsightsIncidentResource.cs line 870
See the SecurityInsightsUriEntity.cs model on line 80 which defines
propeties.url
as of typeUri
.In this case it was a Sentinel Security Incident which was ingested using a data connector from Microsoft Defender XDR.
Expected behavior
The Sentinel Entity model is aligned with the Security Graph urlEvidence resource type model.
The Sentinel Entities are aligned with the Microsoft Defender XDR evidence types. In this case the Sentinel Url Entity should have for the
properties.url
as type astring
instead of anUrl
.Actual behavior
A Microsoft Defender XDR security incident with an url evidence type which only contains the FQDN in the uri type is mapped to a Sentinel Url Entity with the same data which causes an exception when a FQDN is deserialized to an Uri type.
Reproduction Steps
Using the snippet below to request the entities of a Sentinel Incident which contains an entity that doesn't have a valid url:
Below the full exception:
Environment
The text was updated successfully, but these errors were encountered: