Skip to content

Commit

Permalink
Add env vars to Kolide processes in checkup (#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaMahany authored Feb 22, 2024
1 parent c44976d commit ad136a8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ee/debug/checkups/processes.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ func (c *Processes) Run(ctx context.Context, fullWriter io.Writer) error {
exe, _ := p.Exe()
if strings.Contains(strings.ToLower(exe), "kolide") {
c.kolideCount += 1

// Grab ENV vars if available -- we ignore the error because we expect
// this function to return `ErrNotImplementedError` on darwin
if envVars, err := p.EnvironWithContext(ctx); err == nil {
pMap["env"] = strings.Join(envVars, " ")
}

c.data[fmt.Sprintf("%d", p.Pid)] = pMap

if !c.kolideRunningAsRoot {
Expand Down

0 comments on commit ad136a8

Please sign in to comment.