From 73c61ebcf0847182a4e40d7f5f54ed4434948eb4 Mon Sep 17 00:00:00 2001 From: Shreya Date: Thu, 1 Jul 2021 13:19:44 +0530 Subject: [PATCH] island: Add ransomware directory path validators to ransomware schema --- monkey/monkey_island/cc/services/config_schema/ransomware.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/monkey_island/cc/services/config_schema/ransomware.py b/monkey/monkey_island/cc/services/config_schema/ransomware.py index 116a6ca70..4e03af168 100644 --- a/monkey/monkey_island/cc/services/config_schema/ransomware.py +++ b/monkey/monkey_island/cc/services/config_schema/ransomware.py @@ -1,3 +1,5 @@ +from common.common_consts.validation_formats import VALID_DIR_LINUX, VALID_DIR_WINDOWS + RANSOMWARE = { "title": "Ransomware", "type": "object", @@ -20,6 +22,7 @@ RANSOMWARE = { "linux_target_dir": { "title": "Linux target directory", "type": "string", + "format": VALID_DIR_LINUX, "default": "", "description": "A path to a directory on Linux systems that contains " "files that you will allow Infection Monkey to encrypt. If no " @@ -28,6 +31,7 @@ RANSOMWARE = { "windows_target_dir": { "title": "Windows target directory", "type": "string", + "format": VALID_DIR_WINDOWS, "default": "", "description": "A path to a directory on Windows systems that contains " "files that you will allow Infection Monkey to encrypt. If no "