forked from p15670423/monkey
* 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 = WMIHandler(monkey_id, telemetry_json['data']['wmi'], users_secrets)
|
||||||
wmi_handler.process_and_handle_wmi_info()
|
wmi_handler.process_and_handle_wmi_info()
|
||||||
if 'aws' in telemetry_json['data']:
|
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
|
@staticmethod
|
||||||
def add_ip_to_ssh_keys(ip, ssh_info):
|
def add_ip_to_ssh_keys(ip, ssh_info):
|
||||||
|
|
|
@ -645,10 +645,10 @@ SCHEMA = {
|
||||||
'type': 'object',
|
'type': 'object',
|
||||||
'description': 'These credentials will be used in order to export the monkey\'s findings to the AWS Security Hub.',
|
'description': 'These credentials will be used in order to export the monkey\'s findings to the AWS Security Hub.',
|
||||||
'properties': {
|
'properties': {
|
||||||
'iam_role_id': {
|
'aws_account_id': {
|
||||||
'title': 'IAM role ID',
|
'title': 'AWS account ID',
|
||||||
'type': 'string',
|
'type': 'string',
|
||||||
'description': ''
|
'description': 'Your AWS account ID that is subscribed to security hub feeds'
|
||||||
},
|
},
|
||||||
'aws_access_key_id': {
|
'aws_access_key_id': {
|
||||||
'title': 'AWS access key ID',
|
'title': 'AWS access key ID',
|
||||||
|
|
|
@ -553,7 +553,7 @@ class ReportService:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_machine_aws_instance_id(hostname):
|
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
|
@staticmethod
|
||||||
def get_issues():
|
def get_issues():
|
||||||
|
@ -754,7 +754,7 @@ class ReportService:
|
||||||
def get_active_exporters():
|
def get_active_exporters():
|
||||||
# This function should be in another module in charge of building a list of active exporters
|
# This function should be in another module in charge of building a list of active exporters
|
||||||
exporters_list = []
|
exporters_list = []
|
||||||
if load_env_from_file() == AWS:
|
if str(load_env_from_file()) == 'standard':
|
||||||
exporters_list.append(AWSExporter)
|
exporters_list.append(AWSExporter)
|
||||||
return exporters_list
|
return exporters_list
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue