From 9f1faa0a29a64904ecc3b0f4752e5e85ed86f734 Mon Sep 17 00:00:00 2001 From: Dogan Can Bakir <65292895+dogancanbakir@users.noreply.github.com> Date: Sun, 16 Jun 2024 01:00:21 +0300 Subject: [PATCH] fix jira nil deref err (#5283) --- 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":