Documentation
¶
Index ¶
- func CalculatePercentage[A Number, B Number](first A, second B) float64
- func Round(n float64) float64
- type Case
- type DB
- func (db *DB) AddToScannedPaths(method string, path string)
- func (db *DB) ExportPayloads(payloadsExportFile string) error
- func (db *DB) GetStatistics(ignoreUnresolved, nonBlockedAsPassed bool) *Statistics
- func (db *DB) GetTestCases() []*Case
- func (db *DB) UpdateBlockedTests(t *Info)
- func (db *DB) UpdateFailedTests(t *Info)
- func (db *DB) UpdateNaTests(t *Info, ignoreUnresolved, nonBlockedAsPassed, isTruePositive bool)
- func (db *DB) UpdatePassedTests(t *Info)
- type FailedDetails
- type Float
- type Info
- type Integer
- type Number
- type Path
- type Placeholder
- type RequestStats
- type ScannedPaths
- type Score
- type Statistics
- type SummaryTableRow
- type TestDetails
- type TestsSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePercentage ¶
Types ¶
type Case ¶
type DB ¶
type DB struct {
sync.Mutex
NumberOfTests uint
Hash string
IsGrpcAvailable bool
IsGraphQLAvailable bool
// contains filtered or unexported fields
}
func (*DB) AddToScannedPaths ¶
func (*DB) ExportPayloads ¶
func (*DB) GetStatistics ¶
func (db *DB) GetStatistics(ignoreUnresolved, nonBlockedAsPassed bool) *Statistics
func (*DB) GetTestCases ¶
func (*DB) UpdateBlockedTests ¶
func (*DB) UpdateFailedTests ¶
func (*DB) UpdateNaTests ¶
func (*DB) UpdatePassedTests ¶
type FailedDetails ¶
type FailedDetails struct {
Payload string `json:"payload" validate:"required"`
TestCase string `json:"test_case" validate:"required,printascii"`
TestSet string `json:"test_set" validate:"required,printascii"`
Encoder string `json:"encoder" validate:"required,printascii"`
Placeholder string `json:"placeholder" validate:"required,printascii"`
Reason []string `json:"reason" validate:"omitempty,dive,required"`
Type string `json:"type" validate:"omitempty"`
}
type Placeholder ¶ added in v0.4.4
type Placeholder struct {
Name string
Config placeholder.PlaceholderConfig
}
func (*Placeholder) Hash ¶ added in v0.4.12
func (p *Placeholder) Hash() []byte
type RequestStats ¶ added in v0.5.4
type ScannedPaths ¶
type ScannedPaths []*Path
func (ScannedPaths) Len ¶
func (sp ScannedPaths) Len() int
func (ScannedPaths) Less ¶
func (sp ScannedPaths) Less(i, j int) bool
func (ScannedPaths) Sort ¶
func (sp ScannedPaths) Sort()
func (ScannedPaths) Swap ¶
func (sp ScannedPaths) Swap(i, j int)
type Statistics ¶
type Statistics struct {
IsGrpcAvailable bool
IsGraphQLAvailable bool
Paths ScannedPaths
TestCasesFingerprint string
TruePositiveTests TestsSummary
TrueNegativeTests TestsSummary
Score struct {
ApiSec Score
AppSec Score
Average float64
}
}
type SummaryTableRow ¶
type SummaryTableRow struct {
TestSet string `json:"test_set" validate:"required,printascii,max=256"`
TestCase string `json:"test_case" validate:"required,printascii,max=256"`
Percentage float64 `json:"percentage" validate:"min=0,max=100"`
Sent int `json:"sent" validate:"min=0"`
Blocked int `json:"blocked" validate:"min=0"`
Bypassed int `json:"bypassed" validate:"min=0"`
Unresolved int `json:"unresolved" validate:"min=0"`
Failed int `json:"failed" validate:"min=0"`
}
type TestDetails ¶
type TestsSummary ¶ added in v0.5.3
type TestsSummary struct {
SummaryTable []*SummaryTableRow
Blocked []*TestDetails
Bypasses []*TestDetails
Unresolved []*TestDetails
Failed []*FailedDetails
ReqStats RequestStats
ApiSecReqStats RequestStats
AppSecReqStats RequestStats
UnresolvedRequestsPercentage float64
ResolvedBlockedRequestsPercentage float64
ResolvedBypassedRequestsPercentage float64
FailedRequestsPercentage float64
}
Click to show internal directories.
Click to hide internal directories.