Skip to content

Commit

Permalink
on SCA always show results with location
Browse files Browse the repository at this point in the history
  • Loading branch information
attiasas committed Nov 8, 2023
1 parent 0986e1f commit 8ffdc21
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion xray/utils/resultwriter.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ func getXrayIssueLocationIfValidExists(tech coreutils.Technology, run *sarif.Run
return
}
if strings.TrimSpace(descriptorPath) == "" {
return
descriptorPath = "Package Descriptor"
} else {
descriptorPath = "file://" + descriptorPath
}
return sarif.NewLocation().WithPhysicalLocation(sarif.NewPhysicalLocation().WithArtifactLocation(sarif.NewArtifactLocation().WithUri("file://" + descriptorPath))), nil
}
Expand Down

0 comments on commit 8ffdc21

Please sign in to comment.