From 1c720f2409abee0668bc7b921f70b7c094f1252f Mon Sep 17 00:00:00 2001 From: Matthias Glastra Date: Mon, 14 Oct 2024 11:38:23 +0200 Subject: [PATCH] Fix lint errors Signed-off-by: Matthias Glastra --- attestation/commandrun/commandrun.go | 1 - attestation/commandrun/tracing_linux.go | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/attestation/commandrun/commandrun.go b/attestation/commandrun/commandrun.go index e04767e7..007d4e6e 100644 --- a/attestation/commandrun/commandrun.go +++ b/attestation/commandrun/commandrun.go @@ -21,7 +21,6 @@ import ( "os/exec" "github.com/in-toto/go-witness/attestation" - "github.com/in-toto/go-witness/environment" "github.com/in-toto/go-witness/cryptoutil" "github.com/invopop/jsonschema" ) diff --git a/attestation/commandrun/tracing_linux.go b/attestation/commandrun/tracing_linux.go index d214b35d..40fb3180 100644 --- a/attestation/commandrun/tracing_linux.go +++ b/attestation/commandrun/tracing_linux.go @@ -26,7 +26,7 @@ import ( "strings" "github.com/in-toto/go-witness/attestation" - "github.com/in-toto/go-witness/attestation/environment" + "github.com/in-toto/go-witness/environment" "github.com/in-toto/go-witness/cryptoutil" "github.com/in-toto/go-witness/log" "golang.org/x/sys/unix" @@ -37,11 +37,11 @@ const ( ) type ptraceContext struct { - parentPid int - mainProgram string - processes map[int]*ProcessInfo - exitCode int - hash []cryptoutil.DigestValue + parentPid int + mainProgram string + processes map[int]*ProcessInfo + exitCode int + hash []cryptoutil.DigestValue environmentCapturer *environment.Capture } @@ -53,10 +53,10 @@ func enableTracing(c *exec.Cmd) { func (r *CommandRun) trace(c *exec.Cmd, actx *attestation.AttestationContext) ([]ProcessInfo, error) { pctx := &ptraceContext{ - parentPid: c.Process.Pid, - mainProgram: c.Path, - processes: make(map[int]*ProcessInfo), - hash: actx.Hashes(), + parentPid: c.Process.Pid, + mainProgram: c.Path, + processes: make(map[int]*ProcessInfo), + hash: actx.Hashes(), environmentCapturer: actx.EnvironmentCapturer(), }