You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To guard against malicious git configs in local scanning (see CVE-2025-41390), TruffleHog clones local git repositories to a temporary directory prior to scanning. This follows [Git's security best practices](https://git-scm.com/docs/git#_security). If you want to specify a custom path to clone the repository to (instead of tmp), you can use the `--clone-path` flag. If you'd like to skip the local cloning process and scan the repository directly (only do this for trusted repos), you can use the `--trust-local-git-config` flag.
userAgentSuffix=cli.Flag("user-agent-suffix", "Suffix to add to User-Agent.").String()
93
93
94
-
gitScan=cli.Command("git", "Find credentials in git repositories.")
95
-
gitScanURI=gitScan.Arg("uri", "Git repository URL. https://, file://, or ssh:// schema expected.").Required().String()
96
-
gitScanIncludePaths=gitScan.Flag("include-paths", "Path to file with newline separated regexes for files to include in scan.").Short('i').String()
97
-
gitScanExcludePaths=gitScan.Flag("exclude-paths", "Path to file with newline separated regexes for files to exclude in scan.").Short('x').String()
98
-
gitScanExcludeGlobs=gitScan.Flag("exclude-globs", "Comma separated list of globs to exclude in scan. This option filters at the `git log` level, resulting in faster scans.").String()
99
-
gitScanSinceCommit=gitScan.Flag("since-commit", "Commit to start scan from.").String()
100
-
gitScanBranch=gitScan.Flag("branch", "Branch to scan.").String()
101
-
gitScanMaxDepth=gitScan.Flag("max-depth", "Maximum depth of commits to scan.").Int()
102
-
gitScanBare=gitScan.Flag("bare", "Scan bare repository (e.g. useful while using in pre-receive hooks)").Bool()
103
-
gitClonePath=gitScan.Flag("clone-path", "Custom path where the repository should be cloned (default: temp dir).").String()
104
-
gitNoCleanup=gitScan.Flag("no-cleanup", "Do not delete cloned repositories after scanning (can only be used with --clone-path).").Bool()
105
-
_=gitScan.Flag("allow", "No-op flag for backwards compat.").Bool()
106
-
_=gitScan.Flag("entropy", "No-op flag for backwards compat.").Bool()
107
-
_=gitScan.Flag("regex", "No-op flag for backwards compat.").Bool()
94
+
gitScan=cli.Command("git", "Find credentials in git repositories.")
95
+
gitScanURI=gitScan.Arg("uri", "Git repository URL. https://, file://, or ssh:// schema expected.").Required().String()
96
+
gitScanIncludePaths=gitScan.Flag("include-paths", "Path to file with newline separated regexes for files to include in scan.").Short('i').String()
97
+
gitScanExcludePaths=gitScan.Flag("exclude-paths", "Path to file with newline separated regexes for files to exclude in scan.").Short('x').String()
98
+
gitScanExcludeGlobs=gitScan.Flag("exclude-globs", "Comma separated list of globs to exclude in scan. This option filters at the `git log` level, resulting in faster scans.").String()
99
+
gitScanSinceCommit=gitScan.Flag("since-commit", "Commit to start scan from.").String()
100
+
gitScanBranch=gitScan.Flag("branch", "Branch to scan.").String()
101
+
gitScanMaxDepth=gitScan.Flag("max-depth", "Maximum depth of commits to scan.").Int()
102
+
gitScanBare=gitScan.Flag("bare", "Scan bare repository (e.g. useful while using in pre-receive hooks)").Bool()
103
+
gitClonePath=gitScan.Flag("clone-path", "Custom path where the repository should be cloned (default: temp dir).").String()
104
+
gitNoCleanup=gitScan.Flag("no-cleanup", "Do not delete cloned repositories after scanning (can only be used with --clone-path).").Bool()
105
+
gitTrustLocalGitConfig=gitScan.Flag("trust-local-git-config", "Trust local git config.").Bool()
106
+
_=gitScan.Flag("allow", "No-op flag for backwards compat.").Bool()
107
+
_=gitScan.Flag("entropy", "No-op flag for backwards compat.").Bool()
108
+
_=gitScan.Flag("regex", "No-op flag for backwards compat.").Bool()
108
109
109
110
githubScan=cli.Command("github", "Find credentials in GitHub repositories.")
0 commit comments