Commit Graph

11147 Commits

Author SHA1 Message Date
Kekoa Kaaikala c4804f06a9 Agent: Use SocketAddress in IIslandAPIClient 2022-09-27 15:33:28 +05:30
ilija-lazoroski 90890106f7
Merge pull request #2355 from guardicore/2268-pingscanevent
2268 pingscanevent
2022-09-27 10:58:20 +02:00
vakarisz e2f0a2dfc0 Common: Improve comment's readability in agent_sub_configurations.py 2022-09-27 11:51:27 +03:00
Ilija Lazoroski c119406b2d Project: Add import for PingScanEvent 2022-09-27 10:50:23 +02:00
vakarisz b9cf200832 Agent: Change return typehint to be more specific 2022-09-27 11:50:20 +03:00
Ilija Lazoroski 7bb7ef7dce Common: Export PingScanEvent from __init__ 2022-09-27 10:49:40 +02:00
vakarisz 182a566087 Agent: Simplify scan_target_generator.py
The responsibility of type-hints are not to implement logic. Implementing logic via type-hints diminishes readability, because it forces you to cross-reference a class instead of just exposing the logic where it's used
2022-09-27 11:33:30 +03:00
Shreya Malviya 14999fba4e
Merge pull request #2353 from guardicore/2323-SocketAddress-in-AgentRegistrationData
SocketAddress in AgentRegistrationData
2022-09-27 13:56:16 +05:30
Shreya Malviya 9b4de6bab8 UT: Use SocketAddress.from_string() in test_handle_agent_registration.py 2022-09-27 13:11:13 +05:30
Shreya Malviya d1199fdab2 Agent: Simplify relay disconnect logic in network/relay/utils.py 2022-09-27 13:06:29 +05:30
Shreya Malviya 441c14f15d Use SocketAddress.from_string() in network/relay/utils.py 2022-09-27 12:56:10 +05:30
Shreya Malviya 1f80eac4b6 island: Remove unused import in cc/island_event_handlers/handle_agent_registration.py 2022-09-27 12:51:49 +05:30
Shreya Malviya 8b0ebfc3a7 UT: Add/modify tests as per SocketAddress related changes 2022-09-27 12:51:49 +05:30
Shreya Malviya 3b192a869e UT: Replace test data with SocketAddress wherever required 2022-09-27 12:51:49 +05:30
Shreya Malviya 0ae653fb72 Agent: Let InfectionMonkey._cmd_island_port stay a str
No part of the code in InfectionMonkey requires _cmd_island_port to be an int now
2022-09-27 12:51:49 +05:30
Shreya Malviya 8a609e0871 Agent: Simplify logic in SocketAddress object creation in monkey.py and network/relay/utils.py 2022-09-27 12:51:49 +05:30
Shreya Malviya 6a29702846 Island: Modify cc_server type in Agent pydantic model 2022-09-27 12:51:49 +05:30
Shreya Malviya 284ec3d119 Agent: Use SocketAddress type in handle_agent_registration._get_or_create_cc_machine() 2022-09-27 12:51:49 +05:30
Shreya Malviya ac633a6e75 Agent: Change argument in InfectionMonkey._register_agent() to type SocketAddress 2022-09-27 12:51:49 +05:30
Shreya Malviya 6df2c29e30 Common: Update cc_server's type in AgentRegistrationData to SocketAddress 2022-09-27 12:51:49 +05:30
Kekoa Kaaikala 311c294033 Agent: Fix mypy issues in scan_target_generator.py 2022-09-26 20:20:24 +00:00
Kekoa Kaaikala 1bf610a4a8 Agent: Fix missing names 2022-09-26 19:51:14 +00:00
Kekoa Kaaikala 87ca11962e Common: Create PingScanEvent 2022-09-26 19:04:06 +00:00
Kekoa Kaaikala d87cf5a9f5 Agent: Fix mypy issues in test_propagator.py 2022-09-26 18:54:26 +00:00
Kekoa Kaaikala aeb6630ebc Agent: Move PingScanData to common 2022-09-26 18:52:23 +00:00
Kekoa Kaaikala dd5b796bfe Agent: Convert PingScanData to dataclass 2022-09-26 17:48:27 +00:00
Kekoa Kaaikala ef053ea017 Docs: Update network scanning documentation 2022-09-26 15:13:45 +00:00
Kekoa Kaaikala 6f095eb0c1
Merge pull request #2350 from guardicore/2323-parse-servers-as-socketaddress
2323 parse servers as socketaddress
2022-09-26 10:44:18 -04:00
vakarisz 9728d22250 Agent, Island: Rename scan_local_interfaces to scan_my_networks
"scan_my_networks" is the shortest way to convey that networks the machine belongs to will get scanned
2022-09-26 16:14:47 +03:00
Kekoa Kaaikala 8b8ef79e0a Common: Move SocketAddress function into the class
Moved socketaddress_from_string into SocketAddress.from_string
2022-09-26 12:32:00 +00:00
Shreya Malviya aec9cbb4b1
Merge pull request #2352 from guardicore/2323-SocketAddress-in-TCPRelay
SocketAddress in TCPRelay
2022-09-26 17:10:30 +05:30
Shreya Malviya 3de18d5f1c Project: Remove stale Vulture allowlist entry 2022-09-26 16:50:01 +05:30
Shreya Malviya a093a3e527 Agent: Use default str representation of SocketAddress in log message in notify_disconnect() 2022-09-26 16:49:42 +05:30
Shreya Malviya 4c76543a28 Agent: Use SocketAddress in notify_disconnect() in network relay utils 2022-09-26 13:44:40 +05:30
Shreya Malviya 105a2b39cf Agent: Add SocketAddress type variable in _send_remove_from_waitlist_control_message_to_relay() 2022-09-26 13:38:13 +05:30
Shreya Malviya 0db0347008 Agent: Use SocketAddress in TCPPipeSpawner 2022-09-26 13:30:30 +05:30
Shreya Malviya 426647c5b9 Agent: Use SocketAddress in TCPRelay 2022-09-26 13:07:47 +05:30
Kekoa Kaaikala 53a9c62245 Agent: Parse --servers to SocketAddress 2022-09-23 17:57:53 +00:00
Kekoa Kaaikala 4982999b99 Common: Add function to parse SocketAddress 2022-09-23 17:54:49 +00:00
Mike Salvatore dbaa56c39d
Merge pull request #2349 from guardicore/2261-refactor-manual-agent-logic
2261 refactor manual agent logic
2022-09-23 13:45:55 -04:00
Mike Salvatore 73841fb04e Project: Update vulture_allowlist.py 2022-09-23 13:04:21 -04:00
Mike Salvatore 6c63d4edbd Agent: Remove unused "Option" from i_island_api_client.py 2022-09-23 12:57:09 -04:00
Mike Salvatore 3fbbc01861 Changelog: Add entries for #2261 2022-09-23 12:56:13 -04:00
vakarisz b11cd9c5f1 Island: Remove agent controls
Agent controls are being replaced by agent signal events
2022-09-23 12:56:13 -04:00
Mike Salvatore a49ddf7a4a Merge pull request #2347 from guardicore/2261-move-agent-signals-to-common
2261 move agent signals to common
2022-09-23 12:56:13 -04:00
Mike Salvatore feb8288c98 Agent: Pass the correct agent ID to ControlChannel 2022-09-23 12:56:13 -04:00
Mike Salvatore f7198ea98a UT: Add proper test for ControlChannel.should_agent_stop() 2022-09-23 12:56:13 -04:00
ilija-lazoroski 5ec0f2dbd2 Merge pull request #2343 from guardicore/2261-modify-agent-to-use-signals
2261 modify agent to use signals
2022-09-23 12:56:13 -04:00
Mike Salvatore a5f1117ce3 Island: Fix grammar in docstring
Co-authored-by: Kekoa Kaaikala <kekoa.kaaikala@gmail.com>
2022-09-23 12:56:13 -04:00
Ilija Lazoroski a314efb8d9 Agent: Reword get_agent_signals docstring 2022-09-23 12:56:13 -04:00