Skip to content

Conversation

VakarisZ
Copy link
Contributor

@VakarisZ VakarisZ commented Jul 7, 2021

Add a UT to test if ransomware payload tries to encrypt files if "linux_target_dir" and "windows_target_dir" inputs are empty.

We have empty "linux_target_dir" and "windows_target_dir" by default so it's important that ransomware payload doesn't try to encrypt files by default, without users' knowledge.

Add any further explanations here.

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by Running the UT, seeing it fail.

  • If applicable, add screenshots or log transcripts of the feature working

…ux_target_dir" and "windows_target_dir" inputs are empty.

We have empty "linux_target_dir" and "windows_target_dir" by default so it's important that ransomware payload doesn't try to encrypt files by default, without users' knowledge.
def test_encryption_skipped_if_no_directory(
ransomware_payload_config, telemetry_messenger_spy, monkeypatch
):
ransomware_payload_config["encryption"]["enabled"] = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true by default in ransomware_payload_config.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd still prefer to explicitly state that so that there's no possibility of us passing the test just because the defaults changed.

@VakarisZ VakarisZ merged commit d33fc26 into develop Jul 7, 2021
@VakarisZ VakarisZ deleted the ransomware_no_encryption_bugfix branch July 7, 2021 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants