From 54f5f04a1fbc9903e65ec54f36a227f44fcc83b7 Mon Sep 17 00:00:00 2001 From: Zach Date: Sun, 19 Nov 2023 11:32:10 -0600 Subject: [PATCH] forgot symlinks --- cmd/detect.go | 5 ----- cmd/root.go | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/detect.go b/cmd/detect.go index d864f103..5e5a8b7d 100644 --- a/cmd/detect.go +++ b/cmd/detect.go @@ -13,12 +13,8 @@ import ( func init() { rootCmd.AddCommand(detectCmd) - detectCmd.Flags().String("log-opts", "", "git log options") detectCmd.Flags().Bool("no-git", false, "treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set") detectCmd.Flags().Bool("pipe", false, "scan input from stdin, ex: `cat some_file | gitleaks detect --pipe`") - detectCmd.Flags().Bool("follow-symlinks", false, "scan files that are symlinks to other files") - detectCmd.Flags().StringSlice("enable-rule", []string{}, "only enable specific rules by id, ex: `gitleaks detect --enable-rule=atlassian-api-token --enable-rule=slack-access-token`") - detectCmd.Flags().StringP("gitleaks-ignore-path", "i", ".", "path to .gitleaksignore file or folder containing one") } var detectCmd = &cobra.Command{ @@ -94,4 +90,3 @@ func runDetect(cmd *cobra.Command, args []string) { findingSummaryAndExit(findings, cmd, cfg, exitCode, start, err) } - diff --git a/cmd/root.go b/cmd/root.go index 0f487be9..e62646a8 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -57,6 +57,7 @@ func init() { rootCmd.PersistentFlags().String("log-opts", "", "git log options") rootCmd.PersistentFlags().StringSlice("enable-rule", []string{}, "only enable specific rules by id, ex: `gitleaks detect --enable-rule=atlassian-api-token --enable-rule=slack-access-token`") rootCmd.PersistentFlags().StringP("gitleaks-ignore-path", "i", ".", "path to .gitleaksignore file or folder containing one") + rootCmd.PersistentFlags().Bool("follow-symlinks", false, "scan files that are symlinks to other files") err := viper.BindPFlag("config", rootCmd.PersistentFlags().Lookup("config")) if err != nil { log.Fatal().Msgf("err binding config %s", err.Error())