forked from p15670423/monkey
Added state function, WIP
This commit is contained in:
parent
05eab34d45
commit
223adb0f33
|
@ -1,4 +1,6 @@
|
||||||
from monkey_island.cc.services.node import NodeService
|
from monkey_island.cc.services.node import NodeService
|
||||||
|
from monkey_island.cc.services.telemetry.zero_trust_tests.segmentation import \
|
||||||
|
test_positive_findings_for_unreached_segments
|
||||||
|
|
||||||
|
|
||||||
def process_state_telemetry(telemetry_json):
|
def process_state_telemetry(telemetry_json):
|
||||||
|
@ -8,3 +10,6 @@ def process_state_telemetry(telemetry_json):
|
||||||
NodeService.set_monkey_dead(monkey, True)
|
NodeService.set_monkey_dead(monkey, True)
|
||||||
else:
|
else:
|
||||||
NodeService.set_monkey_dead(monkey, False)
|
NodeService.set_monkey_dead(monkey, False)
|
||||||
|
|
||||||
|
if telemetry_json['data']['done']:
|
||||||
|
test_positive_findings_for_unreached_segments(telemetry_json)
|
||||||
|
|
|
@ -66,3 +66,7 @@ def get_segmentation_violation_event(current_monkey, source_subnet, target_ip, t
|
||||||
event_type=EVENT_TYPE_MONKEY_NETWORK
|
event_type=EVENT_TYPE_MONKEY_NETWORK
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def test_positive_findings_for_unreached_segments(telemetry_json):
|
||||||
|
current_monkey = Monkey.get_single_monkey_by_guid(telemetry_json['monkey_guid'])
|
||||||
|
subnet_groups = get_config_network_segments_as_subnet_groups()
|
||||||
|
|
Loading…
Reference in New Issue