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
Github and Gitlab Authentication via http.extraHeader for cloning Repositories (#4139)
* initial code changes
* move args before clone command
* add comments
* added flag for github source to support backward compatibility
* added flag for gitlab source to support backward compatibility
* inverse the logic for enterprise
* remove print statement
* remove flag defaults
* updated comments and removed CloneRepoUsingTokenInHeader function
* false->true
Copy file name to clipboardExpand all lines: main.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -119,6 +119,7 @@ var (
119
119
githubScanPRComments=githubScan.Flag("pr-comments", "Include pull request descriptions and comments in scan.").Bool()
120
120
githubScanGistComments=githubScan.Flag("gist-comments", "Include gist comments in scan.").Bool()
121
121
githubCommentsTimeframeDays=githubScan.Flag("comments-timeframe", "Number of days in the past to review when scanning issue, PR, and gist comments.").Uint32()
122
+
githubAuthInUrl=githubScan.Flag("auth-in-url", "Embed authentication credentials in repository URLs instead of using secure HTTP headers").Bool()
githubExperimentalScan=cli.Command("github-experimental", "Run an experimental GitHub scan. Must specify at least one experimental sub-module to run: object-discovery.")
@@ -139,6 +140,7 @@ var (
139
140
gitlabScanExcludePaths=gitlabScan.Flag("exclude-paths", "Path to file with newline separated regexes for files to exclude in scan.").Short('x').String()
140
141
gitlabScanIncludeRepos=gitlabScan.Flag("include-repos", `Repositories to include in an org scan. This can also be a glob pattern. You can repeat this flag. Must use Gitlab repo full name. Example: "trufflesecurity/trufflehog", "trufflesecurity/t*"`).Strings()
141
142
gitlabScanExcludeRepos=gitlabScan.Flag("exclude-repos", `Repositories to exclude in an org scan. This can also be a glob pattern. You can repeat this flag. Must use Gitlab repo full name. Example: "trufflesecurity/driftwood", "trufflesecurity/d*"`).Strings()
143
+
gitlabAuthInUrl=gitlabScan.Flag("auth-in-url", "Embed authentication credentials in repository URLs instead of using secure HTTP headers").Bool()
142
144
143
145
filesystemScan=cli.Command("filesystem", "Find credentials in a filesystem.")
144
146
filesystemPaths=filesystemScan.Arg("path", "Path to file or directory to scan.").Strings()
0 commit comments