Skip to content

Find, verify, and analyze leaked credentials

[analyze] Fix double-print in postgres analyzer (#3199)

Miccah39f5f547e15d
diff --git a/pkg/analyzer/analyzers/github/finegrained/finegrained.go b/pkg/analyzer/analyzers/github/finegrained/finegrained.go
index 9dfb29587..20b46cf39 100644
--- a/pkg/analyzer/analyzers/github/finegrained/finegrained.go
+++ b/pkg/analyzer/analyzers/github/finegrained/finegrained.go
@@ -1240,7 +1240,8 @@ func analyzeUserPermissions(client *gh.Client, user *gh.User) ([]Permission, err
for _, permFunc := range acctPermFuncMap {
access, err := permFunc(client, user)
if err != nil {
- return nil, err
+ // TODO: Log error.
+ continue
}
perms = append(perms, access)
}
diff --git a/pkg/analyzer/analyzers/postgres/postgres.go b/pkg/analyzer/analyzers/postgres/postgres.go
index c25e8b1c2..3faf28094 100644
--- a/pkg/analyzer/analyzers/postgres/postgres.go
+++ b/pkg/analyzer/analyzers/postgres/postgres.go
@@ -86,8 +86,6 @@ func AnalyzeAndPrintPermissions(cfg *config.Config, connectionStr string) {
color.Yellow("[!] Successfully connected to Postgres database.")
printUserRoleAndPriv(info.Role, info.RolePrivs)
- printDBPrivs(info.DBs, info.User)
-
// Print db privs
if len(info.DBs) > 0 {
fmt.Print("\n\n")