* Added a check to no issues list

* Changed the productARN to the monkey's ARN
This commit is contained in:
maor.rayzin 2018-11-27 17:45:31 +02:00
parent 0a6b3a12fa
commit af97fb6ffc
2 changed files with 4 additions and 1 deletions

View File

@ -21,6 +21,9 @@ class AWSExporter(Exporter):
findings_list = [] findings_list = []
issues_list = report_json['recommendations']['issues'] issues_list = report_json['recommendations']['issues']
if not issues_list:
logger.info('No issues were found by the monkey, no need to send anything')
return True
for machine in issues_list: for machine in issues_list:
for issue in issues_list[machine]: for issue in issues_list[machine]:
findings_list.append(AWSExporter._prepare_finding(issue)) findings_list.append(AWSExporter._prepare_finding(issue))

View File

@ -1,6 +1,6 @@
{ {
"server_config": "standard", "server_config": "standard",
"aws": { "aws": {
"sec_hub_product_arn": "arn:aws:securityhub:us-west-2:324264561773:product/aws/guardduty" "sec_hub_product_arn": "arn:aws:securityhub:eu-west-2:324264561773:product/guardicore/aws-infection-monkey"
} }
} }