Documentation ¶
Index ¶
- Constants
- Variables
- func CreateLogFileName(baseName string) string
- func GetWriterFromStatus(status PermissionType) func(a ...interface{}) string
- func NewAnalyzeClient(cfg *config.Config) *http.Client
- func StatusContains(status int, vals []int) bool
- type AnalyzeClient
- type Analyzer
- type AnalyzerResult
- type Binding
- type HttpStatusTest
- type LoggingRoundTripper
- type Permission
- type PermissionStatus
- type PermissionType
- type Resource
- type Scope
Constants ¶
View Source
const ( READ PermissionType = "Read" WRITE PermissionType = "Write" READ_WRITE PermissionType = "Read & Write" NONE PermissionType = "None" ERROR PermissionType = "Error" FullAccess string = "full_access" )
Variables ¶
View Source
var AvailableAnalyzers = []string{
"Airbrake",
"Asana",
"Bitbucket",
"GitHub",
"GitLab",
"HuggingFace",
"Mailchimp",
"Mailgun",
"MySQL",
"OpenAI",
"Opsgenie",
"Postgres",
"Postman",
"Sendgrid",
"Shopify",
"Slack",
"Sourcegraph",
"Square",
"Stripe",
"Twilio",
}
Sorted list of all available analyzers. Used for valid sub-commands and TUI selection. TODO: Change slice type to Analyzer interface when all available analyzers implement it.
View Source
var DefaultWriter = color.New().SprintFunc()
View Source
var GreenWriter = color.New(color.FgGreen).SprintFunc()
View Source
var RedWriter = color.New(color.FgRed).SprintFunc()
View Source
var YellowWriter = color.New(color.FgYellow).SprintFunc()
Functions ¶
func CreateLogFileName ¶
func GetWriterFromStatus ¶
func GetWriterFromStatus(status PermissionType) func(a ...interface{}) string
func StatusContains ¶
Types ¶
type Analyzer ¶
type Analyzer interface { Type() analyzerpb.AnalyzerType Analyze(ctx context.Context, credentialInfo map[string]string) (*AnalyzerResult, error) }
type AnalyzerResult ¶
type AnalyzerResult struct { AnalyzerType analyzerpb.AnalyzerType Bindings []Binding UnboundedResources []Resource Metadata map[string]any }
AnalyzerResult is the output of analysis.
type Binding ¶
type Binding struct { Resource Resource Permission Permission }
func BindAllPermissions ¶ added in v3.80.3
func BindAllPermissions(r Resource, perms ...Permission) []Binding
BindAllPermissions creates a Binding for each permission to the given resource.
type HttpStatusTest ¶
type HttpStatusTest struct { URL string Method string Payload map[string]interface{} Params map[string]string Valid []int Invalid []int Type PermissionType Status PermissionStatus Risk string }
type LoggingRoundTripper ¶
type LoggingRoundTripper struct {
// contains filtered or unexported fields
}
type Permission ¶
type Permission struct { Value string Parent *Permission }
type PermissionStatus ¶
type PermissionType ¶
type PermissionType string
Directories ¶
Path | Synopsis |
---|---|
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
classic
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
finegrained
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Code generated by go generate; DO NOT EDIT.
|
Code generated by go generate; DO NOT EDIT. |
Click to show internal directories.
Click to hide internal directories.