Removed scoutsuite telemetry processing as there's nothing to process and other minor code improvements

This commit is contained in:
VakarisZ 2021-01-29 18:17:32 +02:00
parent c45ff1dc1f
commit 284cc3afdb
4 changed files with 5 additions and 15 deletions

View File

@ -5,9 +5,9 @@ from monkey_island.cc.services.zero_trust.scoutsuite.consts import rule_consts
class ScoutSuiteRule(EmbeddedDocument):
"""
This model represents additional information about monkey finding:
Events if monkey finding
Scoutsuite findings if scoutsuite finding
This model represents ScoutSuite security rule check results:
how many resources break the security rule
security rule description and remediation and etc.
"""
# SCHEMA

View File

@ -1,9 +0,0 @@
import json
import logging
logger = logging.getLogger(__name__)
def process_scout_suite_telemetry(collector_results, monkey_guid):
# Monkey.get_single_monkey_by_guid(monkey_guid).set_hostname(collector_results["hostname"])
logger.info(f"ScoutSuite results:\n{json.dumps(collector_results, indent=2)}")

View File

@ -6,7 +6,6 @@ from common.common_consts.system_info_collectors_names import (AWS_COLLECTOR, EN
from .aws import process_aws_telemetry
from .environment import process_environment_telemetry
from .hostname import process_hostname_telemetry
from .scoutsuite import process_scout_suite_telemetry
from monkey_island.cc.services.telemetry.zero_trust_checks.antivirus_existence import check_antivirus_existence
logger = logging.getLogger(__name__)
@ -15,8 +14,7 @@ SYSTEM_INFO_COLLECTOR_TO_TELEMETRY_PROCESSORS = {
AWS_COLLECTOR: [process_aws_telemetry],
ENVIRONMENT_COLLECTOR: [process_environment_telemetry],
HOSTNAME_COLLECTOR: [process_hostname_telemetry],
PROCESS_LIST_COLLECTOR: [check_antivirus_existence],
SCOUTSUITE_COLLECTOR: [process_scout_suite_telemetry]
PROCESS_LIST_COLLECTOR: [check_antivirus_existence]
}

View File

@ -14,6 +14,7 @@ from monkey_island.cc.test_common.fixtures import FixtureEnum
class MockObject:
pass
@pytest.mark.usefixtures(FixtureEnum.USES_DATABASE)
def test_is_aws_keys_setup():
# Mock default configuration