forked from p15670423/monkey
Removed scoutsuite telemetry processing as there's nothing to process and other minor code improvements
This commit is contained in:
parent
c45ff1dc1f
commit
284cc3afdb
|
@ -5,9 +5,9 @@ from monkey_island.cc.services.zero_trust.scoutsuite.consts import rule_consts
|
||||||
|
|
||||||
class ScoutSuiteRule(EmbeddedDocument):
|
class ScoutSuiteRule(EmbeddedDocument):
|
||||||
"""
|
"""
|
||||||
This model represents additional information about monkey finding:
|
This model represents ScoutSuite security rule check results:
|
||||||
Events if monkey finding
|
how many resources break the security rule
|
||||||
Scoutsuite findings if scoutsuite finding
|
security rule description and remediation and etc.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# SCHEMA
|
# SCHEMA
|
||||||
|
|
|
@ -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)}")
|
|
|
@ -6,7 +6,6 @@ from common.common_consts.system_info_collectors_names import (AWS_COLLECTOR, EN
|
||||||
from .aws import process_aws_telemetry
|
from .aws import process_aws_telemetry
|
||||||
from .environment import process_environment_telemetry
|
from .environment import process_environment_telemetry
|
||||||
from .hostname import process_hostname_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
|
from monkey_island.cc.services.telemetry.zero_trust_checks.antivirus_existence import check_antivirus_existence
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -15,8 +14,7 @@ SYSTEM_INFO_COLLECTOR_TO_TELEMETRY_PROCESSORS = {
|
||||||
AWS_COLLECTOR: [process_aws_telemetry],
|
AWS_COLLECTOR: [process_aws_telemetry],
|
||||||
ENVIRONMENT_COLLECTOR: [process_environment_telemetry],
|
ENVIRONMENT_COLLECTOR: [process_environment_telemetry],
|
||||||
HOSTNAME_COLLECTOR: [process_hostname_telemetry],
|
HOSTNAME_COLLECTOR: [process_hostname_telemetry],
|
||||||
PROCESS_LIST_COLLECTOR: [check_antivirus_existence],
|
PROCESS_LIST_COLLECTOR: [check_antivirus_existence]
|
||||||
SCOUTSUITE_COLLECTOR: [process_scout_suite_telemetry]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ from monkey_island.cc.test_common.fixtures import FixtureEnum
|
||||||
class MockObject:
|
class MockObject:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures(FixtureEnum.USES_DATABASE)
|
@pytest.mark.usefixtures(FixtureEnum.USES_DATABASE)
|
||||||
def test_is_aws_keys_setup():
|
def test_is_aws_keys_setup():
|
||||||
# Mock default configuration
|
# Mock default configuration
|
||||||
|
|
Loading…
Reference in New Issue