Skip to content

Commit

Permalink
fix jira nil deref err (#5283)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Jun 15, 2024
1 parent 8b3379a commit 9f1faa0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/reporting/trackers/jira/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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":
Expand Down

0 comments on commit 9f1faa0

Please sign in to comment.