diff --git a/attestation/commandrun/tracing_linux.go b/attestation/commandrun/tracing_linux.go index 40fb3180..7a1d6837 100644 --- a/attestation/commandrun/tracing_linux.go +++ b/attestation/commandrun/tracing_linux.go @@ -200,9 +200,14 @@ func (p *ptraceContext) handleSyscall(pid int, regs unix.PtraceRegs) error { environ, err := os.ReadFile(envinLocation) if err == nil { allVars := strings.Split(string(environ), "\x00") - filteredEnviron := p.environmentCapturer.Capture(allVars) - procInfo.Environ = strings.Join(filteredEnviron, " ") + env := make([]string, 0) + var capturedEnv map[string]string = p.environmentCapturer.Capture(allVars) + for k, v := range capturedEnv { + env = append(env, fmt.Sprintf("%s=%s", k, v)) + } + + procInfo.Environ = strings.Join(env, " ") } cmdline, err := os.ReadFile(cmdlineLocation) diff --git a/attestation/environment/environment.go b/attestation/environment/environment.go index ec954162..65974ffd 100644 --- a/attestation/environment/environment.go +++ b/attestation/environment/environment.go @@ -34,8 +34,8 @@ const ( var ( _ attestation.Attestor = &Attestor{} _ EnvironmentAttestor = &Attestor{} - defaultFilterSensitiveVarsEnabled = false - defaultDisableSensitiveVarsDefault = false + // defaultFilterSensitiveVarsEnabled = false + // defaultDisableSensitiveVarsDefault = false ) type EnvironmentAttestor interface {