diff --git a/external-import/malpedia/README.md b/external-import/malpedia/README.md index cd24220b5f..c7661e94f3 100644 --- a/external-import/malpedia/README.md +++ b/external-import/malpedia/README.md @@ -73,5 +73,8 @@ If you are authenticated, then all entities created by the connector will be in If you are not authenticated, by leaving this variable (auth_key) undefined or only public in the form of an empty string (""), all entities created by the connector will be in TLP:WHITE. This connector can therefore be used without an account. +However, it is possible to use "default_marking" as an environment variable to customize your default marking. +Markings availables : "TLP:CLEAR", ""TLP:GREEN", "TLP:AMBER", "TLP:RED". + If you choose to set environment variables such as import_intrusion_sets, import_yara, create_indicators, create_observables to false, the connector will simply skip the bundle creation steps for the selected category. diff --git a/external-import/malpedia/src/malpedia_connector/malpedia.py b/external-import/malpedia/src/malpedia_connector/malpedia.py index 1891f43884..d338cbda83 100644 --- a/external-import/malpedia/src/malpedia_connector/malpedia.py +++ b/external-import/malpedia/src/malpedia_connector/malpedia.py @@ -45,7 +45,7 @@ def __init__(self) -> None: "TLP:AMBER": stix2.TLP_AMBER, "TLP:RED": stix2.TLP_RED, } - self.default_marking = self.config.load["malpedia"].get("default_marking", None) + self.default_marking = getattr(self.config, "default_marking", None) if self.default_marking is not None: default_marking_normalized = self.default_marking.strip().upper()