3232from pycti .entities .opencti_attack_pattern import AttackPattern
3333from pycti .entities .opencti_course_of_action import CourseOfAction
3434from pycti .entities .opencti_report import Report
35+ from pycti .entities .opencti_note import Note
36+ from pycti .entities .opencti_opinion import Opinion
3537from pycti .entities .opencti_indicator import Indicator
3638
3739urllib3 .disable_warnings (urllib3 .exceptions .InsecureRequestWarning )
@@ -98,6 +100,8 @@ def __init__(self, url, token, log_level="info", ssl_verify=False):
98100 self .attack_pattern = AttackPattern (self )
99101 self .course_of_action = CourseOfAction (self )
100102 self .report = Report (self )
103+ self .note = Note (self )
104+ self .opinion = Opinion (self )
101105 self .indicator = Indicator (self )
102106
103107 # Check if openCTI is available
@@ -483,6 +487,7 @@ def resolve_role(self, relation_type, from_type, to_type):
483487 "country" : {"from_role" : "source" , "to_role" : "target" },
484488 "city" : {"from_role" : "source" , "to_role" : "target" },
485489 "organization" : {"from_role" : "source" , "to_role" : "target" },
490+ "user" : {"from_role" : "source" , "to_role" : "target" },
486491 "vulnerability" : {"from_role" : "source" , "to_role" : "target" },
487492 },
488493 "intrusion-set" : {
@@ -492,6 +497,7 @@ def resolve_role(self, relation_type, from_type, to_type):
492497 "country" : {"from_role" : "source" , "to_role" : "target" },
493498 "city" : {"from_role" : "source" , "to_role" : "target" },
494499 "organization" : {"from_role" : "source" , "to_role" : "target" },
500+ "user" : {"from_role" : "source" , "to_role" : "target" },
495501 "vulnerability" : {"from_role" : "source" , "to_role" : "target" },
496502 },
497503 "campaign" : {
@@ -501,6 +507,7 @@ def resolve_role(self, relation_type, from_type, to_type):
501507 "country" : {"from_role" : "source" , "to_role" : "target" },
502508 "city" : {"from_role" : "source" , "to_role" : "target" },
503509 "organization" : {"from_role" : "source" , "to_role" : "target" },
510+ "user" : {"from_role" : "source" , "to_role" : "target" },
504511 "vulnerability" : {"from_role" : "source" , "to_role" : "target" },
505512 },
506513 "incident" : {
@@ -510,6 +517,7 @@ def resolve_role(self, relation_type, from_type, to_type):
510517 "country" : {"from_role" : "source" , "to_role" : "target" },
511518 "city" : {"from_role" : "source" , "to_role" : "target" },
512519 "organization" : {"from_role" : "source" , "to_role" : "target" },
520+ "user" : {"from_role" : "source" , "to_role" : "target" },
513521 "vulnerability" : {"from_role" : "source" , "to_role" : "target" },
514522 },
515523 "malware" : {
@@ -519,6 +527,7 @@ def resolve_role(self, relation_type, from_type, to_type):
519527 "country" : {"from_role" : "source" , "to_role" : "target" },
520528 "city" : {"from_role" : "source" , "to_role" : "target" },
521529 "organization" : {"from_role" : "source" , "to_role" : "target" },
530+ "user" : {"from_role" : "source" , "to_role" : "target" },
522531 "vulnerability" : {"from_role" : "source" , "to_role" : "target" },
523532 },
524533 "attack-pattern" : {
@@ -529,6 +538,7 @@ def resolve_role(self, relation_type, from_type, to_type):
529538 "threat-actor" : {
530539 "identity" : {"from_role" : "attribution" , "to_role" : "origin" },
531540 "organization" : {"from_role" : "attribution" , "to_role" : "origin" },
541+ "user" : {"from_role" : "attribution" , "to_role" : "origin" },
532542 },
533543 "intrusion-set" : {
534544 "identity" : {"from_role" : "attribution" , "to_role" : "origin" },
0 commit comments