diff --git a/providers/os/resources/port.go b/providers/os/resources/port.go index 5b97638e7c..ad8c486e01 100644 --- a/providers/os/resources/port.go +++ b/providers/os/resources/port.go @@ -508,6 +508,11 @@ func (p *mqlPorts) parseWindowsPorts(r io.Reader, processes map[int64]*mqlProces return nil, err } + portObj := obj.(*mqlPort) + if process == nil { + portObj.Process.State = plugin.StateIsSet | plugin.StateIsNull + } + res = append(res, obj) } return res, nil @@ -596,6 +601,10 @@ func (p *mqlPorts) listMacos() ([]interface{}, error) { log.Error().Err(err).Send() return nil, err } + portObj := obj.(*mqlPort) + if mqlProcess == nil { + portObj.Process.State = plugin.StateIsSet | plugin.StateIsNull + } res = append(res, obj) }