Mike Salvatore
2aa79331e3
Island: Extract method to improve readablility
2022-09-29 15:05:46 -04:00
Mike Salvatore
052c31e8ff
Agent: Modify scan_tcp_ports() to accept an IAgentEventQueue
2022-09-29 14:45:24 -04:00
Kekoa Kaaikala
c06d06edc4
UT: Fix storageerror test
2022-09-29 18:34:46 +00:00
Kekoa Kaaikala
783cc06c0d
Common: Mitigate mypy errors from DIContainer
2022-09-29 18:34:46 +00:00
Kekoa Kaaikala
9a880123da
UT: Fix failing tests
2022-09-29 18:34:46 +00:00
Kekoa Kaaikala
d811c6548c
Island: Prefer existing OS data to ping OS data
...
Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
2022-09-29 18:34:46 +00:00
vakarisz
9b30770777
Island: Fix ping scan handler to add machines IP
2022-09-29 18:34:46 +00:00
vakarisz
ff2b04c703
Common: Override target for PingScanEvent to more specific type hint
2022-09-29 18:34:46 +00:00
vakarisz
4d2a6083a1
Island: Fix a bug where failed ping scan created machines
2022-09-29 18:34:46 +00:00
vakarisz
3d80adbcd5
Common: Flatten the ping scan event
2022-09-29 18:34:46 +00:00
vakarisz
6aa69a10b6
Island: Setup ping scan event listener/handler
2022-09-29 18:32:51 +00:00
Kekoa Kaaikala
65d43575d1
UT: Make tests pass
2022-09-29 18:32:51 +00:00
vakarisz
168a5845fd
UT: Fix and rename unit tests in test_handle_ping_scan_event.py
2022-09-29 18:32:51 +00:00
vakarisz
b6d9f88dee
Island: Style improvements in handle_ping_scan_event.py
2022-09-29 18:32:50 +00:00
vakarisz
c807f97d18
Island: Rename handle_scan_data to handle_ping_scan_event
2022-09-29 18:32:50 +00:00
vakarisz
ecb7ca0d8d
Island: Subscribe ping scan events
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
799f08e383
UT: Implement test_handle_scan_data__upserts_machine_if_not_existed
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
29355e9d14
UT: Implement test_handle_scan_data__node_not_upserted_if_no_matching_machine
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
18ca84a247
UT: Implement test_handle_scan_data__node_not_upserted_if_no_matching_agent
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
ce8219aa6d
UT: Implement test_handle_scan_data__upserts_node
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
ab32daa0e0
Common: Fix AbstractAgentEvent union
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
1c127781ca
UT: Implement test_handle_scan_data__upserts_machine
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
a0d6565c4a
UT: Stub out unit tests for handle_scan_data
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
371ca12dfb
Island: Add handle_scan_data to __init__.py
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
89c6e2b7bc
Island: Extract methods in handle_scan_data
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
eacd426969
Island: Handle StorageError in handle_scan_data
2022-09-29 18:32:50 +00:00
Kekoa Kaaikala
304dfbd21f
Island: Add callable to handle PingScanEvent
2022-09-29 18:32:50 +00:00
Mike Salvatore
4b3402f7a8
UT: Move mock_agent_event_queue into conftest.py
2022-09-29 14:32:20 -04:00
Mike Salvatore
b95baaba87
UT: Add tests for TCPScanEvent
2022-09-29 13:59:55 -04:00
Mike Salvatore
208ba1c2ab
Common: Use lower-case member name for PortStatus values
2022-09-29 13:49:50 -04:00
Mike Salvatore
28026716db
Project: Import NetworkPort in vulture_allowlist.py
2022-09-29 13:41:19 -04:00
Mike Salvatore
349b183e5d
Common: Represent multiple ports in TCPScanEvent
2022-09-29 13:39:59 -04:00
Mike Salvatore
ccaf0b63c6
Common: Remove banner from TCPScanEvent
2022-09-29 13:38:33 -04:00
Mike Salvatore
34ca127c6c
Common: Capitalize TCP
2022-09-29 13:31:06 -04:00
Mike Salvatore
ba7e44038c
Common: Remove "service" from TCPScanEvent
...
It's not the responsibility of the agent to format this information for
display.
2022-09-29 13:29:43 -04:00
Mike Salvatore
edaa7ec34d
Common: Reword TCPScanEvent summary
2022-09-29 13:29:21 -04:00
Mike Salvatore
3dc6eba2da
Common: Remove disused common/port_status.py
...
This was moved to common.types and should have been removed in
8ae11e94aa
2022-09-29 13:22:25 -04:00
Ilija Lazoroski
28ca462ce5
Common: Add TCPScanEvent to agent events
2022-09-29 13:19:25 -04:00
Ilija Lazoroski
f62ab10d1c
Common: Add NetworkPort type
2022-09-29 13:17:50 -04:00
Mike Salvatore
0207519343
Merge branch '2267-common-port-status' into develop
2022-09-29 13:15:38 -04:00
Mike Salvatore
8ae11e9faa
Common,Agent: Move PortStatus to common.types
2022-09-29 13:15:03 -04:00
Ilija Lazoroski
18f8594deb
Agent: Use common.PortStatus instead of i_puppet.PortStatus
2022-09-29 13:13:36 -04:00
Ilija Lazoroski
c32013bf87
Common: Add PortStatus enum
2022-09-29 13:13:25 -04:00
Ilija Lazoroski
725c6d9419
UT: Make string ports to be integers
...
Pydantic converts strings to integer but if we enter
integers is safer.
2022-09-29 13:12:04 -04:00
Mike Salvatore
1b7c3be65b
Island: Add missing return types
2022-09-29 12:43:23 -04:00
Mike Salvatore
82e08ba157
Island: Pass the same lock to agent and island event queues
...
Subscribers to the Agent and Island event queues manipulate some of the
same data structures. Sharing the same lock between the queues allows
this to happen in a thread-safe manner.
2022-09-29 12:40:18 -04:00
Mike Salvatore
00d72390ff
Common: Accept a lock in LockingIslandEventQueueDecorator's constructor
2022-09-29 12:39:57 -04:00
Mike Salvatore
3344300f84
Common: Accept a lock in LockingAgentEventQueueDecorator's constructor
2022-09-29 12:39:17 -04:00
Mike Salvatore
91375cdff2
Island: Register a thread-safe IAgentEventQueue
2022-09-29 12:21:28 -04:00
Mike Salvatore
5d893d64cd
Common: Add LockingAgentEventQueueDecorator
2022-09-29 12:16:00 -04:00