From bf1ad2656a0d60ccb9a9e8917ec0e11b0fa95b4d Mon Sep 17 00:00:00 2001 From: Spyros Date: Tue, 12 Apr 2022 19:53:05 +0100 Subject: [PATCH] make zap alerts have the correct link type (#200) --- .../utils/external_project_parsers/zap_alerts_parser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/utils/external_project_parsers/zap_alerts_parser.py b/application/utils/external_project_parsers/zap_alerts_parser.py index cf50d7b89..94c6d0401 100644 --- a/application/utils/external_project_parsers/zap_alerts_parser.py +++ b/application/utils/external_project_parsers/zap_alerts_parser.py @@ -103,7 +103,9 @@ def register_alerts(cache: db.Node_collection, repo: git.git, alerts_path: str): if nl.document.doctype == defs.Credoctypes.CRE ]: cache.add_link( - cre=db.dbCREfromCRE(cre.document), node=dbnode + cre=db.dbCREfromCRE(cre.document), + node=dbnode, + type=defs.LinkTypes.LinkedTo, ) else: logger.error( @@ -118,7 +120,9 @@ def register_alerts(cache: db.Node_collection, repo: git.git, alerts_path: str): if link.document.doctype == defs.Credoctypes.CRE: cache.add_link( - cre=db.dbCREfromCRE(link.document), node=dbnode + cre=db.dbCREfromCRE(link.document), + node=dbnode, + type=defs.LinkTypes.LinkedTo, ) else: logger.info(f"CWE id not found in alert {externalId}, skipping linking")