Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Airtable Analyzer for Personal Access Tokens #3941

Merged
Prev Previous commit
Next Next commit
added more error checks in analyzer code
  • Loading branch information
nabeelalam committed Feb 28, 2025
commit 838a1ef442c2a11f7a9aaf623fd8fd9ce3269253
11 changes: 9 additions & 2 deletions pkg/analyzer/analyzers/airtable/airtablepat/airtable.go
Original file line number Diff line number Diff line change
@@ -57,7 +57,10 @@ func (a Analyzer) Analyze(_ context.Context, credInfo map[string]string) (*analy
return nil, err
}
// If bases are fetched, determine the token scopes
determineScopes(token, basesInfo)
err := determineScopes(token, basesInfo)
if err != nil {
return nil, err
}
}

return mapToAnalyzerResult(userInfo, basesInfo), nil
@@ -80,7 +83,11 @@ func AnalyzeAndPrintPermissions(cfg *config.Config, token string) {
return
}
basesInfo, _ = common.FetchAirtableBases(token)
determineScopes(token, basesInfo)
err := determineScopes(token, basesInfo)
if err != nil {
color.Red("[x] Error : %s", err.Error())
return
}
}

color.Green("[!] Valid Airtable Personal Access Token\n\n")
Loading
Oops, something went wrong.