Skip to content

Commit

Permalink
bugfix: add check for empty result
Browse files Browse the repository at this point in the history
  • Loading branch information
noamsdahan committed Mar 20, 2022
1 parent 1727b59 commit 6686c58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion access_undenied_aws/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ def analyze_cloudtrail_events(config: common.Config, raw_events_file_path):
# Multiple CloudTrail log records in file or single event
for raw_event in raw_events.get("Records") or [raw_events]:
result = analyze(config, raw_event)
_write_to_output_buffer(config, result)
if result:
_write_to_output_buffer(config, result)
_write_to_file(config.output_file, config.output_json)


Expand Down

0 comments on commit 6686c58

Please sign in to comment.