mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
Filter out "null" string in installed_path from osquery (#11931)
This commit is contained in:
parent
e500a4f65d
commit
9f7383b9ff
1 changed files with 4 additions and 1 deletions
|
|
@ -1172,7 +1172,10 @@ func directIngestSoftware(ctx context.Context, logger log.Logger, host *fleet.Ho
|
|||
software = append(software, s)
|
||||
|
||||
installedPath := strings.TrimSpace(row["installed_path"])
|
||||
if installedPath != "" {
|
||||
if installedPath != "" &&
|
||||
// NOTE: osquery is sometimes incorrectly returning the value "null" for some install paths.
|
||||
// Thus, we explicitly ignore such value here.
|
||||
strings.ToLower(installedPath) != "null" {
|
||||
key := fmt.Sprintf("%s%s%s", installedPath, fleet.SoftwareFieldSeparator, s.ToUniqueStr())
|
||||
sPaths[key] = struct{}{}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue