Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit e4a66b0

Browse files
committed
[client] Adapt to TLP v2
1 parent ec09ada commit e4a66b0

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

pycti/connector/opencti_connector_helper.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,22 @@ def check_max_tlp(tlp: str, max_tlp: str) -> bool:
10591059
"""
10601060

10611061
allowed_tlps: Dict[str, List[str]] = {
1062-
"TLP:RED": ["TLP:WHITE", "TLP:GREEN", "TLP:AMBER", "TLP:RED"],
1063-
"TLP:AMBER": ["TLP:WHITE", "TLP:GREEN", "TLP:AMBER"],
1064-
"TLP:GREEN": ["TLP:WHITE", "TLP:GREEN"],
1065-
"TLP:WHITE": ["TLP:WHITE"],
1062+
"TLP:RED": [
1063+
"TLP:CLEAR",
1064+
"TLP:GREEN",
1065+
"TLP:AMBER",
1066+
"TLP:AMBER+STRICT",
1067+
"TLP:RED",
1068+
],
1069+
"TLP:AMBER+STRICT": [
1070+
"TLP:CLEAR",
1071+
"TLP:GREEN",
1072+
"TLP:AMBER",
1073+
"TLP:AMBER+STRICT",
1074+
],
1075+
"TLP:AMBER": ["TLP:CLEAR", "TLP:GREEN", "TLP:AMBER"],
1076+
"TLP:GREEN": ["TLP:CLEAR", "TLP:GREEN"],
1077+
"TLP:CLEAR": ["TLP:CLEAR"],
10661078
}
10671079

10681080
return tlp in allowed_tlps[max_tlp]

pycti/utils/opencti_stix2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def extract_embedded_relationships(
523523
self.opencti.marking_definition.read(
524524
filters=[
525525
{"key": "definition_type", "values": ["TLP"]},
526-
{"key": "definition", "values": ["TLP:WHITE"]},
526+
{"key": "definition", "values": ["TLP:CLEAR"]},
527527
]
528528
)
529529
)

0 commit comments

Comments
 (0)