diff --git a/cmd/agent.go b/cmd/agent.go index fe0f211..d5fc647 100644 --- a/cmd/agent.go +++ b/cmd/agent.go @@ -10,6 +10,8 @@ import ( "github.com/coreos/go-systemd/v22/daemon" "github.com/fsnotify/fsnotify" "github.com/google/go-containerregistry/pkg/name" + v1 "github.com/google/go-containerregistry/pkg/v1" + "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/hashicorp/go-hclog" "github.com/hashicorp/go-plugin" "github.com/nats-io/nats.go" @@ -21,6 +23,7 @@ import ( "os/exec" "os/signal" "path" + "runtime" "sync" "syscall" "time" @@ -459,7 +462,10 @@ func (ar *AgentRunner) DownloadPlugins() error { if err != nil { return err } - err = downloaderImpl.Download() + err = downloaderImpl.Download(remote.WithPlatform(v1.Platform{ + Architecture: runtime.GOARCH, + OS: runtime.GOOS, + })) if err != nil { return err } diff --git a/go.mod b/go.mod index 1a00c53..d43e150 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/chris-cmsoft/concom go 1.23.2 require ( - github.com/compliance-framework/gooci v0.0.0-20241121151741-8c713064df64 + github.com/compliance-framework/gooci v0.0.0-20241202153413-08c411c3ce33 github.com/coreos/go-systemd/v22 v22.5.0 github.com/fsnotify/fsnotify v1.7.0 github.com/google/go-containerregistry v0.20.2 @@ -14,7 +14,6 @@ require ( github.com/open-policy-agent/opa v0.69.0 github.com/spf13/cobra v1.8.1 github.com/spf13/viper v1.19.0 - github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.67.0 google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v2 v2.4.0 @@ -26,7 +25,6 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect - github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/cli v27.1.1+incompatible // indirect github.com/docker/distribution v2.8.2+incompatible // indirect github.com/docker/docker-credential-helpers v0.7.0 // indirect @@ -56,7 +54,6 @@ require ( github.com/opencontainers/image-spec v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/common v0.57.0 // indirect diff --git a/go.sum b/go.sum index 1fadcc2..4b0ac8b 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,8 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/compliance-framework/gooci v0.0.0-20241121151741-8c713064df64 h1:DIQC1QqJxzJb/nx/IMb/Lj4U55ziCkyEACnaQS747Hs= -github.com/compliance-framework/gooci v0.0.0-20241121151741-8c713064df64/go.mod h1:UAxtWl/zNG1LxUYUxCbDAvJgJhY5KChnw+xZbXIquAY= +github.com/compliance-framework/gooci v0.0.0-20241202153413-08c411c3ce33 h1:y/vO/R5hiv14gp0PrKHStbmkPQkpZwUpFLL9beFfny0= +github.com/compliance-framework/gooci v0.0.0-20241202153413-08c411c3ce33/go.mod h1:UAxtWl/zNG1LxUYUxCbDAvJgJhY5KChnw+xZbXIquAY= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs=