Skip to content

Commit

Permalink
fix: sbom 类型名字变了
Browse files Browse the repository at this point in the history
  • Loading branch information
iseki0 committed Oct 29, 2024
1 parent 301e3a3 commit 6ab01b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/murphy/internal/common/sbom_format_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ func (t *SBOMFormatFlag) String() string {
if !t.Valid {
return "invalid"
}
return "murphysec1.1+json"
return "msdx1.1+json"
}

func (t *SBOMFormatFlag) Set(s string) error {
// temporary implementation
if s != "murphysec1.1+json" {
if s != "msdx1.1+json" {
return fmt.Errorf("unsupported format: %s", s)
}
t.Valid = true
Expand Down
4 changes: 2 additions & 2 deletions cmd/murphy/internal/scan/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func DfCmd() *cobra.Command {
c.Flags().BoolVar(&onlyTaskId, "only-task-id", false, "print task id after task created, the scan result will not be printed")
c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project")
c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "Specify the SBOM output file path, use \"-\" to output to stdout")
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: murphysec1.1+json")
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: msdx1.1+json")
return &c
}

Expand All @@ -83,7 +83,7 @@ func EnvCmd() *cobra.Command {
c.Flags().BoolVar(&onlyTaskId, "only-task-id", false, "print task id after task created, the scan result will not be printed")
c.Flags().StringArrayVar(&projectTagNames, "project-tag", make([]string, 0), "specify the tag of the project")
c.Flags().StringVar(&sbomOutputConfig, "sbom-output", "-", "Specify the SBOM output file path, use \"-\" to output to stdout")
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: murphysec1.1+json")
c.Flags().Var(&sbomOutputType, "sbom-format", "(Required) Specify the SBOM format, currently supports: msdx1.1+json")
return &c
}

Expand Down

0 comments on commit 6ab01b6

Please sign in to comment.