Skip to content

Commit 6c2389a

Browse files
committed
fix: Returned exploit name and deleted unknown exploits from TIX
1 parent d5d6599 commit 6c2389a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/utils/vex/generate_statements/generate_tix_statement.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ async def generate_tix_statement(
4343
statement["reachable_code"].append(reacheable_code)
4444
for exploit in vulnerability.get("exploits", []):
4545
_exploit = {}
46+
_exploit["name"] = exploit.get("id", "Unknown")
4647
_exploit["@id"] = exploit.get("href", "Unknown")
4748
_exploit["attack_vector"] = exploit.get("cvss", {}).get("vector", "NONE")
4849
_exploit["description"] = "" if exploit.get("type") == "githubexploit" else exploit.get("description", "")
@@ -52,6 +53,7 @@ async def generate_tix_statement(
5253
else:
5354
if "sourceData" in exploit:
5455
_exploit["payload"] = exploit.get("sourceData", "")
55-
statement["exploits"].append(_exploit)
56+
if _exploit["@id"] != "Unknown":
57+
statement["exploits"].append(_exploit)
5658
priority, status, justification, impact_statement = await generate_vex_properties(vulnerability, statement, is_imported_any)
5759
return priority, status, justification, impact_statement, statement

0 commit comments

Comments
 (0)