mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-09-19 22:22:00 +00:00
Fix GitHub analyzer panic on empty organization name (#3295)
This commit is contained in:
parent
07dc95dd58
commit
213bf7e4fd
1 changed files with 5 additions and 2 deletions
|
@ -47,10 +47,13 @@ func secretInfoToAnalyzerResult(info *common.SecretInfo) *analyzers.AnalyzerResu
|
|||
result.Bindings = append(result.Bindings, secretInfoToRepoBindings(info)...)
|
||||
result.Bindings = append(result.Bindings, secretInfoToGistBindings(info)...)
|
||||
for _, repo := range append(info.Repos, info.AccessibleRepos...) {
|
||||
if *repo.Owner.Type != "Organization" {
|
||||
if repo.Owner.GetType() != "Organization" {
|
||||
continue
|
||||
}
|
||||
name := repo.Owner.GetName()
|
||||
if name == "" {
|
||||
continue
|
||||
}
|
||||
name := *repo.Owner.Name
|
||||
result.UnboundedResources = append(result.UnboundedResources, analyzers.Resource{
|
||||
Name: name,
|
||||
FullyQualifiedName: fmt.Sprintf("github.com/%s", name),
|
||||
|
|
Loading…
Reference in a new issue