Documentation ¶
Index ¶
- Constants
- func FindHeader(headers []*_models.Header, headerName string) (index int, found bool)
- func GetPathParams(specPath string, opPath string) map[string]string
- func Min(x, y int) int
- func ReadDictionaryFiles(filenames []string) ([]string, error)
- func SeverityToAlert(severity string) core.AlertSeverity
- func WalkFiles(root string) ([]string, error)
- type API
- type BaseTraceAnalyzerAPIAnnotation
- type Finding
- type TraceAnalyzerAPIAnnotation
- type TraceAnalyzerAnnotation
Constants ¶
View Source
const ( ModuleName = "traceanalyzer" ModuleDescription = "Inspects request and responses to detect insecure practices" )
View Source
const ( SeverityInfo = "INFO" SeverityLow = "LOW" SeverityMedium = "MEDIUM" SeverityHigh = "HIGH" SeverityCritical = "CRITICAL" )
Variables ¶
This section is empty.
Functions ¶
func FindHeader ¶
func ReadDictionaryFiles ¶
func SeverityToAlert ¶
func SeverityToAlert(severity string) core.AlertSeverity
Types ¶
type BaseTraceAnalyzerAPIAnnotation ¶
type BaseTraceAnalyzerAPIAnnotation struct { SpecPath string `json:"path"` SpecMethod string `json:"method"` }
func (BaseTraceAnalyzerAPIAnnotation) Method ¶
func (a BaseTraceAnalyzerAPIAnnotation) Method() string
func (BaseTraceAnalyzerAPIAnnotation) Path ¶
func (a BaseTraceAnalyzerAPIAnnotation) Path() string
func (BaseTraceAnalyzerAPIAnnotation) Severity ¶
func (a BaseTraceAnalyzerAPIAnnotation) Severity() string
func (BaseTraceAnalyzerAPIAnnotation) SpecLocation ¶
func (a BaseTraceAnalyzerAPIAnnotation) SpecLocation() string
func (BaseTraceAnalyzerAPIAnnotation) TTL ¶
func (a BaseTraceAnalyzerAPIAnnotation) TTL() time.Duration
type Finding ¶
type Finding struct { ShortDesc string DetailedDesc string Severity string Alert core.AlertSeverity }
A finding is an interpreted annotation.
type TraceAnalyzerAPIAnnotation ¶
type TraceAnalyzerAPIAnnotation interface { Name() string Path() string Method() string Aggregate(TraceAnalyzerAnnotation) (notify bool) Severity() string TTL() time.Duration Redacted() TraceAnalyzerAPIAnnotation ToAPIFinding() oapicommon.APIFinding }
type TraceAnalyzerAnnotation ¶
type TraceAnalyzerAnnotation interface { Name() string NewAPIAnnotation(path, method string) TraceAnalyzerAPIAnnotation Severity() string Redacted() TraceAnalyzerAnnotation ToFinding() Finding }
Click to show internal directories.
Click to hide internal directories.