diff --git a/attestation/commandrun/tracing_linux.go b/attestation/commandrun/tracing_linux.go index 90eb9c24..bebf8032 100644 --- a/attestation/commandrun/tracing_linux.go +++ b/attestation/commandrun/tracing_linux.go @@ -42,7 +42,7 @@ type ptraceContext struct { processes map[int]*ProcessInfo exitCode int hash []cryptoutil.DigestValue - environmentBlockList map[string]struct{} + sensitiveEnvList map[string]struct{} } func enableTracing(c *exec.Cmd) { @@ -57,7 +57,7 @@ func (r *CommandRun) trace(c *exec.Cmd, actx *attestation.AttestationContext) ([ mainProgram: c.Path, processes: make(map[int]*ProcessInfo), hash: actx.Hashes(), - environmentBlockList: r.environmentBlockList, + sensitiveEnvList: r.sensitiveEnvList, } if err := pctx.runTrace(); err != nil { @@ -201,7 +201,7 @@ func (p *ptraceContext) handleSyscall(pid int, regs unix.PtraceRegs) error { if err == nil { allVars := strings.Split(string(environ), "\x00") filteredEnviron := make([]string, 0) - environment.FilterEnvironmentArray(allVars, p.environmentBlockList, func(_, _, varStr string) { + environment.FilterEnvironmentArray(allVars, p.sensitiveVarsList, map[string]struct{}{}, func(_, _, varStr string) { filteredEnviron = append(filteredEnviron, varStr) })