srctleaks

package
v2.7.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureCommand

func ConfigureCommand(cmd *cobra.Command) error

func FormatDuration

func FormatDuration(d time.Duration) string

FormatDuration ...

func Run

func Run(opts *Options) error

Types

type GitHubClient

type GitHubClient struct {
	Client *github.Client
}

func (*GitHubClient) GetAllOrgMemberRepoURLs

func (c *GitHubClient) GetAllOrgMemberRepoURLs(members []string) (*PublicGitInfo, error)

GetAllOrgMemberRepoURLs ...

func (*GitHubClient) GetPublicOrgMembers

func (c *GitHubClient) GetPublicOrgMembers(organization string) (*PublicGitInfo, error)

GetPublicOrgMembers ...

func (*GitHubClient) GetPublicOrgRepoURLs

func (c *GitHubClient) GetPublicOrgRepoURLs(organization string) (*PublicGitInfo, error)

GetPublicOrgRepoURLs returns a slice of public repo URLs

func (*GitHubClient) GetPublicOrgUserRepoURLs

func (c *GitHubClient) GetPublicOrgUserRepoURLs(username string) (*PublicGitInfo, error)

GetPublicOrgUserRepoURLs returns a slice of public repo URLs

func (*GitHubClient) ListPublicMembers

func (c *GitHubClient) ListPublicMembers(organization string) ([]*github.User, error)

func (*GitHubClient) ListPublicOrgRepos

func (c *GitHubClient) ListPublicOrgRepos(organization string) ([]*github.Repository, error)

func (*GitHubClient) ListPublicUserRepos

func (c *GitHubClient) ListPublicUserRepos(username string) ([]*github.Repository, error)

func (*GitHubClient) SearchGitHubDorks

func (c *GitHubClient) SearchGitHubDorks(opts *Options) (map[string][]string, error)

SearchGitHubDorks ...

func (*GitHubClient) SearchUsers

func (c *GitHubClient) SearchUsers(opts *Options) ([]string, error)

SearchUsers searches GitHub for the supplied Company arg for the organization user and returns the best match based on the primary company base domain. and compares it against the GitHub username which is often similar or the same as the base domain minus tld.

type Options

type Options struct {
	Company          string
	GithubToken      string
	Domain           interface{}
	Output           string
	Debug            bool
	CheckAllOrgUsers bool
}

func (*Options) LoadFromCommand

func (opts *Options) LoadFromCommand(cmd *cobra.Command) error

type PublicGitInfo

type PublicGitInfo struct {
	OrgHTTPSCloneURLs              []string
	OrgUserHTTPSCloneURLs          []string
	OrgUserNonForkedHTTPSCloneURLs []string
	Members                        PublicGitMembers
}

type PublicGitMembers

type PublicGitMembers struct {
	GitHubProfileURL []string
	LoginName        []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL