From 116dbaf29760886e7f1e3c23f9a8f397c2686256 Mon Sep 17 00:00:00 2001 From: jiatolentino Date: Wed, 24 Jun 2026 12:53:01 +0800 Subject: [PATCH] fix: make DiscoveryMatch.label optional for non-sensitive/ignore matches A non-sensitive or ignore discovery match carries no sensitivity label, but DiscoveryMatch required `label: str`, so parsing schema-discovery results that contained such a match (e.g. a scope.non_sensitive column, hit via the generate_ruleset path) raised a pydantic ValidationError. The schema_discovery CSV path never parsed the model, so this was latent until MongoDB document discovery exercised it. --- datamasque/client/models/discovery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datamasque/client/models/discovery.py b/datamasque/client/models/discovery.py index 7bccefa..4c35ae0 100644 --- a/datamasque/client/models/discovery.py +++ b/datamasque/client/models/discovery.py @@ -252,7 +252,7 @@ class DiscoveryMatch(BaseModel): model_config = ConfigDict(extra="allow") - label: str + label: Optional[str] = None categories: list[str] flagged_by: str description: str