Commit Graph

3354 Commits

Author SHA1 Message Date
Mike Salvatore f8579300b3 Revert "Add keywords to arguments that create RansomwarePayload in monkey.py"
This reverts commit e34599779b.
2021-06-29 09:55:29 -04:00
Mike Salvatore 7e7d46d4e7 agent: Improve description in BatchableTelemMixin docstring 2021-06-29 09:53:32 -04:00
Mike Salvatore 444a18d57a agent: Fix parameter descriptions in FileEncryptionTelem docstring 2021-06-29 08:15:39 -04:00
Mike Salvatore d5a26ca6eb agent: Refactor BatchingTelemetryMessenger tests to destroy threads 2021-06-29 07:48:18 -04:00
Mike Salvatore 8cf316b64a agent: Refactor telemetry processing in BatchingTelemetryMessenger
We need to ensure when a BatchingTelemetryMessenger stops, all remaining
telemetries in its queue are sent. The existing logic does this, but
this commit improves the readability and intent of the code, as well as
adds a test for this condition.
2021-06-29 07:36:49 -04:00
Mike Salvatore 9d3d4611dc agent: Define _manage_telemetry_batches_thread in __init_() 2021-06-29 06:38:56 -04:00
Mike Salvatore 60c12127e3
Merge pull request #1271 from guardicore/ransomware-logging
Ransomware logging
2021-06-29 06:19:49 -04:00
VakarisZ a454449cca Do small readability changes in batching_telemetry_messenger.py 2021-06-29 12:09:26 +03:00
VakarisZ e34599779b Add keywords to arguments that create RansomwarePayload in monkey.py 2021-06-29 09:14:43 +03:00
Mike Salvatore f7f60be632 Merge branch 'ransomware_readme_config_option' into develop 2021-06-28 14:57:18 -04:00
Mike Salvatore f8411d3c92 Island: Rename ransomware config "notifications" section 2021-06-28 13:50:45 -04:00
Mike Salvatore dbd6dedb95 agent: Add explicit "success" field to FileEncryptionTelem 2021-06-28 13:37:00 -04:00
Mike Salvatore c1af3f8165 agent: Fix failing ransomware test on Windows 2021-06-28 13:31:28 -04:00
Mike Salvatore df1f3cda78 agent: Add explicit fields to FileEncryptionTelem 2021-06-28 13:30:53 -04:00
Mike Salvatore 49eb1cd996 agent: Rename RansomwareTelem -> FileEncryptionTelem
Ransomware will soon do more than just encrypt files. We should give the
telemetry that's related to encrypting files a more descriptive name
that better describes what it is reporting.
2021-06-28 13:20:30 -04:00
shreyamalviya 37a73440af tests: Add extra line in tests/monkey_island/utils.py to pass formatting checks 2021-06-28 22:43:25 +05:30
Mike Salvatore 543f0031a2 agent: Fully flush BatchingTelemetryMessenger queue before stopping 2021-06-28 12:34:24 -04:00
Mike Salvatore 7e3eef90cb agent: Rename get_telemetry_entries() -> get_telemetry_batch() 2021-06-28 12:27:32 -04:00
Mike Salvatore 2f62a14fbf agent: Remove start/stop from BatchingTelemetryMessenger
My original plan was to start a thread in __init__() and stop the thread
when __del__() was called. Since the running thread (object) contains a
reference to the BatchingTelemetryMessenger object that launched it, the
destructor will not be called until the thread is stopped. This
resulted in adding a stop() method (fadd978) followed by adding a
start() method (1d066c8e).

By using an inner class to run the thread, we enable the class to be
used as originally intended, reducing the burden on the user of this
class. The thread is now started on construction and stopped on
destruction. The user can remain blissfully unaware that anything
resembling threading is going in, and can use the
BatchingTelemetryMessenger just like any other ITelemetryMessenger.
2021-06-28 12:21:57 -04:00
Mike Salvatore 1d066c8e6d agent: Add explicit start to BatchingTelemetryMessenger
My original plan was to start a thread in __init__() and stop the thread
when __del__() was called. Since the running thread (object) contains a
reference to the BatchingTelemetryMessenger object that launched it, the
destructor will not be called until the thread is stopped. Therefore, a
stop() was added to allow the BatchingTelemetryMessenger to be stopped.
Since it has an explicit stop, it should also have an explicit start,
rather than starting the thread in the constructor.
2021-06-28 12:05:57 -04:00
Mike Salvatore 0a9c98f061 agent: Rename _run_batch_thread -> _should_run_batch_thread 2021-06-28 11:33:06 -04:00
Mike Salvatore be6e76757d agent: Move telemetry messenger construction out of "try" 2021-06-28 11:25:13 -04:00
Mike Salvatore 13c9e41a4c agent: Extract default period to constant 2021-06-28 11:15:46 -04:00
shreyamalviya 3bea4bb86f tests: Refactor duplicate code for checking secure Windows permissions 2021-06-28 20:23:03 +05:30
Mike Salvatore 85c91f55bb agent: Use BatchingTelemetryMessenger in RansomewarePayload
We don't want the ransomware payload to encrypt all files and then send
telemetry to the island. This could lead to a long period of time where
the user has no insight into what the monkey is doing on a node. We also
don't want to flood the island with telemetries. By using the
BatchingTelemetryMessenger, ransomware encryption telemetries are
batched together and periodically sent to the island.
2021-06-28 09:48:54 -04:00
Mike Salvatore fadd978050 agent: Add BatchedTelemetryMessenger
This telemetry messenger is a decorator that aggregates batchable
telemetries and sends them to the island periodically.
2021-06-28 09:34:18 -04:00
Mike Salvatore 691e01e9c1 tests: Move telemetry_messenger_spy to infection_monkey/conftest.py 2021-06-28 09:34:18 -04:00
Mike Salvatore e549a4f8f4 agent: Rename TelemetryMessengerWrapper
The term "wrapper" is sometimes used as synonym for the decorator
pattern, whereas this class is a textbook adapter. Use the term
"adapter" instead of "wrapper" and rename "TelemetryMessengerWrapper" to
"LegacyTelemetryMessengerAdapter", as this class servers as an adapter
between the new ITelemetryMessenger interface and the (soon to be) legacy way of
sending telemetry.
2021-06-28 09:34:09 -04:00
Mike Salvatore a0b43a17a2 agent: Implement IBatchableTelem in RansomwareTelem
This allows encryption attempt telmetries to be batched into one
telemetry object so they can be sent to the island in batches.
2021-06-28 09:33:33 -04:00
Mike Salvatore 8e40e44263 agent: Add BatchableTelemMixin
Adds an implementation as a mixin of the two methods specified by
IBatchableTelem.
2021-06-28 09:33:33 -04:00
Mike Salvatore f2a940a4e0 agent: Add IBatchableTelem
IBatchableTelem adds two methods to the ITelem interface. These methods allow
a telemetry object to mange batches of telemetry entries, rather than
just one.
2021-06-28 09:33:33 -04:00
Mike Salvatore 2ec020f276 agent: Add logging to ransomware payload 2021-06-28 09:29:48 -04:00
Mike Salvatore 59efaabd50 agent: Catch and log exceptions thrown by the ransomware payload 2021-06-28 09:28:43 -04:00
VakarisZ b7c8006f94 Add readme to ransomware section of configuration schema 2021-06-28 14:43:51 +03:00
Shreya 7afe0818e5 tests: Use `is_windows_os()` while skipping tests in test_post_breach_files.py 2021-06-28 14:07:06 +05:30
Shreya 7211d59a38 tests: Add unit test for custom PBA dir permissions on Windows 2021-06-28 14:05:41 +05:30
Shreya 75a2f1b12e island: Use `create_secure_directory()` for custom PBA directory creation 2021-06-28 11:56:40 +05:30
Mike Salvatore 3d403a92e8 agent: Fix incorrect config in ransomware payload 2021-06-25 10:21:08 -04:00
Mike Salvatore 76cf8a1bb4 agent: Wrap ransomware payload build/run in run_ransomware() 2021-06-25 09:19:15 -04:00
Mike Salvatore 6773f695ba agent: Use ITelem in send_telemetry() typehint 2021-06-24 15:57:10 -04:00
Mike Salvatore 76da583420 agent: Send telemetry from ransomware payload 2021-06-24 15:49:19 -04:00
Mike Salvatore 21525be192 agent: Use ITelem in ITelemetryMessenger.send() typehint 2021-06-24 13:55:09 -04:00
Mike Salvatore 46da0b7b1f agent: Add ITelem interface
Create a telemetry interface that sits above the BaseTelem abstract
class to allow telemetries to be extended without inheritance.
2021-06-24 12:07:14 -04:00
Mike Salvatore 77e3c8a257 agent: Add telemetry messenger interface
The telemetry classes have too many responsibilities. At the moment, one
such responsibility is to send themselves to the island. As our plugin
interfaces develop, the need may arise to send telemetry using different
mechanisms. To isolate the RansomwarePayload from these changes, the
ITelemetryMessenger interface is introduced in this commit. It provides
a send_telemetry() method that handles the specific details of how
telemetry is sent to the Island.

At the present time, the TelemetryMessengerWrapper class is introduced
to handle sending telemetry. It simply wraps the existing send() method
on the telemetry class.
2021-06-24 10:26:00 -04:00
Shreya cec8341b17 tests: Add unit tests for ransomware telem 2021-06-24 10:26:00 -04:00
Shreya 29bd48f703 telem: Add ransomware telemetry 2021-06-24 10:26:00 -04:00
Shreya d600aa7208 telem: Add telem category for ransomware 2021-06-24 10:26:00 -04:00
Mike Salvatore ef209a693c agent: Remove second file from test_file_encrypted_in_place() 2021-06-24 07:00:44 -04:00
Mike Salvatore f1e592380b agent: Rename test_file_with_included_extension_encrypted 2021-06-24 07:00:06 -04:00
Mike Salvatore 70480c7011 agent: Rename RansomwareBitflipEncryptor -> BitflipEncryptor 2021-06-23 11:05:34 -04:00
Mike Salvatore 1929ea7dae agent: Add file_selectors.select_production_safe_target_files() 2021-06-23 11:01:58 -04:00
Mike Salvatore 97cf198965 agent: Narrow the responsibilities of RansomwareBitflipEncryptor 2021-06-23 10:50:14 -04:00
Mike Salvatore 2ea5dc6ac7 tests: Add missing test_lib.dll
The .gitignore file prevents dlls from being added to git. Since this
isn't a real dll, but is only used for testing, we can add it anyway.
2021-06-23 09:57:27 -04:00
Mike Salvatore 9165737389 agent: Use larger chunk size in RansomwarePayload
The larger chunk size improves efficiency by reducing the number of
reads.
2021-06-23 09:42:12 -04:00
Mike Salvatore ae0dfec3cc agent: Return results from RansomwareBitflipEncryptor.encrypt_files() 2021-06-23 09:37:33 -04:00
Mike Salvatore f1a365def2 agent: Add unit test for RansomwareBitflipEncryptor 2021-06-23 09:19:46 -04:00
Mike Salvatore 707b40608a tests: Extract ransomware target files to ransomware_target_files.py 2021-06-23 09:08:36 -04:00
Mike Salvatore d99811f83f tests: Move ransomware_target() fixture to ransomware/conftest.py 2021-06-23 09:04:24 -04:00
Mike Salvatore 45ba743418 tests: Move hash_file() into tests/utils.py 2021-06-23 09:01:42 -04:00
Mike Salvatore ab40518881 agent: Extract bitflip encryption into its own class 2021-06-23 08:56:12 -04:00
Mike Salvatore 2c97d04673 Agent: Don't run ransomware payload if no directory was specified 2021-06-23 08:34:09 -04:00
Mike Salvatore 7149e112b0 agent: Remove dirs_exist_ok from shutil.copytree() call
The dirs_exist_ok parameter of shutil.copytree() was introduced in
Python 3.8. Since the agent uses python3.7 in order to be more
compatible with older systems, we can't use this parameter.
2021-06-23 08:14:34 -04:00
Mike Salvatore 297adcf015 agent: Don't redefine EXTENSION in ransomware tests 2021-06-23 07:10:55 -04:00
Mike Salvatore 447138c079 agent: Rename RansomewarePayload.target_dir -> _target_dir 2021-06-23 06:57:31 -04:00
Mike Salvatore cef3bd618d agent: Test that ransomware payload does not encrypt recursively 2021-06-23 06:57:31 -04:00
Mike Salvatore 2dd75d7d0c agent: Rename files encrypted by ransomware with .m0nk3y extension 2021-06-23 06:57:31 -04:00
Mike Salvatore 1ff348d2fc agent: Add in-place, bitflip encryption to RansomwarePayload 2021-06-23 06:57:31 -04:00
Mike Salvatore 3edaffa922 agent: Add utility functions for flipping bits 2021-06-23 06:57:31 -04:00
Mike Salvatore 2b1ba994a4 agent: Remove errant "f" in format string 2021-06-23 06:55:35 -04:00
ilija-lazoroski 8ee1ce6706 agent: Update unit test for build_monkey_commandline
Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
2021-06-23 11:22:38 +02:00
ilija-lazoroski b65b26e856 agent: Join monkey cmdline for log
Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
2021-06-23 11:22:38 +02:00
Ilija Lazoroski feaa7ee867 agent: Resolve empty space in build_monkey_commandline 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 5a871da26a agent: Move GUID import to other imports 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 8c7fe00182 agent: Rename monkey_options to monkey_cmd_args 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 680b1f54d0 agent: Add type hinting to commands 2021-06-23 11:22:38 +02:00
Ilija Lazoroski e93df01e69 agent: Remove logging in commands 2021-06-23 11:22:38 +02:00
Ilija Lazoroski a158665f2b agent: Change absolute path to full path in get_monkey_commandline_linux 2021-06-23 11:22:38 +02:00
Ilija Lazoroski af974fae70 agent: Modify unit test for commands 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 36a9e02181 agent: Replace f-strings with explicit conversion 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 5c5d96f79d agent: Remove unnecessary log 2021-06-23 11:22:38 +02:00
Ilija Lazoroski b93be212f4 Add name consistency for get_monkey_commandline 2021-06-23 11:22:38 +02:00
Ilija Lazoroski d76e69fffe Add commands unit test_get_monkey_cmd_lines_linux 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 9a3d015503 Add commands unit test_get_monkey_cmd_lines_windows 2021-06-23 11:22:38 +02:00
Ilija Lazoroski b1dd08b390 Add depth unit tests for test_build_monkey_commandline_explicitly 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 24bb79af6a agent: Convert unit test_commands to pytest 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 4d71ed42a5 Remove unnecessary unit test for build_monkey_commandline_explicitly 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 9fd27141f2 Resolved string templating in dropper and windows_upgrader. 2021-06-23 11:22:38 +02:00
Ilija Lazoroski 0517f3e06f Added string templating functions for infection monkey dropper. 2021-06-23 11:22:38 +02:00
VakarisZ f5ebd2d39a Fix a bug of incorrect access to ransomware config options in ransomware_payload.py 2021-06-23 11:48:24 +03:00
Mike Salvatore 2549f088d1 agent: Do not encrypt Windows shortcuts in ransomware simulation
In order to keep Infection Monkey safe for production environments, the
ransomware payload will explicitly ignore Windows shortcuts to prevent
important files from accidentally getting encrypted.
2021-06-22 15:27:48 -04:00
Mike Salvatore 41bf137ee4 agent: Add is_not_shortcut_filter()
Adds a filter that can be used with filter_files() to return only files
that are not Windows shortcuts.
2021-06-22 15:27:48 -04:00
Mike Salvatore 4eaa568479 agent: Do not encrypt symlinks in ransomware simulation
In order to keep Infection Monkey safe for production environments, the
ransomware payload will explicitly ignore symlinks to prevent important
files from accidentally getting encrypted.
2021-06-22 15:27:39 -04:00
Mike Salvatore 14845c659a agent: Add is_not_symlink_filter()
Adds a filter that can be used with filter_files() to return only files
that are not symlinks.
2021-06-22 15:27:33 -04:00
Mike Salvatore bfa640444e agent: Test filter_files() with multiple filters 2021-06-22 15:11:32 -04:00
Mike Salvatore 30f88ca319 agent: Refactor add_subdirs_to_dir in test_dir_utils.py 2021-06-22 14:07:31 -04:00
Mike Salvatore b643cd1edd agent: Reimplement get_all_regular_files_in_directory using filter_files 2021-06-22 13:49:17 -04:00
Mike Salvatore f33772060f agent: Rename get_all_files_in_directory()
Rename get_all_files_in_directory() ->
get_all_regular_files_in_directory(), as this name is more explicit
about exactly which files will be included in the function's output.
2021-06-22 13:46:03 -04:00
Mike Salvatore db8dfd9f17 agent: Refactor filter_files to accept a list of filters 2021-06-22 13:43:27 -04:00
Mike Salvatore a8ebe6ae76 agent: Replace self.config with self.target_dir in RansomewarePayload 2021-06-22 13:31:20 -04:00
Mike Salvatore 0b953c8cff agent: Remove ransomware/utils.py
The code for getting files to encrypt has become so trivial that it no
longer warrants a separate function outside of _find_files().
2021-06-22 13:23:14 -04:00
Mike Salvatore 5c1902ca73 agent: Add file_extension_filter to dir_utils 2021-06-22 13:17:11 -04:00
Mike Salvatore cf2cdc4ab8 agent: Add filter_files() function to dir_utils 2021-06-22 13:16:53 -04:00
Mike Salvatore bfc86041ab agent: Switch get_all_files_in_directory from str to Path
Path and PurePath objects provide a lot of syntactic sugar to file
handling that makes the code clearer and more concise.
2021-06-22 12:58:03 -04:00
Mike Salvatore e2dfd6a5e3 agent: Simplify get_all_files_in_directory() with list comprehension 2021-06-22 12:15:03 -04:00
Shreya efef40edf9 tests: Fix ransomware tests and move tests for get_all_files_in_directory from ransomware/test_utils.py to utils/test_dir_utils.py 2021-06-22 20:07:38 +05:30
Shreya a2ebe3386f agent: Rename utils/file_utils.py to utils/dir_utils.py 2021-06-22 20:02:59 +05:30
Shreya 5f714e0d98 agent: Move get_all_files_in_directory() from ransomware/utils.py to utils/file_utils.py 2021-06-22 19:45:50 +05:30
Shreya c6da73ad79 agent: ransomware: Incorporate changes into stub 2021-06-22 19:42:50 +05:30
Shreya 48967a2e5b tests: Modify unit tests for ransomware utils to test for a file like file.jpg.zip 2021-06-22 19:30:44 +05:30
Shreya 8abb9d95ce agent: ransomware: Move VALID_FILE_EXTENSIONS_FOR_ENCRYPTION to separate file 2021-06-22 19:30:44 +05:30
Shreya f8c1886977 tests: Add unit tests for ransomware utils - get_files_to_encrypt(), get_all_files_in_directory() 2021-06-22 19:30:44 +05:30
Shreya 3192355f5a agent: ransomware: Return list instead of filter object when getting files in directory 2021-06-22 19:30:44 +05:30
Shreya 5b64ea5151 agent: ransomware: Iterate through files in directory and get list of files to encrypt 2021-06-22 19:30:44 +05:30
Mike Salvatore ccc3557021
Merge pull request #1255 from guardicore/ransomware_stub
Adds ransomware stub
2021-06-22 09:59:14 -04:00
VakarisZ 947a03c9a1 Refactor ransomware configuration option from flattened to a dict that encompasses any ransomware options 2021-06-22 16:42:09 +03:00
VakarisZ 63901bcd26 Refactor ransomware payload __init__.py into ransomware_payload.py with a stubbed ransomware payload class 2021-06-22 16:37:44 +03:00
VakarisZ d7f4035884 Adds ransomware entrypoint in monkey and logs values provided in ransomware configuration options 2021-06-22 10:39:02 +03:00
VakarisZ 00edb17b86 Adds ransomware page to the configuration UI 2021-06-22 10:35:21 +03:00
VakarisZ 9ef4ce8bac Fixes formatting and naming for ransomware configuration options 2021-06-22 09:47:11 +03:00
VakarisZ 1ede7ebaec Adds ransomware configuration options to monkey configuration 2021-06-22 09:14:29 +03:00
Mike Salvatore 02ed22bab7 island: Remove FILE_SHARE_WRITE from windows permissions
Granting FILE_SHARE_WRITE on mongo_key.bin is unnecessary. Since
mongo_key.bin is the only file that is created using
_get_file_descriptor_for_new_secure_file_windows() at the moment, we
won't grant FILE_SHARE_WRITE.
2021-06-21 14:00:30 -04:00
Mike Salvatore 2d18a68787 island: Fix return type hint for _get_null_value_for_win32()
The _get_null_value_for_win32() function does not return None, it
returns a PyHANDLE object. For the moment, I'm unable to determine the
correct way to import PyHANDLE so that it can be specified in the type
hint. Since type hints aren't actually enforced, it's not worth the
effort to fully solve this at the present time, so the type hint has
just been removed.
2021-06-21 10:40:09 -04:00
Mike Salvatore 51aa0d1564 island: Refactor get_file_descriptor_for_new_secure_file as contextmgr
get_file_descriptor_for_new_secure_file() has been refactored as a
contextmanager. Additionally, it has been renamed to
open_new_securely_permissioned_file(). The function can now be used
similarly to open().

Example:

with open_new_securely_permissioned_file(file_path, "wb") as f:
    f.write(data)
2021-06-21 10:40:08 -04:00
Mike Salvatore b39440e871 island: Return a fd instead of PyHandle during windows file creation
Fixes #1252
2021-06-21 09:20:58 -04:00
shreyamalviya ec2fb182de tests: Modify test_file_utils.py to check for inheritance when creating secure file/dir on Windows 2021-06-21 14:02:40 +05:30
VakarisZ 84868b29ef Adds ransomware section to island's configuration schema 2021-06-21 10:56:44 +03:00
shreyamalviya 0ded39bb62 island: Add inheritance when setting Windows file or dir permissions
Add container and object inheritance to the ACE's security descriptor
when setting Windows permissions
2021-06-18 20:11:33 +05:30
VakarisZ cfdf1183f5 Fix invalid handle for mongo key file error by using the filename instead 2021-06-18 12:30:46 +03:00
Ilija Lazoroski b586bc5624 Added troubleshooting section to infection monkey readme and monkey_island readme. 2021-06-16 06:57:40 -04:00
Ilija Lazoroski ef3cbe51cf Added altpgraph to the Pipfile. 2021-06-15 14:53:30 -04:00
Mike Salvatore 44bdfa5508 island: Rename create_secure_file tests
create_secure_file() was previously renamed to
get_file_descriptor_for_new_secure_file().
2021-06-15 13:14:31 -04:00
Mike Salvatore 327ff7a626 island: Remove isfile() check from get_file_descriptor_for_new_secure_file()
get_file_descriptor_for_new_secure_file() should return a file
descriptor. If the file already exists, this function would return
nothing, potentially causing issues with whatever relies on this
function's output.
2021-06-15 13:12:18 -04:00
Shreya 80bfd90074 island: Specify mode to open new secure file in, in encryptor.py 2021-06-15 19:29:49 +05:30
Shreya 64ac1fe706 island: Add type hinting in file_utils.py 2021-06-15 19:24:55 +05:30
Shreya 22c3c5a11b tests: Fix secure file creation tests as per latest changes 2021-06-15 19:24:50 +05:30
Shreya 37889d0b87 island: Extract code to `_get_null_value_for_win32()` in file_utils.py 2021-06-15 19:10:28 +05:30
Shreya b648452b5f island: Fix comment and statement formatting in file_utils.py 2021-06-15 19:10:28 +05:30
Shreya 14371f3fba island: Return file descriptor when creating secure file 2021-06-15 19:10:28 +05:30
Mike Salvatore 6b4a0906c0 island: use constants for permissions mode in test_file_utils.py 2021-06-15 09:31:22 -04:00
Mike Salvatore 8b2c3ef8a3 island: Remove execute bit from "secure" file creation 2021-06-15 09:29:18 -04:00
Shreya e90bf52674 island: Use `Path().touch()` instead of `os.open()` when securely creating a file on Linux 2021-06-15 15:51:02 +05:30
shreyamalviya e01165403a island, tests: Run isort and black on previously changed files 2021-06-15 12:51:10 +05:30
shreyamalviya 5abcadc69a tests: Move tests from test_utils.py to test_file_utils.py 2021-06-15 12:47:34 +05:30
shreyamalviya b5f092a85c island: Move code from cc/environment/utils.py to cc/server_utils/file_utils.py 2021-06-15 12:46:18 +05:30
shreyamalviya 91873343dd tests: Add comment to `test_create_secure_directory__perm_windows()` explaining when it fails 2021-06-15 12:26:58 +05:30
shreyamalviya d7565fc515 island: Use stat.S_IRWXU in place of 0o700 in cc/environment/utils.py 2021-06-15 12:23:13 +05:30
shreyamalviya 5ea046eda5 island: Format cc/environment/utils.py with black 2021-06-15 00:06:40 +05:30
shreyamalviya 443b66e9d9 tests: Remove accidental code in `_get_acl_and_sid_from_path()` in test_utils.py 2021-06-14 23:50:08 +05:30
shreyamalviya 1170b176d3 island: Fix Windows' secure file creation by using a different file flag 2021-06-14 23:41:56 +05:30
shreyamalviya 7ddb986f15 tests: Fix file creation unit tests in test_utils.py 2021-06-14 23:24:52 +05:30