@@ -6,6 +6,10 @@ import (
66 "encoding/json"
77 "errors"
88 "fmt"
9+ "io"
10+ "os"
11+ "path/filepath"
12+
913 "github.com/murphysecurity/murphysec/api"
1014 "github.com/murphysecurity/murphysec/cmd/murphy/internal/common"
1115 "github.com/murphysecurity/murphysec/cmd/murphy/internal/cv"
@@ -22,9 +26,6 @@ import (
2226 "github.com/repeale/fp-go"
2327 "github.com/samber/lo"
2428 "github.com/spf13/cobra"
25- "io"
26- "os"
27- "path/filepath"
2829)
2930
3031var jsonOutput bool
@@ -49,6 +50,7 @@ var branch string
4950var mavenModuleName []string
5051var binaryOnly bool
5152var scanProcess bool
53+ var distribution common.DistributionFlag
5254
5355func Cmd () * cobra.Command {
5456 var c cobra.Command
@@ -69,6 +71,7 @@ func Cmd() *cobra.Command {
6971 c .Flags ().IntVarP (& concurrentNumber , "max-concurrent-uploads" , "j" , 1 , "Set the maximum number of parallel uploads." )
7072 c .Flags ().StringVar (& webhookAddr , "webhook-addr" , "" , "specify the webhook address" )
7173 c .Flags ().Var (& webhookMode , "webhook-mode" , "specify the webhook mode, currently supports: simple, full" )
74+ c .Flags ().Var (& distribution , "distribution" , "specify the distribution, currently supports: external, internal, saas, open_source" )
7275 c .Flags ().StringVar (& extraData , "extra-data" , "" , "specify the extra data" )
7376 c .Flags ().BoolVar (& scanCodeHash , "scan-snippets" , false , "Enable scanning of code snippets to detect SBOM and vulnerabilities. Disabled by default" )
7477 c .Flags ().BoolVar (& binaryOnly , "binary-only" , false , "only scan binary files, skip source code scanning" )
@@ -95,6 +98,7 @@ func DfCmd() *cobra.Command {
9598 c .Flags ().Var (& sbomOutputType , "sbom-format" , "(Required) specify the SBOM format, currently supports: msdx1.1+json" )
9699 c .Flags ().StringVar (& webhookAddr , "webhook-addr" , "" , "specify the webhook address" )
97100 c .Flags ().Var (& webhookMode , "webhook-mode" , "specify the webhook mode, currently supports: simple, full(default)" )
101+ c .Flags ().Var (& distribution , "distribution" , "specify the distribution, currently supports: external, internal, saas, open_source" )
98102 c .Flags ().StringVar (& extraData , "extra-data" , "" , "specify the extra data" )
99103 c .Flags ().BoolVar (& scanCodeHash , "scan-snippets" , false , "Enable scanning of code snippets to detect SBOM and vulnerabilities. Disabled by default" )
100104 c .Flags ().StringArrayVar (& gradleProjectFilter .ProjectNames , "gradle-project-name" , make ([]string , 0 ), "specify the name of the Gradle project" )
0 commit comments