Commit Graph

8792 Commits

Author SHA1 Message Date
Mike Salvatore e0047e485b Island: Reformat comments 2022-06-26 09:40:14 -04:00
Mike Salvatore fefd2daf2b Agent: Use Mapping instead of Dict 2022-06-24 19:21:48 -04:00
Mike Salvatore 503a0a833f Agent: Use Sequence instead of List for type hints 2022-06-24 19:19:51 -04:00
Mike Salvatore 4f7d8be6ba Agent: Use PluginConfiguration in _run_payload() 2022-06-24 15:35:41 -04:00
Mike Salvatore 8886ebc8b8 Agent: Remove unnecessary local variables 2022-06-24 15:33:47 -04:00
Mike Salvatore dc9b91d430 Agent: Use Iterable instead of List in type hint 2022-06-24 15:32:06 -04:00
Mike Salvatore 33ec4f7ae9 Agent: Log configuration when it's received from the Island 2022-06-24 15:16:43 -04:00
Mike Salvatore b219ca0917 UT: Fix line that was too long 2022-06-24 14:48:13 -04:00
Mike Salvatore 84fc78cbf8 UT: Remove unused imports from conftest.py 2022-06-24 14:47:15 -04:00
Mike Salvatore 4530cf3071 Project: Remove "Explain Changes" section that no one ever uses 2022-06-24 14:29:01 -04:00
Mike Salvatore 93ed7cf428
Merge pull request #2041 from guardicore/agent-configuration-construction
Agent configuration construction
2022-06-24 14:17:13 -04:00
Mike Salvatore 568eb4ff3b Common: Add docstrings to static methods in AgentConfiguration 2022-06-24 13:30:43 -04:00
Mike Salvatore 8cb045d635 Common: Fix incorrect type hints on AgentConfiguration.from_json() 2022-06-24 13:25:09 -04:00
Mike Salvatore 334d2a790f Common: Rename from_dict() -> from_mapping() 2022-06-24 13:25:01 -04:00
Mike Salvatore e2f365a1f9 Common: Rename dict_ -> config_dict 2022-06-24 13:22:41 -04:00
Mike Salvatore dbd0d3e0dd Common: Encapsulate MarshmallowError 2022-06-24 13:21:39 -04:00
Mike Salvatore 94524d124c Common: Add InvalidConfigurationError 2022-06-24 13:05:16 -04:00
Mike Salvatore fc9d854c72 Common: Add validation to AgentConfiguration construction 2022-06-24 12:56:34 -04:00
Mike Salvatore ea02bec0b4 Common: Remove circular dependency in agent_configuration.py 2022-06-24 12:42:09 -04:00
Mike Salvatore 4c47eae70b Common: Encapsulate AgentConfigurationSchema 2022-06-24 12:39:47 -04:00
Mike Salvatore 07d1d9c45a Island: Use {from,to}_json() in resources 2022-06-24 12:33:12 -04:00
Mike Salvatore a1baaae76a Common: Use from_json() in build_default_agent_configuration() 2022-06-24 12:29:54 -04:00
Mike Salvatore 6a927266a4 Island: Use {from,to}_json() in FileAgentConfigurationRepository 2022-06-24 12:28:36 -04:00
Mike Salvatore e4eee6a5eb UT: Use from_dict() and from_json() in tests 2022-06-24 12:28:30 -04:00
Mike Salvatore 28250daffe Common: Add AgentConfiguration.to_json() 2022-06-24 12:19:31 -04:00
Mike Salvatore 1f9a056b0b Agent: Add AgentConfiguration.from_json() 2022-06-24 11:51:33 -04:00
Mike Salvatore 8605fd40ac UT: Add a test for AgentConfiguration.from_dict() 2022-06-24 11:50:49 -04:00
Mike Salvatore 5c739716a9 Common: Rename _dict -> dict_ 2022-06-24 11:44:00 -04:00
Mike Salvatore e3cea20cd5 UT: Move test_agent_configuration.py to configuration/ 2022-06-24 11:42:24 -04:00
Mike Salvatore 7bba711307 Agent: Revert scan/exploit thread numer change
The number of scan and exploit threads was changed accidentally in
6d156b8f.
2022-06-24 11:08:29 -04:00
Mike Salvatore 02cca3e12a Agent: Remove unnecessary type hints from IAgentRepository doctring 2022-06-24 07:42:01 -04:00
Mike Salvatore 7b4daaa40f Agent: Change IAgentRepository to ccept OperatingSystems
This was missed in d59dd81f and ffd3464d.
2022-06-24 07:40:24 -04:00
Mike Salvatore a3db4142bf Common: Add a docstring to OperatingSystems 2022-06-24 07:36:58 -04:00
Mike Salvatore 2eb1691030 Agent: Use operating_system.value in _download_binary_from_island() 2022-06-24 07:34:10 -04:00
Mike Salvatore 858eb2302c Agent: Rename os -> operating_system in caching_agent_repository
The variable name "os" conflicts with the name of Python's `os` library.
2022-06-24 07:23:26 -04:00
Mike Salvatore ffd3464d8a Agent: Move enum to string conversion to _download_binary_from_island() 2022-06-24 07:22:07 -04:00
Ilija Lazoroski e1d5d25e9c Agent: Use OperatingSystem.WINDOWS in Powershell 2022-06-24 11:18:39 +02:00
Ilija Lazoroski b605f16c4f Agent: Use == to compare OperatingSystems enum in Log4Shell 2022-06-24 11:11:19 +02:00
Ilija Lazoroski fb67586a4c Agent: Use OperatingSystems.value for urllib.parse.quote 2022-06-24 10:51:58 +02:00
Ilija Lazoroski d59dd81f43 Agent: Use OperatingSystems in CachingAgentRepository 2022-06-24 10:19:47 +02:00
Ilija Lazoroski f9445a2c76 Agent: Use == to compare OperatingSystems enum 2022-06-24 10:18:51 +02:00
Ilija Lazoroski 2ff2e5f597 Agent: Fix running of payloads 2022-06-24 08:33:21 +02:00
Mike Salvatore 6d156b8fee Island: Return config timeouts in seconds
The old config scheme stored timeouts as milliseconds, whereas the new
one uses seconds. Seconds are more convenient because most python
methods expecting timeouts are expecting floating-point seconds.
2022-06-23 16:55:10 -04:00
Mike Salvatore 05f640d487 Agent: Rename should_propagate -> maximum_depth_reached 2022-06-23 16:36:01 -04:00
Mike Salvatore ad0f6946bd Agent: Decouple should_propagate() and AgentConfiguration 2022-06-23 16:32:55 -04:00
Mike Salvatore afeca66d92 UT: Use AgentConfiguration in test_propagation.py 2022-06-23 16:27:05 -04:00
Mike Salvatore 5a95aef94c Agent: Remove unnecessary parameter 2022-06-23 15:57:11 -04:00
Mike Salvatore bff92ed7ad UT: Fix erroneously abbreviated fixture 2022-06-23 15:57:06 -04:00
Mike Salvatore 81d3300ec7 Agent: Remove print() that was added by mistake 2022-06-23 15:43:34 -04:00
Mike Salvatore 6e951ed65d UT: Remove supported_os from default_config.py
"supported_os" was removed from the schema in d079d74b
2022-06-23 14:56:24 -04:00