Skip to content

Commit

Permalink
fix: [FediVuln-Publish] Directly return the updated status before try…
Browse files Browse the repository at this point in the history
…ing an other source of vulnerabilities. This prevents to override the content generated in prvious try block.
  • Loading branch information
cedricbonhomme committed Dec 16, 2024
1 parent 23cdc05 commit c2cc7de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fedivuln/publish.py
Original file line number Diff line number Diff line change
@@ -35,13 +35,15 @@ def create_status_content(event_data: str, topic: str) -> str:
"<LINK>",
f"https://vulnerability.circl.lu/vuln/{event_dict['cveMetadata']['cveId']}",
)
return status
except Exception:
pass
try: # GHSA, PySec
status = status.replace("<VULNID>", event_dict["id"])
status = status.replace(
"<LINK>", f"https://vulnerability.circl.lu/vuln/{event_dict['id']}"
)
return status
except Exception:
pass
try: # CSAF
@@ -52,6 +54,7 @@ def create_status_content(event_data: str, topic: str) -> str:
"<LINK>",
f"https://vulnerability.circl.lu/vuln/{event_dict['document']['tracking']['id']}",
)
return status
except Exception:
return ""
case "comment":

0 comments on commit c2cc7de

Please sign in to comment.