diff --git a/contentctl/actions/inspect.py b/contentctl/actions/inspect.py index 1fe2e4c0..1a8bc50d 100644 --- a/contentctl/actions/inspect.py +++ b/contentctl/actions/inspect.py @@ -297,10 +297,10 @@ def check_detection_metadata(self, config: inspect) -> None: validation_errors[rule_name] = [] # No detections should be removed from build to build if rule_name not in current_build_conf.detection_stanzas: - if config.exception_on_removed_detections: - validation_errors[rule_name].append(DetectionMissingError(rule_name=rule_name)) - else: + if config.supress_missing_content_exceptions: print(f"[SUPPRESSED] {DetectionMissingError(rule_name=rule_name).long_message}") + else: + validation_errors[rule_name].append(DetectionMissingError(rule_name=rule_name)) continue # Pull out the individual stanza for readability previous_stanza = previous_build_conf.detection_stanzas[rule_name] diff --git a/contentctl/objects/config.py b/contentctl/objects/config.py index 04082e1c..76374f50 100644 --- a/contentctl/objects/config.py +++ b/contentctl/objects/config.py @@ -308,12 +308,14 @@ class inspect(build): "should be enabled." ) ) - exception_on_removed_detections: bool = Field( - default=True, + supress_missing_content_exceptions: bool = Field( + default=False, description=( - "Throw an exception during metadata validation if a detection that existed in " + "Suppress exceptions during metadata validation if a detection that existed in " "the previous build does not exist in this build. This is to ensure that content " - "is not accidentally removed." + "is not accidentally removed. In order to support testing both public and private " + "content, this warning can be suppressed. If it is suppressed, it will still be " + "printed out as a warning." ) ) enrichments: bool = Field(