diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f4c39a6..4e86b386 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ # v3.0.5 - Changes staged +## Features + - Added functionality to `MitreAttackData` to retrieve a list of Procedure Examples by technique. [#172](https://github.com/mitre-attack/mitreattack-python/pull/172) +## Fixes + +- Fixed a layer comparison issue causing false warnings to appear during layer operations. [#173](https://github.com/mitre-attack/mitreattack-python/issues/173). + # v3.0.4 - 4/23/2024 ## Features diff --git a/mitreattack/navlayers/manipulators/layerops.py b/mitreattack/navlayers/manipulators/layerops.py index f0f3df71..40e6684e 100644 --- a/mitreattack/navlayers/manipulators/layerops.py +++ b/mitreattack/navlayers/manipulators/layerops.py @@ -181,9 +181,11 @@ def _merge_to_template(self, data, key=0): for entry in key_space: if entry != "techniques": standard = _raw[entry] - if any(y != standard for y in [getattr(x.layer, entry) for x in collide]): + layer_entries = [getattr(x.layer, entry) for x in collide] + layer_entries = [y.get_dict() if hasattr(y, 'get_dict') else y for y in layer_entries] + if any(y != standard for y in layer_entries): if entry == "domain": - print("FATAL ERROR! Layer mis-match on domain. " "Exiting.") + print("FATAL ERROR! Layer mis-match on domain. Exiting.") raise MismatchedDomain print(f"Warning! Layer mis-match detected for {entry}. Defaulting to {key}'s value") out[entry] = standard