* a small fixup
This commit is contained in:
parent
4cc85448d7
commit
984a64561e
|
@ -192,7 +192,7 @@ class Telemetry(flask_restful.Resource):
|
|||
wmi_handler = WMIHandler(monkey_id, telemetry_json['data']['wmi'], users_secrets)
|
||||
wmi_handler.process_and_handle_wmi_info()
|
||||
if 'aws' in telemetry_json['data']:
|
||||
mongo.db.monkey.insert({'aws_instance_id': telemetry_json['data']['instance-id']})
|
||||
mongo.db.monkey.update_one({'_id': monkey_id}, {'aws_instance_id': telemetry_json['data']['instance-id']})
|
||||
|
||||
@staticmethod
|
||||
def add_ip_to_ssh_keys(ip, ssh_info):
|
||||
|
|
|
@ -645,10 +645,10 @@ SCHEMA = {
|
|||
'type': 'object',
|
||||
'description': 'These credentials will be used in order to export the monkey\'s findings to the AWS Security Hub.',
|
||||
'properties': {
|
||||
'iam_role_id': {
|
||||
'title': 'IAM role ID',
|
||||
'aws_account_id': {
|
||||
'title': 'AWS account ID',
|
||||
'type': 'string',
|
||||
'description': ''
|
||||
'description': 'Your AWS account ID that is subscribed to security hub feeds'
|
||||
},
|
||||
'aws_access_key_id': {
|
||||
'title': 'AWS access key ID',
|
||||
|
|
|
@ -553,7 +553,7 @@ class ReportService:
|
|||
|
||||
@staticmethod
|
||||
def get_machine_aws_instance_id(hostname):
|
||||
return str(mongo.db.monkey.find({'hostname': hostname}, {'aws_instance_id': 1}))
|
||||
return str(list(mongo.db.monkey.find({'hostname': hostname}, {'aws_instance_id': 1}))[0]['aws_instance_id'])
|
||||
|
||||
@staticmethod
|
||||
def get_issues():
|
||||
|
@ -754,7 +754,7 @@ class ReportService:
|
|||
def get_active_exporters():
|
||||
# This function should be in another module in charge of building a list of active exporters
|
||||
exporters_list = []
|
||||
if load_env_from_file() == AWS:
|
||||
if str(load_env_from_file()) == 'standard':
|
||||
exporters_list.append(AWSExporter)
|
||||
return exporters_list
|
||||
|
||||
|
|
Loading…
Reference in New Issue