Documentation ¶
Overview ¶
Package core generated by go-bindata.// sources: static/fonts/open-iconic.eot static/fonts/open-iconic.otf static/fonts/open-iconic.svg static/fonts/open-iconic.ttf static/fonts/open-iconic.woff static/images/gopher_full.png static/images/gopher_head.png static/images/spinner.gif static/index.html static/javascripts/application.js static/javascripts/backbone.js static/javascripts/bootstrap.js static/javascripts/clipboard.js static/javascripts/hexdump.js static/javascripts/highlight.js static/javascripts/highlight_worker.js static/javascripts/jquery-3.3.1.js static/javascripts/popper.js static/javascripts/underscore.js static/stylesheets/application.css static/stylesheets/bootstrap.css static/stylesheets/highlight.css static/stylesheets/openiconic.css
Index ¶
- Constants
- Variables
- func AnalyzeRepositories(sess *Session)
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func BinaryFileSystem(root string) *binaryFileSystem
- func GatherRepositories(sess *Session)
- func GatherTargets(sess *Session)
- func MustAsset(name string) []byte
- func NewRouter(s *Session) *gin.Engine
- func PrintSessionStats(sess *Session)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
- type GitLab
- type Github
- type Options
- type Session
- func (s *Session) AddFinding(finding *matching.Finding)
- func (s *Session) AddRepository(repository *common.Repository)
- func (s *Session) AddTarget(target *common.Owner)
- func (s *Session) Finish()
- func (s *Session) InitAPIClient()
- func (s *Session) InitAccessToken()
- func (s *Session) InitLogger()
- func (s *Session) InitRouter()
- func (s *Session) InitSignatures()
- func (s *Session) InitStats()
- func (s *Session) InitThreads()
- func (s *Session) Initialize()
- func (s *Session) SaveToFile(location string) error
- func (s *Session) ValidateTokenConfig()
- type Stats
Constants ¶
const ( GithubBaseUri = "https://raw.githubusercontent.com" MaximumFileSize = 153600 GitLabBaseUri = "https://gitlab.com" CspPolicy = "default-src 'none'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'" ReferrerPolicy = "no-referrer" )
const ( GitHubAccessTokenEnvVariable = "GITROB_GITHUB_ACCESS_TOKEN" GitLabAccessTokenEnvVariable = "GITROB_GITLAB_ACCESS_TOKEN" StatusInitializing = "initializing" StatusGathering = "gathering" StatusAnalyzing = "analyzing" StatusFinished = "finished" )
Variables ¶
var IsGithub bool
Functions ¶
func AnalyzeRepositories ¶
func AnalyzeRepositories(sess *Session)
func Asset ¶
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func BinaryFileSystem ¶
func BinaryFileSystem(root string) *binaryFileSystem
func GatherRepositories ¶
func GatherRepositories(sess *Session)
func GatherTargets ¶
func GatherTargets(sess *Session)
func MustAsset ¶
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
func PrintSessionStats ¶
func PrintSessionStats(sess *Session)
func RestoreAsset ¶
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶
RestoreAssets restores an asset under the given directory recursively
Types ¶
type Options ¶
type Options struct { BindAddress *string `json:"-"` CommitDepth *int Debug *bool `json:"-"` GitLabAccessToken *string `json:"-"` GithubAccessToken *string `json:"-"` InMemClone *bool Load *string `json:"-"` Logins []string Mode *int NoExpandOrgs *bool Port *int Save *string `json:"-"` Silent *bool `json:"-"` Threads *int }
func ParseOptions ¶
type Session ¶
type Session struct { sync.Mutex Version string Options Options `json:"-"` //do not unmarshal to json on save Out *common.Logger `json:"-"` //do not unmarshal to json on save Stats *Stats Github Github `json:"-"` //do not unmarshal to json on save GitLab GitLab `json:"-"` //do not unmarshal to json on save Client common.IClient `json:"-"` //do not unmarshal to json on save Router *gin.Engine `json:"-"` //do not unmarshal to json on save Targets []*common.Owner Repositories []*common.Repository Findings []*matching.Finding IsGithubSession bool `json:"-"` //do not unmarshal to json on save Signatures matching.Signatures `json:"-"` //do not unmarshal to json on save }
func NewSession ¶
func (*Session) AddFinding ¶
func (*Session) AddRepository ¶
func (s *Session) AddRepository(repository *common.Repository)
func (*Session) InitAPIClient ¶
func (s *Session) InitAPIClient()
func (*Session) InitAccessToken ¶
func (s *Session) InitAccessToken()
func (*Session) InitLogger ¶
func (s *Session) InitLogger()
func (*Session) InitRouter ¶
func (s *Session) InitRouter()
func (*Session) InitSignatures ¶
func (s *Session) InitSignatures()
func (*Session) InitThreads ¶
func (s *Session) InitThreads()
func (*Session) Initialize ¶
func (s *Session) Initialize()
func (*Session) SaveToFile ¶
func (*Session) ValidateTokenConfig ¶
func (s *Session) ValidateTokenConfig()
type Stats ¶
type Stats struct { sync.Mutex StartedAt time.Time FinishedAt time.Time Status string Progress float64 Targets int Repositories int Commits int Files int Findings int }
func (*Stats) IncrementCommits ¶
func (s *Stats) IncrementCommits()
func (*Stats) IncrementFiles ¶
func (s *Stats) IncrementFiles()
func (*Stats) IncrementFindings ¶
func (s *Stats) IncrementFindings()
func (*Stats) IncrementRepositories ¶
func (s *Stats) IncrementRepositories()
func (*Stats) IncrementTargets ¶
func (s *Stats) IncrementTargets()