Skip to content

Commit f82bed7

Browse files
committed
multiple metadata
1 parent 1d13c3d commit f82bed7

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

contentctl/output/attack_nav_output.py

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,21 @@ def writeObjects(
120120
"techniqueID": tid,
121121
"score": data["score"],
122122
"metadata": [
123+
{"name": "Detection", "value": name, "divider": False}
124+
for name in data["file_paths"]
125+
]
126+
+ [
123127
{
124-
"name": "Detections",
125-
"value": "\n".join(
126-
[f"• {name}" for name in data["file_paths"]]
127-
),
128-
},
129-
{"divider": True},
130-
{
131-
"name": "Links",
132-
"value": "\n".join(
133-
[
134-
f"• [{link['label']}]({link['url']})"
135-
for link in data["links"]
136-
]
137-
),
138-
},
128+
"name": "Link",
129+
"value": f"[View Detection]({link['url']})",
130+
"divider": False,
131+
}
132+
for link in data["links"]
133+
],
134+
"links": [
135+
{"label": link["label"], "url": link["url"]}
136+
for link in data["links"]
139137
],
140-
"links": data["links"],
141138
}
142139
for tid, data in techniques.items()
143140
],

0 commit comments

Comments
 (0)