From 33592fc58c5f76459bbccea6d1517ea74bcc6e26 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Tue, 15 Oct 2024 08:29:04 +0200 Subject: [PATCH 1/3] :tada: ADD ELSA errata --- dojo/settings/.settings.dist.py.sha256sum | 2 +- dojo/settings/settings.dist.py | 1 + dojo/templatetags/display_tags.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dojo/settings/.settings.dist.py.sha256sum b/dojo/settings/.settings.dist.py.sha256sum index b26b379a22c..1dc3bd3b382 100644 --- a/dojo/settings/.settings.dist.py.sha256sum +++ b/dojo/settings/.settings.dist.py.sha256sum @@ -1 +1 @@ -4d3e91f176b73278750dc2f46d27cd4fe2b47d24682ad06d6267880bbdec599c +4d3e91f176b73278750dc2f46d27cd4fe2b47d24682ad06d6267880bbdec599c \ No newline at end of file diff --git a/dojo/settings/settings.dist.py b/dojo/settings/settings.dist.py index 39e033010db..1493afadd9d 100644 --- a/dojo/settings/settings.dist.py +++ b/dojo/settings/settings.dist.py @@ -1735,6 +1735,7 @@ def saml2_attrib_map_format(dict): "ALSA": "https://osv.dev/vulnerability/", # e.g. https://osv.dev/vulnerability/ALSA-2024:0827 "USN": "https://ubuntu.com/security/notices/", # e.g. https://ubuntu.com/security/notices/USN-6642-1 "DLA": "https://security-tracker.debian.org/tracker/", # e.g. https://security-tracker.debian.org/tracker/DLA-3917-1 + "ELSA": "https://linux.oracle.com/errata/&&.html", # e.g. https://linux.oracle.com/errata/ELSA-2024-12714.html } # List of acceptable file types that can be uploaded to a given object via arbitrary file upload FILE_UPLOAD_TYPES = env("DD_FILE_UPLOAD_TYPES") diff --git a/dojo/templatetags/display_tags.py b/dojo/templatetags/display_tags.py index e00603f9eec..a3bfc81be7d 100644 --- a/dojo/templatetags/display_tags.py +++ b/dojo/templatetags/display_tags.py @@ -780,7 +780,10 @@ def vulnerability_url(vulnerability_id): for key in settings.VULNERABILITY_URLS: if vulnerability_id.upper().startswith(key): - return settings.VULNERABILITY_URLS[key] + str(vulnerability_id) + if "&&" in settings.VULNERABILITY_URLS[key]: + return settings.VULNERABILITY_URLS[key].split("&&")[0] + str(vulnerability_id) + settings.VULNERABILITY_URLS[key].split("&&")[1] + else: + return settings.VULNERABILITY_URLS[key] + str(vulnerability_id) return "" From e23a417419aa2d258134708be7f099d044b83961 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Tue, 15 Oct 2024 08:32:10 +0200 Subject: [PATCH 2/3] ruff --- dojo/templatetags/display_tags.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dojo/templatetags/display_tags.py b/dojo/templatetags/display_tags.py index a3bfc81be7d..7b634febf63 100644 --- a/dojo/templatetags/display_tags.py +++ b/dojo/templatetags/display_tags.py @@ -782,8 +782,7 @@ def vulnerability_url(vulnerability_id): if vulnerability_id.upper().startswith(key): if "&&" in settings.VULNERABILITY_URLS[key]: return settings.VULNERABILITY_URLS[key].split("&&")[0] + str(vulnerability_id) + settings.VULNERABILITY_URLS[key].split("&&")[1] - else: - return settings.VULNERABILITY_URLS[key] + str(vulnerability_id) + return settings.VULNERABILITY_URLS[key] + str(vulnerability_id) return "" From 9c409f308b2e04a1f827e7ec389a92d104daa6c9 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Tue, 15 Oct 2024 18:27:07 +0200 Subject: [PATCH 3/3] rebase --- dojo/settings/.settings.dist.py.sha256sum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dojo/settings/.settings.dist.py.sha256sum b/dojo/settings/.settings.dist.py.sha256sum index 1dc3bd3b382..476d3116d4e 100644 --- a/dojo/settings/.settings.dist.py.sha256sum +++ b/dojo/settings/.settings.dist.py.sha256sum @@ -1 +1 @@ -4d3e91f176b73278750dc2f46d27cd4fe2b47d24682ad06d6267880bbdec599c \ No newline at end of file +42026ac47884ee26fe742e59fb7dc621b5f927ee6ee3c92daf09b97f2a740163