From c53d41645cdfeccd442d6f2b7a6331459b3f6506 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 27 Jul 2022 18:15:33 +0530 Subject: [PATCH] Common: Add maximum depth validation to PropagationConfigurationSchema --- .../agent_configuration/agent_sub_configuration_schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py index 15fdd6ba9..e666407ac 100644 --- a/monkey/common/agent_configuration/agent_sub_configuration_schemas.py +++ b/monkey/common/agent_configuration/agent_sub_configuration_schemas.py @@ -135,7 +135,7 @@ class ExploitationConfigurationSchema(Schema): class PropagationConfigurationSchema(Schema): - maximum_depth = fields.Int() + maximum_depth = fields.Int(validate=validate.Range(min=1)) network_scan = fields.Nested(NetworkScanConfigurationSchema) exploitation = fields.Nested(ExploitationConfigurationSchema)