@@ -57,22 +57,26 @@ def create_azure_trm_info_cards(azure_trm_techniques):
57
57
# Get technique information from technique registry
58
58
technique = TechniqueRegistry .get_technique (technique_id )()
59
59
technique_category = TechniqueRegistry .get_technique_category (technique_id )
60
-
60
+
61
61
# Main technique information card
62
62
main_info_card = dbc .Card ([
63
63
dbc .CardHeader (html .H4 (f"Technique: { technique .name } " , className = "mb-0" )),
64
64
65
65
dbc .CardBody ([
66
66
html .H5 (f"Attack Surface: { technique_category } " , className = "mb-3" ),
67
67
html .H5 ("Technique Description:" , className = "mb-2" ),
68
- html .P (technique .description , className = "mb-3" ),
69
- html .H5 ("MITRE ATT&CK Reference:" , className = "mb-2" ),
70
- create_mitre_info_cards (technique .mitre_techniques )
68
+ html .P (technique .description , className = "mb-3" )
71
69
])
72
70
], className = "mb-3" )
73
71
74
72
modal_content = [main_info_card ]
75
73
74
+ modal_content .append (
75
+ dbc .Accordion ([
76
+ dbc .AccordionItem (create_mitre_info_cards (technique .mitre_techniques ), title = "MITRE ATT&CK Reference" )
77
+ ], start_collapsed = False , className = "mb-3" )
78
+ )
79
+
76
80
# Display Azure threat research matrix info - only for Azure techniques
77
81
if technique_category == "azure" :
78
82
if technique .azure_trm_techniques :
@@ -81,24 +85,28 @@ def create_azure_trm_info_cards(azure_trm_techniques):
81
85
dbc .AccordionItem (create_azure_trm_info_cards (technique .azure_trm_techniques ), title = "Azure Threat Research Matrix Reference" )
82
86
], start_collapsed = True , className = "mb-3" )
83
87
)
88
+
89
+ # Technique notes
90
+ if technique .notes :
91
+ modal_content .append (
92
+ dbc .Accordion ([
93
+ dbc .AccordionItem (
94
+ [html .Li (note .note ) for note in technique .notes ],
95
+ title = "Technique Notes"
96
+ )
97
+ ], start_collapsed = True , className = "mb-3" )
98
+ )
99
+
84
100
# Technique references
85
101
if technique .references :
86
102
modal_content .append (
87
103
dbc .Accordion ([
88
104
dbc .AccordionItem (
89
- [dcc .Link ("Visit Ref" , href = ref if ref not in [None , "#" ] else "#" , target = "_blank" , className = "card-link" ) for ref in technique .references ],
105
+ [html . Li ( dcc .Link (ref . title , href = ref . link if ref . link not in [None , "#" ] else "#" , target = "_blank" , className = "card-link" ) ) for ref in technique .references ],
90
106
title = "Technique References"
91
107
)
92
108
], start_collapsed = True , className = "mb-3" )
93
109
)
94
-
95
- # Technique notes
96
- if technique .notes :
97
- modal_content .append (
98
- dbc .Accordion ([
99
- dbc .AccordionItem (technique .notes , title = "Technique Notes" )
100
- ], start_collapsed = True , className = "mb-3" )
101
- )
102
110
103
111
# Return final modal body content
104
112
return modal_content
0 commit comments