Documentation ¶
Index ¶
- Constants
- Variables
- func AvailableAnalyzers() []string
- 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 AnalyzerRoundTripper
- type AnalyzerType
- 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 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 AvailableAnalyzers ¶ added in v3.81.6
func AvailableAnalyzers() []string
GetSortedAnalyzerTypes returns a sorted slice of AnalyzerType strings, skipping "Invalid".
func CreateLogFileName ¶
func GetWriterFromStatus ¶
func GetWriterFromStatus(status PermissionType) func(a ...interface{}) string
func StatusContains ¶
Types ¶
type Analyzer ¶
type Analyzer interface { Type() AnalyzerType Analyze(ctx context.Context, credentialInfo map[string]string) (*AnalyzerResult, error) }
type AnalyzerResult ¶
type AnalyzerResult struct { AnalyzerType AnalyzerType Bindings []Binding UnboundedResources []Resource Metadata map[string]any }
AnalyzerResult is the output of analysis.
type AnalyzerRoundTripper ¶ added in v3.82.3
type AnalyzerRoundTripper struct {
// contains filtered or unexported fields
}
type AnalyzerType ¶ added in v3.82.12
type AnalyzerType int
const ( AnalyzerTypeInvalid AnalyzerType = iota AnalyzerTypeAirbrake AnalyzerTypeAsana AnalyzerTypeBitbucket AnalyzerTypeGitHub AnalyzerTypeGitLab AnalyzerTypeHuggingFace AnalyzerTypeMailchimp AnalyzerTypeMailgun AnalyzerTypeMySQL AnalyzerTypeOpenAI AnalyzerTypeOpsgenie AnalyzerTypePostgres AnalyzerTypePostman AnalyzerTypeSendgrid AnalyzerTypeShopify AnalyzerTypeSlack AnalyzerTypeSourcegraph AnalyzerTypeSquare AnalyzerTypeStripe AnalyzerTypeTwilio )
func (AnalyzerType) String ¶ added in v3.82.12
func (a AnalyzerType) String() string
String method to get the string representation of an AnalyzerType.
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. |
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.