From 7dc87ad6a82428e50d9e88f170d0e97d0c2b4c84 Mon Sep 17 00:00:00 2001 From: quobix Date: Tue, 19 Nov 2024 17:14:40 +0000 Subject: [PATCH] Addressed issue #583 A double dot (deep search) will cause gaps in a spectral path property, this has been fixed. This is still not a full complete fix, because the JSON path for results is calculated by the doctor, and this looks like a straight passthrough from the rule, which needs further investigation. --- model/results.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/results.go b/model/results.go index 43f824c2..30bd92d2 100644 --- a/model/results.go +++ b/model/results.go @@ -110,6 +110,9 @@ func (rr *RuleResultSet) GenerateSpectralReport(source string) []reports.Spectra var path []string pathArr := strings.Split(result.Path, ".") for _, pItem := range pathArr { + if pItem == "" { + path = append(path, "..") // https://github.com/daveshanley/vacuum/issues/583 + } if pItem != "$" { p := paramRegex.FindStringSubmatch(pItem)