diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4b33cd7f..c9c5f987d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: pull_request: env: - GO_VERSION: '1.21.5' + GO_VERSION: '1.21.8' jobs: unit-tests: diff --git a/go.mod b/go.mod index db66c9b9d..74aabc175 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/checkmarx/ast-cli -go 1.21.5 +go 1.21.8 require ( github.com/MakeNowJust/heredoc v1.0.0 @@ -15,7 +15,7 @@ require ( github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 - golang.org/x/crypto v0.18.0 + golang.org/x/crypto v0.21.0 golang.org/x/text v0.14.0 gotest.tools v2.2.0+incompatible ) @@ -39,7 +39,7 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.9.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/sys v0.16.0 // indirect + golang.org/x/sys v0.18.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index a113167cd..6f08f88e2 100644 --- a/go.sum +++ b/go.sum @@ -83,10 +83,20 @@ go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.20.0 h1:jmAMJJZXr5KiCw05dfYK9QnqaqKLYXijU23lsEdcQqg= +golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/crypto v0.20.1-0.20240228204720-0d2316b26734 h1:HutZC8sRIg57ztz3rVaQYl4yxgM+UF0Jal0kAWUSeFU= +golang.org/x/crypto v0.20.1-0.20240228204720-0d2316b26734/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/commands/chat-kics.go b/internal/commands/chat-kics.go index 34f9e8a3e..25e2461af 100644 --- a/internal/commands/chat-kics.go +++ b/internal/commands/chat-kics.go @@ -48,10 +48,11 @@ type OutputModel struct { func ChatKicsSubCommand(chatWrapper wrappers.ChatWrapper) *cobra.Command { chatKicsCmd := &cobra.Command{ - Use: "kics", - Short: "Chat about KICS result with OpenAI models", - Long: "Chat about KICS result with OpenAI models", - RunE: runChatKics(chatWrapper), + Use: "kics", + Short: "Chat about KICS result with OpenAI models", + Long: "Chat about KICS result with OpenAI models", + Hidden: true, + RunE: runChatKics(chatWrapper), } chatKicsCmd.Flags().String(params.ChatAPIKey, "", "OpenAI API key") diff --git a/internal/commands/chat-sast.go b/internal/commands/chat-sast.go index de9f32e63..88ceb623f 100644 --- a/internal/commands/chat-sast.go +++ b/internal/commands/chat-sast.go @@ -24,10 +24,11 @@ const AiGuidedRemediationDisabledError = "The AI Guided Remediation is disabled func ChatSastSubCommand(chatWrapper wrappers.ChatWrapper, tenantWrapper wrappers.TenantConfigurationWrapper) *cobra.Command { chatSastCmd := &cobra.Command{ - Use: "sast", - Short: "OpenAI-based SAST results remediation", - Long: "Use OpenAI models to remediate SAST results and chat about them", - RunE: runChatSast(chatWrapper, tenantWrapper), + Use: "sast", + Short: "OpenAI-based SAST results remediation", + Long: "Use OpenAI models to remediate SAST results and chat about them", + Hidden: true, + RunE: runChatSast(chatWrapper, tenantWrapper), } chatSastCmd.Flags().String(params.ChatAPIKey, "", "OpenAI API key") diff --git a/internal/commands/chat.go b/internal/commands/chat.go index 10b53aa7e..28c205462 100644 --- a/internal/commands/chat.go +++ b/internal/commands/chat.go @@ -12,9 +12,10 @@ const ( func NewChatCommand(chatWrapper wrappers.ChatWrapper, tenantWrapper wrappers.TenantConfigurationWrapper) *cobra.Command { chatCmd := &cobra.Command{ - Use: "chat", - Short: "Chat with OpenAI models", - Long: "Chat with OpenAI models regarding KICS or SAST results", + Use: "chat", + Short: "Chat with OpenAI models", + Long: "Chat with OpenAI models regarding KICS or SAST results", + Hidden: true, } chatKicsCmd := ChatKicsSubCommand(chatWrapper) chatSastCmd := ChatSastSubCommand(chatWrapper, tenantWrapper) diff --git a/internal/commands/util/help.go b/internal/commands/util/help.go index b1ca4b203..f91412027 100644 --- a/internal/commands/util/help.go +++ b/internal/commands/util/help.go @@ -16,8 +16,10 @@ func RootHelpFunc(command *cobra.Command) { var commands []string for _, c := range command.Commands() { - s := rightPad(c.Name()+":", c.NamePadding()) + c.Short - commands = append(commands, s) + if !c.Hidden { + s := rightPad(c.Name()+":", c.NamePadding()) + c.Short + commands = append(commands, s) + } } type helpEntry struct {