Adding --verifier flag, and a method to parse the input.

This commit is contained in:
ahmed
2023-02-03 15:56:08 -05:00
parent 2d35edfb23
commit aa3ba81717
+6
View File
@@ -46,6 +46,7 @@ var (
printAvgDetectorTime = cli.Flag("print-avg-detector-time", "Print the average time spent on each detector.").Bool()
noUpdate = cli.Flag("no-update", "Don't check for updates.").Bool()
fail = cli.Flag("fail", "Exit with code 183 if results are found.").Bool()
verifiers = cli.Flag("verifier", "Set custom verification endpoints.").String()
gitScan = cli.Command("git", "Find credentials in git repositories.")
gitScanURI = gitScan.Arg("uri", "Git repository URL. https://, file://, or ssh:// schema expected.").Required().String()
@@ -355,3 +356,8 @@ func printAverageDetectorTime(e *engine.Engine) {
fmt.Fprintf(os.Stderr, "%s: %s\n", detectorName, avgDuration)
}
}
func splitVerifierURLs(verifierURLs string) []string {
fmt.Println(verifierURLs)
return strings.Split(verifierURLs, ",")
}