Skip to content

Commit

Permalink
[Malpedia] Fix default_marking recovery error and update readme (Open…
Browse files Browse the repository at this point in the history
  • Loading branch information
Megafredo authored Aug 19, 2024
1 parent 441991f commit dd5f101
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions external-import/malpedia/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit dd5f101

Please sign in to comment.