tools

package
v0.0.0-...-6cfc1b2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SeverityToNumber = map[string]int{string(oapicommon.INFO): 1, string(oapicommon.LOW): 2, string(oapicommon.MEDIUM): 3, string(oapicommon.HIGH): 4, string(oapicommon.CRITICAL): 5} // nolint:gomnd

SeverityToNumber A map to used to compare Severity.

Functions

func ConvertLocalToGlobalReportTag

func ConvertLocalToGlobalReportTag(from *[]restapi.FuzzingReportTag) *[]global.FuzzingReportTag

func FindRoute

func FindRoute(router *routers.Router, verb string, uri string) (*routers.Route, error)

func GetAuthStringFromParam

func GetAuthStringFromParam(params *restapi.AuthorizationScheme) (string, error)

Create a string that contain the user auth material, on Fuzzer format. This will be usedto send in ENV parameter to fuzzer.

func GetBasePathFromURL

func GetBasePathFromURL(URL string) string

func GetBasePathsFromServers

func GetBasePathsFromServers(servers *openapi3.Servers) []string

func GetHTTPCodeFromFindingType

func GetHTTPCodeFromFindingType(findingtype string) int

Retrieve HTTP result code associated to restler item.

func GetTimeBudgetFromParam

func GetTimeBudgetFromParam(param restapi.TestInputDepthEnum) (string, error)

func IsDone

func IsDone(report *restapi.FuzzingStatusAndReport) bool

func IsGreaterSeverity

func IsGreaterSeverity(severity1 oapicommon.Severity, severity2 oapicommon.Severity) bool

func IsV2Specification

func IsV2Specification(data []byte) bool

func IsV3Specification

func IsV3Specification(data []byte) bool

func LoadSpec

func LoadSpec(spec []byte) (*openapi3.T, error)

func NewFuzzingReportPath

func NewFuzzingReportPath(result int, verb string, uri string) restapi.FuzzingReportPath

Create new FuzzingReportPath.

Types

type AuthSecret

type AuthSecret struct {
	// contains filtered or unexported fields
}

func NewSecret

func NewSecret(namespace string) (*AuthSecret, error)

func (*AuthSecret) Delete

func (s *AuthSecret) Delete(_ context.Context, client kubernetes.Interface) error

func (*AuthSecret) Key

func (s *AuthSecret) Key() string

func (*AuthSecret) Name

func (s *AuthSecret) Name() string

func (*AuthSecret) Save

func (s *AuthSecret) Save(_ context.Context, client kubernetes.Interface) error

func (*AuthSecret) Set

func (s *AuthSecret) Set(value string)

type FuzzerSpecsInfo

type FuzzerSpecsInfo struct {
	ProvidedSpec          string
	ReconstructedSpec     string
	ProvidedSpecInfo      *models.SpecInfo
	ReconstructedSpecInfo *models.SpecInfo
}

FuzzerSpecInfo An object containing info about a spec.

func GetAPISpecsInfo

func GetAPISpecsInfo(ctx context.Context, accessor core.BackendAccessor, apiID uint) (*FuzzerSpecsInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL