Commit Graph

11382 Commits

Author SHA1 Message Date
Kekoa Kaaikala 2740100621 Island: Connect new ReportService dependencies 2022-09-30 18:08:23 +00:00
Kekoa Kaaikala 520b212c69 Island: Remove ReportService.get_all_displayed_nodes 2022-09-30 18:08:22 +00:00
Kekoa Kaaikala 8acf2d9e91 Island: Refactor ReportService.get_scanned
Update ReportService.get_scanned to use repositories instead of services
2022-09-30 18:08:22 +00:00
Kekoa Kaaikala 49c6839c10 Island: Add ReportService.get_accessible_machines 2022-09-30 18:08:22 +00:00
Kekoa Kaaikala 85a5cb3209 Island: Add ReportService.get_all_machines 2022-09-30 18:08:22 +00:00
Kekoa Kaaikala 8537f1fcb7 Island: Add get_machines to IMachineRepository 2022-09-30 18:08:13 +00:00
Mike Salvatore 63447b759a Island: Add missing @jwt_required to `GET /api/agents` 2022-09-30 13:19:41 -04:00
Mike Salvatore 067a143f2c UT: Fix bug in test mock 2022-09-30 13:16:04 -04:00
Mike Salvatore 2811009019 UT: Deparametrize a test
TCP scan events do not contain OS information.
2022-09-30 13:10:57 -04:00
Mike Salvatore 97061ea61c UT: Remove redundant "test_scan_event_handler" from test names 2022-09-30 13:04:57 -04:00
Mike Salvatore 029c101643 UT: Remove disused scan event fixtures 2022-09-30 12:54:27 -04:00
Mike Salvatore 79f56e0789 UT: Use constants for TCP and ping scan method names 2022-09-30 12:54:03 -04:00
Mike Salvatore 20b84aa1a4 UT: Use indirect instead of get_fixture_value() 2022-09-30 12:48:03 -04:00
Mike Salvatore a6d2f45cbb
Merge pull request #2380 from guardicore/2362-get-agents
2362 get agents
2022-09-30 12:37:23 -04:00
Mike Salvatore f89068ae00 Common: Register TCPScanEvent serializer 2022-09-30 12:36:32 -04:00
Mike Salvatore 521411c7fc Common: Register TCPScanEvent serializer 2022-09-30 12:35:57 -04:00
vakaris_zilius c16c093083 Common: Register PingScanEvent to event serializer 2022-09-30 12:33:22 -04:00
vakaris_zilius e2c86d3d7a Common: Register PingScanEvent to event serializer 2022-09-30 12:33:13 -04:00
Mike Salvatore 07fa283ce1 Island: Use container.resolve(ScanEventHandler) 2022-09-30 12:28:22 -04:00
Mike Salvatore 0c786dfd94 Island: Change method order in ScanEventHandler 2022-09-30 12:08:32 -04:00
Mike Salvatore f6e5462ad3 Island: Use sum() to count open ports 2022-09-30 12:06:09 -04:00
Mike Salvatore 9a6300481c
Merge pull request #2377 from guardicore/2267-publish-tcp-scan-event
Publish TCPScanEvent
2022-09-30 11:59:51 -04:00
Mike Salvatore 4987dddc0c Agent: Use dict comprehension instead of for 2022-09-30 11:53:53 -04:00
Mike Salvatore 68b288e5b3 Island: Add `GET /api/agents/` 2022-09-30 11:07:33 -04:00
Ilija Lazoroski 3f89e50930 UT: Fix tcp_scanner tests to patch the time function 2022-09-30 16:51:53 +02:00
Ilija Lazoroski 9154f6f9dc Agent: Generate timestamp when checking for tcp ports 2022-09-30 16:51:53 +02:00
Shreya Malviya 96af86f766 UT: Move variable to above fixtures in test_tcp_scanner.py 2022-09-30 16:51:53 +02:00
Shreya Malviya 9754b4731c UT: Mock AbstractAgentEvent's timestamp (time.time()) in test_tcp_scanner.py 2022-09-30 16:51:53 +02:00
Ilija Lazoroski 326b07e5c1 Island: Fix typo in ScanEventHandler docstring 2022-09-30 16:26:00 +02:00
Ilija Lazoroski d42a353aaa Island: Remove TypeError exception from ScanEventHandler 2022-09-30 16:23:04 +02:00
Ilija Lazoroski f23093dc78 Island: Remove handle_ping_scan_event callable class 2022-09-30 16:20:23 +02:00
Ilija Lazoroski 8002080c8b Island: Subscribe to Ping and TCP scan events with ScanEventHandlers 2022-09-30 16:18:49 +02:00
Ilija Lazoroski 2686a7a4ee UT: Add tests for ScanEventHandler 2022-09-30 16:18:49 +02:00
Ilija Lazoroski e4aec8b9a3 Island: Add ScanEventHandler to agent_event_handlers 2022-09-30 16:18:49 +02:00
Mike Salvatore 3b6e4f5313 Island: Simplify cursor to agents 2022-09-30 10:16:17 -04:00
Mike Salvatore 411b027e92 Island: Implement MongoAgentRepository.get_agents() 2022-09-30 10:15:31 -04:00
Mike Salvatore 84f21b0c1d Island: Add IAgentRepository.get_agents() 2022-09-30 10:15:18 -04:00
Mike Salvatore 61bda27d7f UT: Fix bug in test_handle_ping_scan_event test 2022-09-30 09:50:17 -04:00
Mike Salvatore 2142dce97e Island: Don't handle TypeError in handle_ping_scan_event 2022-09-30 09:49:54 -04:00
Shreya Malviya 0a11d34fb7 UT: Assert mock_agent_event_queue.publish's call args in test_tcp_scanner.py 2022-09-30 18:57:29 +05:30
Shreya Malviya 0bf9309e07 UT: Assert mock_agent_event_queue.publish's call counts in test_tcp_scanner.py 2022-09-30 18:57:29 +05:30
Shreya Malviya bab4ebc2bc Agent: Add 'source' field when creating TCPScanEvent in TCP scanner 2022-09-30 18:57:29 +05:30
Shreya Malviya 35d3038bc8 Agent: Create TCPScanEvent and return from _generate_tcp_scan_event() in TCP scanner 2022-09-30 18:57:29 +05:30
Shreya Malviya 58ddd6e47d Agent: Partially implement publishing TCPScanEvent in TCP scanner 2022-09-30 18:57:29 +05:30
Shreya Malviya a3ca21481e Agent: Add missing/fix existing type hints in TCP scanner 2022-09-30 18:57:29 +05:30
Mike Salvatore fa18cb72da Common: Use NetworkPort in ExploitationOptionsConfiguration 2022-09-30 09:15:50 -04:00
Mike Salvatore 1a01b7c5dc Common: Use NetworkPort in TCPScanConfiguration 2022-09-30 09:14:22 -04:00
Mike Salvatore 5fc4d52d9f Common: Allow 0 for NetworkPort
While TCP port 0 is reserved and you're not supposed to use it, it is a
valid port.
2022-09-30 09:12:25 -04:00
Mike Salvatore 9f3aaf970f Island: Remove disused/emtpy monkey_control package 2022-09-30 07:33:48 -04:00
VakarisZ 61d7050594
Merge pull request #2368 from guardicore/2268-update-nodes
2268 update nodes
2022-09-30 13:58:22 +03:00