From 4ddfb9dcbb40f305edde4a1acffc825f804e3831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Do=C4=9Fan=20Can=20Bak=C4=B1r?= Date: Tue, 11 Jun 2024 15:56:55 +0300 Subject: [PATCH] fix jira nil deref err --- pkg/reporting/trackers/jira/jira.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/reporting/trackers/jira/jira.go b/pkg/reporting/trackers/jira/jira.go index 0b8f27fc5b..1fd2895f13 100644 --- a/pkg/reporting/trackers/jira/jira.go +++ b/pkg/reporting/trackers/jira/jira.go @@ -16,6 +16,7 @@ import ( "github.com/projectdiscovery/nuclei/v3/pkg/reporting/format" "github.com/projectdiscovery/nuclei/v3/pkg/reporting/trackers/filters" "github.com/projectdiscovery/retryablehttp-go" + "github.com/projectdiscovery/utils/ptr" ) type Formatter struct { @@ -147,13 +148,13 @@ func (i *Integration) CreateNewIssue(event *output.ResultEvent) (*filters.Create nestedValue = strings.TrimPrefix(fmtNestedValue, "$") switch nestedValue { case "CVSSMetrics": - nestedValue = event.Info.Classification.CVSSMetrics + nestedValue = ptr.Safe(event.Info.Classification).CVSSMetrics case "CVEID": - nestedValue = event.Info.Classification.CVEID + nestedValue = ptr.Safe(event.Info.Classification).CVEID case "CWEID": - nestedValue = event.Info.Classification.CWEID + nestedValue = ptr.Safe(event.Info.Classification).CWEID case "CVSSScore": - nestedValue = event.Info.Classification.CVSSScore + nestedValue = ptr.Safe(event.Info.Classification).CVSSScore case "Host": nestedValue = event.Host case "Severity":