Documentation ¶
Overview ¶
Package core represents the core functionality of all commands
Package core represents the core functionality of all commands
Index ¶
- Constants
- func AnalyzeObject(ctx context.Context, sess *session.Session, change *object.Change, ...) bool
- func AnalyzeRepositories(ctx context.Context, sess *session.Session, st *stats.Stats)
- func CloneRepositoryGeneric(config CloneConfiguration, auth *http.BasicAuth) (repo *git.Repository, dir string, err error)
- func GatherLocalRepositories(sess *session.Session) error
- func GatherOrgsMembers(sess *session.Session)
- func GatherRepositories(ctx context.Context, sess *session.Session)
- func GatherTargets(sess *session.Session)
- func GatherUserOrOrg(s *session.Session, targetList []string)
- func ValidateUserInput(s *session.Session) error
- type CloneConfiguration
- type GithubRepository
Constants ¶
const TID threadID = 0
Variables ¶
This section is empty.
Functions ¶
func AnalyzeObject ¶
func AnalyzeRepositories ¶
AnalyzeRepositories will clone the repos, grab their history for analysis of files and content.
Before the analysis is done we also check various conditions that can be thought of as filters and are controlled by flags. If a directory, file, or the content pass through all of the filters then it is scanned once per each signature which may lead to a specific secret matching multiple rules and then generating multiple findings.
func CloneRepositoryGeneric ¶
func CloneRepositoryGeneric(config CloneConfiguration, auth *http.BasicAuth) (repo *git.Repository, dir string, err error)
cloneRepositoryGeneric will create either an in memory clone of a given repository or clone to a temp dir.
func GatherLocalRepositories ¶
GatherLocalRepositories will grab all the local repos from the user input and generate a repository object, putting dummy or generated values in where necessary.
func GatherOrgsMembers ¶
GatherOrgsMembers will gather all orgs members and position them in Targets
func GatherRepositories ¶
GatherRepositories will gather all repositories associated with a given target during a scan session. This is done using threads, whose count is set via commandline flag. Care much be taken to avoid rate limiting associated with suspected DOS attacks.
func GatherTargets ¶
GatherTargets will enumerate git targets adding them to a running target list. This will set the targets based on the scan type set within the cmd package.
func GatherUserOrOrg ¶
GatherUsers will generate a list of users from github.com that can then be filtered down to a specific target range
func ValidateUserInput ¶
ValidateUserInput will check for special characters in the strings and make sure we have at least one usr/repo/org to scan