diff --git a/send_deep_security_events_to_aws_security_hub.py b/send_deep_security_events_to_aws_security_hub.py index 395a478..e21d4be 100644 --- a/send_deep_security_events_to_aws_security_hub.py +++ b/send_deep_security_events_to_aws_security_hub.py @@ -83,9 +83,8 @@ def generate_finding_title(title): def verify_required_properties(deep_security_event): """ Verify if the specified Deep Security event contains the required properties to - be convert to an Amazon Finding Format finding + be converted to an Amazon Finding Format finding """ - result = False required_properties = [ 'HostOwnerID', @@ -104,10 +103,10 @@ def verify_required_properties(deep_security_event): ] for prop in required_properties: - if prop in deep_security_event: - result = True + if prop not in deep_security_event: + return False - return result + return True def convert_deep_security_event_to_aff(deep_security_event): """