Common: Create PluginConfiguration using pydantic

This commit is contained in:
Shreya Malviya 2022-08-29 13:28:50 +05:30
parent 554a180fbd
commit 520183f42d
1 changed files with 26 additions and 0 deletions

View File

@ -90,6 +90,32 @@ class PluginConfiguration:
options: Dict
class Pydantic___PluginConfiguration(MutableInfectionMonkeyBaseModel):
"""
A configuration for plugins
Attributes:
:param name: Name of the plugin
Example: "ransomware"
:param options: Any other information/configuration fields relevant to the plugin
Example: {
"encryption": {
"enabled": True,
"directories": {
"linux_target_dir": "~/this_dir",
"windows_target_dir": "C:\that_dir"
},
},
"other_behaviors": {
"readme": True
},
}
"""
name: str
options: Dict
@dataclass(frozen=True)
class ScanTargetConfiguration:
"""