Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = cobra.Command{ Use: "search", Short: "Searching of signature files", Long: color.GreenString(helpLong), Run: func(cmd *cobra.Command, args []string) { code = os.Getenv("FEATURE_CODE") path = os.Getenv("SOURCE_DIR") scan.Exec(func() error { scanner := &scan.Scanner{ Path: path, Code: code, Matcher: new(scan.Md5Matcher), } restca := make([]scan.ResultElement, 10) if res, err := scanner.Search(code); err != nil { return err } else { for _, v := range res { restca = append(restca, scan.ResultElement{ Path: v.Path, Line: "0", Column: "0", Msg: fmt.Sprintf("匹配文件路径为:%v", v.Path), Rule: "", Refs: []scan.Ref{}, }) } scan.SaveFile("result.json", scanner, restca) } return nil }) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.