Skip to content
This repository was archived by the owner on Aug 1, 2019. It is now read-only.

Bugfix/verify_required_parameters #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions send_deep_security_events_to_aws_security_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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):
"""
Expand Down