From 53f451b0977f7b3cd5362e20a3c49d10c81271a7 Mon Sep 17 00:00:00 2001 From: Chris Lenk Date: Fri, 20 Nov 2020 09:33:56 -0500 Subject: [PATCH] Use pattern equivalence in indicators --- stix2/equivalence/object/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stix2/equivalence/object/__init__.py b/stix2/equivalence/object/__init__.py index ec6cc42..0225788 100644 --- a/stix2/equivalence/object/__init__.py +++ b/stix2/equivalence/object/__init__.py @@ -4,6 +4,7 @@ import time from ...datastore import Filter from ...utils import STIXdatetime, parse_into_datetime +from ..pattern import equivalent_patterns logger = logging.getLogger(__name__) @@ -211,8 +212,7 @@ def custom_pattern_based(pattern1, pattern2): float: Number between 0.0 and 1.0 depending on match criteria. """ - logger.warning("Indicator pattern equivalence is not fully defined; will default to zero if not completely identical") - return exact_match(pattern1, pattern2) # TODO: Implement pattern based equivalence + return equivalent_patterns(pattern1, pattern2) def partial_external_reference_based(refs1, refs2):