Documentation ¶
Index ¶
- Constants
- Variables
- func AddFindingOnShortReport(shortReport *restapi.ShortTestReport, path string, verb string, ...) error
- func ConvertRawFindingToAPIFinding(finding restapi.RawFindings) *common.APIFinding
- func CopyTestFromTestWithReport(fullTest restapi.TestWithReport) restapi.Test
- func NewFinding(name string, description string, risk string) restapi.Finding
- func NewRawFindings(message string, severity string, findingType string) restapi.RawFindings
- func NewReport() restapi.FuzzingStatusAndReport
- type API
- func (api *API) AddErrorOnLastTest(fuzzerError error)
- func (api *API) AddNewStatusReport(report restapi.FuzzingStatusAndReport) error
- func (api *API) ForceProgressForLastTest(progress int) error
- func (api *API) GetLastAPIFindings() *[]common.APIFinding
- func (api *API) GetLastFindings() *[]restapi.Finding
- func (api *API) GetLastReport() *restapi.FuzzingStatusAndReport
- func (api *API) GetLastShortStatus() (*restapi.ShortTestReport, error)
- func (api *API) GetLastStatus() (restapi.FuzzingStatusEnum, error)
- func (api *API) GetLastStatusError() (string, error)
- func (api *API) GetLastTest() *restapi.TestWithReport
- func (api *API) GetShortStatusOnError(msg string) (*restapi.ShortTestReport, error)
- func (api *API) GetTestByTimestamp(timestamp int64) *restapi.TestWithReport
- func (api *API) GetTestShortReportByTimestamp(timestamp int64) (*restapi.ShortTestReport, error)
- func (api *API) GetTestsList() *[]restapi.Test
- func (api *API) RetrieveInfoFromStore(ctx context.Context, accessor core.BackendAccessor, moduleName string) error
- func (api *API) SetErrorForLastStatus(msg string) error
- func (api *API) StartFuzzing(params *FuzzingInput) (FuzzingTimestamp, error)
- func (api *API) StopFuzzing(fuzzerError error) error
- func (api *API) StoreLastFindingsData(ctx context.Context, accessor core.BackendAccessor, moduleName string, ...) error
- func (api *API) StoreReportData(ctx context.Context, accessor core.BackendAccessor, moduleName string, ...) error
- type FuzzingInput
- type FuzzingTimestamp
- type Model
- func (m *Model) AddAPI(id uint, name string, port uint, service string) *API
- func (m *Model) AddAPITest(apiID uint, message string) error
- func (m *Model) GetAPI(ctx context.Context, apiID uint) (*API, error)
- func (m *Model) Init(ctx context.Context) error
- func (m *Model) ReceiveFullReport(ctx context.Context, apiID uint, body []byte) error
- func (m *Model) StartAPIFuzzing(ctx context.Context, apiID uint, params *FuzzingInput) (FuzzingTimestamp, error)
- func (m *Model) StopAPIFuzzing(ctx context.Context, apiID uint, fuzzerError error) error
- type TestItem
Constants ¶
View Source
const ( AnnotationReportName = "fuzzer_report" AnnotationFindingsName = "fuzzer_findings" OneHundredPercentConstant = 100 ReportNameCRUDPrefix = "definitions:" ReportNameSCNFuzzerPrefix = "path:" ReportNameRestlerPrefix = "restler" MinLocationTokensNumber = 4 DefaultErrorMsg = "An error occurred during the test" )
Variables ¶
View Source
var ZeroTime = time.Time{}.Unix()
ZeroTime The zero timestamp to use.
Functions ¶
func AddFindingOnShortReport ¶
func AddFindingOnShortReport(shortReport *restapi.ShortTestReport, path string, verb string, finding restapi.RawFindings) error
func ConvertRawFindingToAPIFinding ¶
func ConvertRawFindingToAPIFinding(finding restapi.RawFindings) *common.APIFinding
func CopyTestFromTestWithReport ¶
func CopyTestFromTestWithReport(fullTest restapi.TestWithReport) restapi.Test
func NewRawFindings ¶
func NewRawFindings(message string, severity string, findingType string) restapi.RawFindings
func NewReport ¶
func NewReport() restapi.FuzzingStatusAndReport
Types ¶
type API ¶
type API struct { ID uint Name string Port uint Namespace string Fuzzed bool InFuzzing bool TestsList []*TestItem }
func (*API) AddErrorOnLastTest ¶
func (*API) AddNewStatusReport ¶
func (api *API) AddNewStatusReport(report restapi.FuzzingStatusAndReport) error
func (*API) ForceProgressForLastTest ¶
func (*API) GetLastAPIFindings ¶
func (api *API) GetLastAPIFindings() *[]common.APIFinding
func (*API) GetLastFindings ¶
func (*API) GetLastReport ¶
func (api *API) GetLastReport() *restapi.FuzzingStatusAndReport
func (*API) GetLastShortStatus ¶
func (api *API) GetLastShortStatus() (*restapi.ShortTestReport, error)
func (*API) GetLastStatus ¶
func (api *API) GetLastStatus() (restapi.FuzzingStatusEnum, error)
func (*API) GetLastStatusError ¶
func (*API) GetLastTest ¶
func (api *API) GetLastTest() *restapi.TestWithReport
func (*API) GetShortStatusOnError ¶
func (api *API) GetShortStatusOnError(msg string) (*restapi.ShortTestReport, error)
func (*API) GetTestByTimestamp ¶
func (api *API) GetTestByTimestamp(timestamp int64) *restapi.TestWithReport
func (*API) GetTestShortReportByTimestamp ¶
func (api *API) GetTestShortReportByTimestamp(timestamp int64) (*restapi.ShortTestReport, error)
func (*API) GetTestsList ¶
Return a list of tests with reduced informations.
func (*API) RetrieveInfoFromStore ¶
func (*API) SetErrorForLastStatus ¶
func (*API) StartFuzzing ¶
func (api *API) StartFuzzing(params *FuzzingInput) (FuzzingTimestamp, error)
func (*API) StopFuzzing ¶
func (*API) StoreLastFindingsData ¶
func (*API) StoreReportData ¶
func (api *API) StoreReportData(ctx context.Context, accessor core.BackendAccessor, moduleName string, data restapi.FuzzingStatusAndReport) error
type FuzzingInput ¶
type FuzzingInput struct { Auth *restapi.AuthorizationScheme Depth restapi.TestInputDepthEnum SpecsInfo *tools.FuzzerSpecsInfo }
FuzzingInput: a struct to store all input parameters for fuzzing.
type FuzzingTimestamp ¶
type FuzzingTimestamp = int64
FuzzingTimestamp the type used for our Timestamp.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model: The Model struct.
func NewModel ¶
func NewModel(ctx core.BackendAccessor) *Model
func (*Model) ReceiveFullReport ¶
func (*Model) StartAPIFuzzing ¶
func (m *Model) StartAPIFuzzing(ctx context.Context, apiID uint, params *FuzzingInput) (FuzzingTimestamp, error)
type TestItem ¶
type TestItem struct { Test *restapi.TestWithReport SpecsInfo *tools.FuzzerSpecsInfo }
* A TestItem will link a report with the corresponding spec that generate the report.
Click to show internal directories.
Click to hide internal directories.