diff --git a/app/files/scripts/misp2stix.py b/app/files/scripts/misp2stix.py index c5f87e286..fc10b476d 100644 --- a/app/files/scripts/misp2stix.py +++ b/app/files/scripts/misp2stix.py @@ -214,9 +214,10 @@ def handleNonIndicatorAttribute(incident, ttps, attribute): addJournalEntry(incident, entry_line) elif attribute["type"] == "target-machine": aa = AffectedAsset() - aa.description = attribute["value"] if attribute["comment"] != "": - aa.description += " " + attribute["comment"] + aa.description = attribute["value"] + " " + attribute["comment"] + else + aa.description = attribute["value"] incident.affected_assets.append(aa) elif attribute["type"] == "vulnerability": generateTTP(incident, attribute) @@ -260,9 +261,10 @@ def generateThreatActor(attribute): ta = ThreatActor() ta.id_= namespace[1] + ":threatactor-" + attribute["uuid"] ta.title = "MISP Attribute #" + attribute["id"] + " uuid: " + attribute["uuid"] - ta.description = attribute["value"] if attribute["comment"] != "": - ta.description += " " + attribute["comment"] + ta.description = attribute["value"] + " " + attribute["comment"] + else + ta.description = attribute["value"] return ta # generate the indicator and add the relevant information