From ee6209be3df1403f6848ad28432627984feced52 Mon Sep 17 00:00:00 2001 From: Shubharanshu Mahapatra Date: Thu, 22 Aug 2024 15:02:28 -0700 Subject: [PATCH] feat: support pass cred store Signed-off-by: Shubharanshu Mahapatra --- cmd/finch/main_native.go | 1 + cmd/finch/main_remote.go | 1 + cmd/finch/main_test.go | 2 +- cmd/finch/pass_init_native.go | 25 +++++++++++ cmd/finch/pass_init_remote.go | 21 +++++++++ cmd/finch/platform.go | 22 ++++++++++ cmd/finch/platform_init.go | 50 +++++++++++++++++++++ cmd/finch/platform_pass_delete.go | 47 ++++++++++++++++++++ cmd/finch/platform_pass_delete_native.go | 30 +++++++++++++ cmd/finch/platform_pass_delete_remote.go | 20 +++++++++ e2e/vm/platform_pass_test.go | 22 ++++++++++ e2e/vm/vm_darwin_test.go | 1 + e2e/vm/vm_windows_test.go | 1 + go.mod | 15 ++++--- go.sum | 55 +++++++++++++++++++++--- 15 files changed, 300 insertions(+), 13 deletions(-) create mode 100644 cmd/finch/pass_init_native.go create mode 100644 cmd/finch/pass_init_remote.go create mode 100644 cmd/finch/platform.go create mode 100644 cmd/finch/platform_init.go create mode 100644 cmd/finch/platform_pass_delete.go create mode 100644 cmd/finch/platform_pass_delete_native.go create mode 100644 cmd/finch/platform_pass_delete_remote.go create mode 100644 e2e/vm/platform_pass_test.go diff --git a/cmd/finch/main_native.go b/cmd/finch/main_native.go index d83052abb..53a279283 100644 --- a/cmd/finch/main_native.go +++ b/cmd/finch/main_native.go @@ -77,6 +77,7 @@ var newApp = func( newVersionCommand(ncc, logger, stdOut), newSupportBundleCommand(logger, supportBundleBuilder, ncc), newGenDocsCommand(rootCmd, logger, fs, system.NewStdLib()), + newPlatformCommand(ncc, logger), ) rootCmd.AddCommand(allCommands...) diff --git a/cmd/finch/main_remote.go b/cmd/finch/main_remote.go index 259806a92..09af82945 100644 --- a/cmd/finch/main_remote.go +++ b/cmd/finch/main_remote.go @@ -78,6 +78,7 @@ var newApp = func( virtualMachineCommands(logger, fp, ncc, ecc, fs, fc, home, finchRootPath), newSupportBundleCommand(logger, supportBundleBuilder, ncc), newGenDocsCommand(rootCmd, logger, fs, system.NewStdLib()), + newPlatformCommand(ncc, logger), ) rootCmd.AddCommand(allCommands...) diff --git a/cmd/finch/main_test.go b/cmd/finch/main_test.go index 9e693c041..c1bab3999 100644 --- a/cmd/finch/main_test.go +++ b/cmd/finch/main_test.go @@ -204,7 +204,7 @@ func TestNewApp(t *testing.T) { assert.Equal(t, cmd.SilenceUsage, true) assert.Equal(t, cmd.SilenceErrors, true) // confirm the number of command, comprised of nerdctl commands + finch commands - assert.Equal(t, len(cmd.Commands()), len(nerdctlCmds)+4) + assert.Equal(t, len(cmd.Commands()), len(nerdctlCmds)+5) // PersistentPreRunE should set logger level to debug if the debug flag exists. mockCmd := &cobra.Command{} diff --git a/cmd/finch/pass_init_native.go b/cmd/finch/pass_init_native.go new file mode 100644 index 000000000..feeefda08 --- /dev/null +++ b/cmd/finch/pass_init_native.go @@ -0,0 +1,25 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package main + +import ( + "github.com/gopasspw/gopass/pkg/pwgen" + "github.com/runfinch/finch/pkg/command" +) + +func (pia *passInitAction) initGpgKey() command.Command { + passphrase := pwgen.GeneratePassword(passphraseLength, true) + ecc := command.NewExecCmdCreator() + cmd := ecc.Create( + "gpg2", "--batch", "--passphrase", passphrase, "--quick-gen-key", "finch") + return cmd +} + +func (pia *passInitAction) passInit() command.Command { + ecc := command.NewExecCmdCreator() + cmd := ecc.Create("pass", "init", "finch") + return cmd +} diff --git a/cmd/finch/pass_init_remote.go b/cmd/finch/pass_init_remote.go new file mode 100644 index 000000000..5c94387b3 --- /dev/null +++ b/cmd/finch/pass_init_remote.go @@ -0,0 +1,21 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +//go:build darwin || windows + +package main + +import ( + "github.com/gopasspw/gopass/pkg/pwgen" + "github.com/runfinch/finch/pkg/command" +) + +func (pia *passInitAction) initGpgKey() command.Command { + passphrase := pwgen.GeneratePassword(passphraseLength, true) + return pia.creator.CreateWithoutStdio("shell", limaInstanceName, "sudo", "-E", + "gpg2", "--batch", "--passphrase", passphrase, "--quick-gen-key", "finch") +} + +func (pia *passInitAction) passInit() command.Command { + return pia.creator.CreateWithoutStdio("shell", limaInstanceName, "sudo", "-E", "pass", "init", "finch") +} diff --git a/cmd/finch/platform.go b/cmd/finch/platform.go new file mode 100644 index 000000000..8bad33765 --- /dev/null +++ b/cmd/finch/platform.go @@ -0,0 +1,22 @@ +package main + +import ( + "github.com/spf13/cobra" + + "github.com/runfinch/finch/pkg/command" + "github.com/runfinch/finch/pkg/flog" +) + +func newPlatformCommand( + limaCmdCreator command.NerdctlCmdCreator, + logger flog.Logger, +) *cobra.Command { + systemCommand := &cobra.Command{ + Use: "platform", + Short: "Manage platform settings", + } + systemCommand.AddCommand(newPassInit(limaCmdCreator, logger), + newPassDelete(limaCmdCreator, logger)) + + return systemCommand +} diff --git a/cmd/finch/platform_init.go b/cmd/finch/platform_init.go new file mode 100644 index 000000000..fb594f390 --- /dev/null +++ b/cmd/finch/platform_init.go @@ -0,0 +1,50 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "github.com/spf13/cobra" + + "github.com/runfinch/finch/pkg/command" + "github.com/runfinch/finch/pkg/flog" +) + +func newPassInit(limaCmdCreator command.NerdctlCmdCreator, logger flog.Logger) *cobra.Command { + passInitCommand := &cobra.Command{ + Use: "pass-init", + Short: "Initialize the pass", + RunE: newPassInitAction(limaCmdCreator, logger).runAdapter, + } + + return passInitCommand +} + +const passphraseLength = 16 + +type passInitAction struct { + creator command.NerdctlCmdCreator + logger flog.Logger +} + +func newPassInitAction(creator command.NerdctlCmdCreator, logger flog.Logger) *passInitAction { + return &passInitAction{creator: creator, logger: logger} +} + +func (pia *passInitAction) runAdapter(_ *cobra.Command, _ []string) error { + return pia.run() +} + +func (pia *passInitAction) run() error { + return pia.init() +} + +func (pia *passInitAction) init() error { + cmd := pia.initGpgKey() + err := cmd.Run() + if err != nil { + return err + } + cmd = pia.passInit() + return cmd.Run() +} diff --git a/cmd/finch/platform_pass_delete.go b/cmd/finch/platform_pass_delete.go new file mode 100644 index 000000000..442c858e2 --- /dev/null +++ b/cmd/finch/platform_pass_delete.go @@ -0,0 +1,47 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package main + +import ( + "github.com/spf13/cobra" + + "github.com/runfinch/finch/pkg/command" + "github.com/runfinch/finch/pkg/flog" +) + +func newPassDelete(limaCmdCreator command.NerdctlCmdCreator, logger flog.Logger) *cobra.Command { + passDeleteCommand := &cobra.Command{ + Use: "pass-delete", + Short: "Delete the pass key", + RunE: newPassDeleteAction(limaCmdCreator, logger).runAdapter, + } + return passDeleteCommand +} + +type passDeleteAction struct { + creator command.NerdctlCmdCreator + logger flog.Logger +} + +func newPassDeleteAction(creator command.NerdctlCmdCreator, logger flog.Logger) *passDeleteAction { + return &passDeleteAction{creator: creator, logger: logger} +} + +func (pda *passDeleteAction) runAdapter(_ *cobra.Command, _ []string) error { + return pda.run() +} + +func (pda *passDeleteAction) run() error { + return pda.delete() +} + +func (pda *passDeleteAction) delete() error { + cmd := pda.removePass() + err := cmd.Run() + if err != nil { + pda.logger.Warnf("cannot perform pass remove action") + } + cmd = pda.removePassKey() + return cmd.Run() +} diff --git a/cmd/finch/platform_pass_delete_native.go b/cmd/finch/platform_pass_delete_native.go new file mode 100644 index 000000000..e42e68240 --- /dev/null +++ b/cmd/finch/platform_pass_delete_native.go @@ -0,0 +1,30 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +//go:build linux + +package main + +import ( + "os" + + "github.com/runfinch/finch/pkg/command" +) + +func (pda *passDeleteAction) removePassKey() command.Command { + ecc := command.NewExecCmdCreator() + + cmd := ecc.Create("gpg2", "--yes", "--delete-secret-and-public-key", "finch") + cmd.SetStdin(os.Stdin) + cmd.SetStdout(os.Stdout) + return cmd +} + +func (pda *passDeleteAction) removePass() command.Command { + ecc := command.NewExecCmdCreator() + + cmd := ecc.Create("pass", "rm", "finch") + cmd.SetStdin(os.Stdin) + cmd.SetStdout(os.Stdout) + return cmd +} diff --git a/cmd/finch/platform_pass_delete_remote.go b/cmd/finch/platform_pass_delete_remote.go new file mode 100644 index 000000000..f07490503 --- /dev/null +++ b/cmd/finch/platform_pass_delete_remote.go @@ -0,0 +1,20 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +//go:build darwin || windows + +package main + +import ( + "github.com/runfinch/finch/pkg/command" +) + +func (pda *passDeleteAction) removePassKey() command.Command { + return pda.creator.Create("shell", limaInstanceName, "sudo", "-E", + "gpg2", "--yes", "--delete-secret-and-public-key", "finch") +} + +func (pda *passDeleteAction) removePass() command.Command { + return pda.creator.Create("shell", limaInstanceName, "sudo", "-E", + "pass", "rm", "finch") +} diff --git a/e2e/vm/platform_pass_test.go b/e2e/vm/platform_pass_test.go new file mode 100644 index 000000000..6f17fec91 --- /dev/null +++ b/e2e/vm/platform_pass_test.go @@ -0,0 +1,22 @@ +// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +package vm + +import ( + "github.com/onsi/ginkgo/v2" + "github.com/runfinch/common-tests/command" + "github.com/runfinch/common-tests/option" +) + +var testPlatform = func(o *option.Option) { + ginkgo.Describe("Platform", func() { + ginkgo.BeforeEach(func() { + command.New(o, "platform", "pass-delete").WithoutCheckingExitCode().WithTimeoutInSeconds(90).Run() + }) + ginkgo.It("Pass Init and deletion are Successful", func() { + command.New(o, "platform", "pass-init").Run() + command.New(o, "platform", "pass-delete").Run() + }) + }) +} diff --git a/e2e/vm/vm_darwin_test.go b/e2e/vm/vm_darwin_test.go index a928c5bec..88bf13267 100644 --- a/e2e/vm/vm_darwin_test.go +++ b/e2e/vm/vm_darwin_test.go @@ -70,6 +70,7 @@ func TestVM(t *testing.T) { testSupportBundle(o) testCredHelper(o, *e2e.Installed, *e2e.Registry) testSoci(o, *e2e.Installed) + testPlatform(o) }) gomega.RegisterFailHandler(ginkgo.Fail) diff --git a/e2e/vm/vm_windows_test.go b/e2e/vm/vm_windows_test.go index 1bdf70fbf..ae101b5a0 100644 --- a/e2e/vm/vm_windows_test.go +++ b/e2e/vm/vm_windows_test.go @@ -53,6 +53,7 @@ func TestVM(t *testing.T) { testSupportBundle(o) testCredHelper(o, *e2e.Installed, *e2e.Registry) testSoci(o, *e2e.Installed) + testPlatform(o) }) gomega.RegisterFailHandler(ginkgo.Fail) diff --git a/go.mod b/go.mod index 50fdf4e2e..5329a44b5 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/runfinch/finch -go 1.22.0 +go 1.22.1 + +toolchain go1.22.5 require ( github.com/aws/aws-sdk-go-v2 v1.30.3 @@ -8,6 +10,7 @@ require ( github.com/docker/docker v27.0.3+incompatible github.com/golang/mock v1.6.0 github.com/google/go-licenses v1.6.1-0.20230903011517-706b9c60edd4 + github.com/gopasspw/gopass v1.15.13 github.com/lima-vm/lima v0.22.0 github.com/onsi/ginkgo/v2 v2.19.0 github.com/onsi/gomega v1.33.1 @@ -22,7 +25,7 @@ require ( github.com/tc-hib/go-winres v0.3.3 github.com/xorcare/pointer v1.2.2 golang.org/x/crypto v0.25.0 - golang.org/x/exp v0.0.0-20230810033253-352e893a4cad + golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 golang.org/x/tools v0.23.0 gopkg.in/yaml.v3 v3.0.1 k8s.io/apimachinery v0.30.3 @@ -30,6 +33,7 @@ require ( require ( github.com/aws/smithy-go v1.20.3 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/containerd/containerd v1.7.16 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect @@ -40,9 +44,11 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/google/licenseclassifier/v2 v2.0.0 // indirect github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 // indirect + github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/lima-vm/go-qcow2reader v0.1.1 // indirect github.com/lufia/plan9stats v0.0.0-20231016141302-07b5767bb0ed // indirect github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/muesli/crunchy v0.4.0 // indirect github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect github.com/opencontainers/image-spec v1.1.0-rc6 // indirect github.com/pkg/errors v0.9.1 // indirect @@ -52,8 +58,8 @@ require ( github.com/tc-hib/winres v0.2.1 // indirect github.com/tklauser/go-sysconf v0.3.13 // indirect github.com/tklauser/numcpus v0.7.0 // indirect - github.com/urfave/cli/v2 v2.25.7 // indirect - github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect + github.com/urfave/cli/v2 v2.27.1 // indirect + github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect golang.org/x/image v0.18.0 // indirect golang.org/x/sync v0.7.0 // indirect @@ -86,6 +92,5 @@ require ( golang.org/x/sys v0.22.0 golang.org/x/text v0.16.0 golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect k8s.io/klog/v2 v2.120.1 // indirect ) diff --git a/go.sum b/go.sum index c25cbe1b2..7612a6564 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,25 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +filippo.io/age v1.1.1 h1:pIpO7l151hCnQ4BdyBujnGP2YlUo0uj6sAVNHGBvXHg= +filippo.io/age v1.1.1/go.mod h1:l03SrzDUrBkdBx8+IILdnn2KZysqQdbEBUQ4p3sqEQE= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/ProtonMail/go-crypto v1.0.0 h1:LRuvITjQWX+WIfr930YHG2HNfjR1uOfyf5vE0kC2U78= +github.com/ProtonMail/go-crypto v1.0.0/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= +github.com/alessio/shellescape v1.4.2 h1:MHPfaU+ddJ0/bYWpgIeUnQUqKrlJ1S7BfEYPM4uEoM0= +github.com/alessio/shellescape v1.4.2/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= +github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= +github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-sdk-go-v2 v1.30.3 h1:jUeBtG0Ih+ZIFH0F4UkmL9w3cSpaMv9tYYDbzILP8dY= github.com/aws/aws-sdk-go-v2 v1.30.3/go.mod h1:nIQjQVp5sfpQcTc9mPSr1B0PaWK5ByX9MOoDadSN4lc= github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE= github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= +github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= +github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/containerd/containerd v1.7.16 h1:7Zsfe8Fkj4Wi2My6DXGQ87hiqIrmOXolm72ZEkFU5Mg= github.com/containerd/containerd v1.7.16/go.mod h1:NL49g7A/Fui7ccmxV6zkBWwqMgmMxFWzujYCc+JLt7k= @@ -13,6 +27,8 @@ github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr github.com/coreos/go-semver v0.3.1/go.mod h1:irMmmIw/7yzSRPWryHsK7EYSg09caPQL03VsM8rvUec= github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/danieljoos/wincred v1.2.1 h1:dl9cBrupW8+r5250DYkYxocLeZ1Y4vB1kxgtjxw8GQs= +github.com/danieljoos/wincred v1.2.1/go.mod h1:uGaFL9fDn3OLTvzCGulzE+SzjEe5NGlh5FdCcyfPwps= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -26,6 +42,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -47,6 +65,9 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I= github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU= +github.com/godbus/dbus v0.0.0-20190623212516-8a1682060722 h1:NNKZiuNXd6lpZRyoFM/uhssj5W9Ps1DbhGHxT49Pm9I= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -74,8 +95,12 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-licenses v1.6.1-0.20230903011517-706b9c60edd4 h1:2cF5oCuHDHTsC1S1eePsrHKGs1Co9Q6XOc8nhysGer4= github.com/google/go-licenses v1.6.1-0.20230903011517-706b9c60edd4/go.mod h1:BUoZvAC+k4aLzq3+719tLz4jZum9m7lfwuXKtq8n5VM= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQEEioJvFYxYcLRKzk= github.com/google/go-replayers/httpreplay v1.2.0/go.mod h1:WahEFFZZ7a1P4VM1qEeHy+tME4bwyqPcwWbNlUI1Mcg= github.com/google/licenseclassifier/v2 v2.0.0 h1:1Y57HHILNf4m0ABuMVb6xk4vAJYEUO0gDxNpog0pyeA= @@ -85,14 +110,19 @@ github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3 github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6 h1:k7nVchz72niMH6YLQNvHSdIE7iqsQxK1P41mySCvssg= github.com/google/pprof v0.0.0-20240424215950-a892ee059fd6/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/gopasspw/gopass v1.15.13 h1:/yPnhdWyKCr9O2DmDgnXksw9Mt5wevyB/fgDPULP2m4= +github.com/gopasspw/gopass v1.15.13/go.mod h1:wV3csLNwSO9CZrwskbKbdBqSBjVKsEMCkb4ZQHrZnTI= +github.com/hashicorp/golang-lru v1.0.2 h1:dV3g9Z/unq5DpblPpw+Oqcv4dU/1omnb4Ok8iPY6p1c= +github.com/hashicorp/golang-lru v1.0.2/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= +github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -113,6 +143,10 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/muesli/crunchy v0.4.0 h1:qdiml8gywULHBsztiSAf6rrE6EyuNasNKZ104mAaahM= +github.com/muesli/crunchy v0.4.0/go.mod h1:9k4x6xdSbb7WwtAVy0iDjaiDjIk6Wa5AgUIqp+HqOpU= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= +github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/onsi/ginkgo/v2 v2.19.0 h1:9Cnnf7UHo57Hy3k6/m5k3dRfGTMXGvxhHFvkDTCTpvA= @@ -142,6 +176,8 @@ github.com/power-devops/perfstat v0.0.0-20221212215047-62379fc7944b/go.mod h1:Om github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= +github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= +github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/runfinch/common-tests v0.7.23 h1:NWVpNu10w25tftNaX7dS/HcZszT7Bepmlk4raEmjfCQ= github.com/runfinch/common-tests v0.7.23/go.mod h1:4nz5jrJT0BM727xooNP0F6kD7pSK97tyeER50Zju53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -181,18 +217,23 @@ github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08 github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= github.com/tklauser/numcpus v0.7.0/go.mod h1:bb6dMVcj8A42tSE7i32fsIUCbQNllK5iDguyOZRUzAY= -github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= -github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= +github.com/twpayne/go-pinentry v0.3.0 h1:Rr+fEOZXmeItOb4thjeVaBWJKB9Xa/eojolycyF/26c= +github.com/twpayne/go-pinentry v0.3.0/go.mod h1:iOIZD+9np/2V24OdCGos7Y1/xX90wc6VEAZsgb+r9D4= +github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho= +github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/xorcare/pointer v1.2.2 h1:zjD77b5DTehClND4MK+9dDE0DcpFIZisAJ/+yVJvKYA= github.com/xorcare/pointer v1.2.2/go.mod h1:azsKh7oVwYB7C1o8P284fG8MvtErX/F5/dqXiaj71ak= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= -github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/xrash/smetrics v0.0.0-20170218160415-a3153f7040e9/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw= +github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/zalando/go-keyring v0.2.4 h1:wi2xxTqdiwMKbM6TWwi+uJCG/Tum2UV0jqaQhCa9/68= +github.com/zalando/go-keyring v0.2.4/go.mod h1:HL4k+OXQfJUWaMnqyuSOc0drfGPX2b51Du6K+MRgZMk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -203,8 +244,8 @@ golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad h1:g0bG7Z4uG+OgH2QDODnjp6ggkk1bJDsINcuWmJN1iJU= -golang.org/x/exp v0.0.0-20230810033253-352e893a4cad/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0 h1:985EYyeCOxTpcgOTJpflJUwOeEz0CQOdPt73OzpE9F8= +golang.org/x/exp v0.0.0-20240404231335-c0f41cb1a7a0/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/image v0.18.0 h1:jGzIakQa/ZXI1I0Fxvaa9W7yP25TqT6cHIHn+6CqvSQ= golang.org/x/image v0.18.0/go.mod h1:4yyo5vMFQjVjUcVk4jEQcU9MGy/rulF5WvUILseCM2E= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=