Skip to content

Commit

Permalink
fix build script
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Sverdlov <[email protected]>
  • Loading branch information
sverdlov93 committed Sep 12, 2023
1 parent 0c7bcb8 commit e11ce18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions xray/utils/resultstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func prepareSecrets(secrets []*sarif.Run, isTable bool) []formats.SourceCodeRow
Finding: GetResultMsgText(secretResult),
SeverityNumValue: currSeverity.numValue,
Location: formats.Location{
File: getRelativeLocationFileName(location, secretRun.Invocations),
File: GetRelativeLocationFileName(location, secretRun.Invocations),
StartLine: GetLocationStartLine(location),
StartColumn: GetLocationStartColumn(location),
EndLine: GetLocationEndLine(location),
Expand Down Expand Up @@ -364,7 +364,7 @@ func prepareIacs(iacs []*sarif.Run, isTable bool) []formats.SourceCodeRow {
ScannerDescription: scannerDescription,
SeverityNumValue: currSeverity.numValue,
Location: formats.Location{
File: getRelativeLocationFileName(location, iacRun.Invocations),
File: GetRelativeLocationFileName(location, iacRun.Invocations),
StartLine: GetLocationStartLine(location),
StartColumn: GetLocationStartColumn(location),
EndLine: GetLocationEndLine(location),
Expand Down Expand Up @@ -418,7 +418,7 @@ func prepareSast(sasts []*sarif.Run, isTable bool) []formats.SourceCodeRow {
ScannerDescription: scannerDescription,
SeverityNumValue: currSeverity.numValue,
Location: formats.Location{
File: getRelativeLocationFileName(location, sastRun.Invocations),
File: GetRelativeLocationFileName(location, sastRun.Invocations),
StartLine: GetLocationStartLine(location),
StartColumn: GetLocationStartColumn(location),
EndLine: GetLocationEndLine(location),
Expand Down Expand Up @@ -450,7 +450,7 @@ func codeFlowToLocationFlow(flows []*sarif.CodeFlow, invocations []*sarif.Invoca
rowFlow := []formats.Location{}
for _, stackTraceEntry := range stackTrace.Locations {
rowFlow = append(rowFlow, formats.Location{
File: getRelativeLocationFileName(stackTraceEntry.Location, invocations),
File: GetRelativeLocationFileName(stackTraceEntry.Location, invocations),
StartLine: GetLocationStartLine(stackTraceEntry.Location),
StartColumn: GetLocationStartColumn(stackTraceEntry.Location),
EndLine: GetLocationEndLine(stackTraceEntry.Location),
Expand Down Expand Up @@ -980,7 +980,7 @@ func getCveApplicability(cve formats.CveRow, applicabilityScanResults []*sarif.R
for _, location := range foundResult.Locations {
applicability.Evidence = append(applicability.Evidence, formats.Evidence{
Location: formats.Location{
File: getRelativeLocationFileName(location, applicabilityRun.Invocations),
File: GetRelativeLocationFileName(location, applicabilityRun.Invocations),
StartLine: GetLocationStartLine(location),
StartColumn: GetLocationStartColumn(location),
EndLine: GetLocationEndLine(location),
Expand Down
2 changes: 1 addition & 1 deletion xray/utils/sarifutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func GetLocationFileName(location *sarif.Location) string {
return ""
}

func getRelativeLocationFileName(location *sarif.Location, invocations []*sarif.Invocation) string {
func GetRelativeLocationFileName(location *sarif.Location, invocations []*sarif.Invocation) string {
wd := ""
if len(invocations) > 0 {
wd = GetInvocationWorkingDirectory(invocations[0])
Expand Down

0 comments on commit e11ce18

Please sign in to comment.