Skip to content

Commit 4e6a16e

Browse files
replaced incorrect variable
1 parent 7030fa7 commit 4e6a16e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/reporting/sarif.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ func messageText(ruleName string, filePath string) string {
7676
trimmed := strings.TrimPrefix(finalPath, "git show ")
7777
parts := strings.Split(trimmed, ":")
7878
if len(parts) == 2 {
79-
return parts[1]
79+
finalPath = strings.ReplaceAll(parts[1], "/", "\\")
8080
}
8181
}
8282

83-
return fmt.Sprintf("%s has detected secret for file %s.", ruleName, filePath)
83+
return fmt.Sprintf("%s has detected secret for file %s.", ruleName, finalPath)
8484
}
8585

8686
func getResults(report Report) []Results {

0 commit comments

Comments
 (0)