report

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorDetails

type ErrorDetails struct {
	Id       string    `json:"id,omitempty"`
	Name     string    `json:"name,omitempty"`
	Severity *Severity `json:"severity,omitempty"`
}

type ErrorType

type ErrorType string
const (
	ErrorType_UNKNOWN_ERROR     ErrorType = "UNKNOWN_ERROR"
	ErrorType_COMPILATION_ERROR ErrorType = "COMPILATION_ERROR"
	ErrorType_CRASH             ErrorType = "CRASH"
	ErrorType_WARNING           ErrorType = "WARNING"
	ErrorType_RUNTIME_ERROR     ErrorType = "RUNTIME_ERROR"
)

These constants must have this exact value (in uppercase) to be able to parse JSON-marshalled reports as protobuf reports which use an enum for this field.

type Finding

type Finding struct {
	Name               string        `json:"name,omitempty"`
	Type               ErrorType     `json:"type,omitempty"`
	InputData          []byte        `json:"input_data,omitempty"`
	Logs               []string      `json:"logs,omitempty"`
	Details            string        `json:"details,omitempty"`
	HumanReadableInput string        `json:"human_readable_input,omitempty"`
	MoreDetails        *ErrorDetails `json:"more_details,omitempty"`
	Tag                uint64        `json:"tag,omitempty"`
	ShortDescription   string        `json:"short_description,omitempty"`
	InputFile          string
}

func (*Finding) GetDetails

func (f *Finding) GetDetails() string

func (*Finding) Save

func (f *Finding) Save() error

type FuzzingMetric

type FuzzingMetric struct {
	Timestamp               time.Time `json:"timestamp,omitempty"`
	ExecutionsPerSecond     int32     `json:"executions_per_second,omitempty"`
	Features                int32     `json:"features,omitempty"`
	CorpusSize              int32     `json:"corpus_size,omitempty"`
	SecondsSinceLastFeature uint64    `json:"seconds_since_last_coverage,omitempty"`
	TotalExecutions         uint64    `json:"total_executions,omitempty"`
	Edges                   int32     `json:"edges,omitempty"`
	SecondsSinceLastEdge    uint64    `json:"seconds_since_last_edge,omitempty"`
}

type Handler

type Handler interface {
	Handle(report *Report) error
}

type Report

type Report struct {
	Status   RunStatus      `json:"status,omitempty"`
	Metric   *FuzzingMetric `json:"metric,omitempty"`
	Finding  *Finding       `json:"finding,omitempty"`
	NumSeeds uint           `json:"num_seeds,omitempty"`
}

func (*Report) GetFinding

func (x *Report) GetFinding() *Finding

type RunStatus

type RunStatus string
const (
	RunStatus_RUNSTATUS_UNSPECIFIED      RunStatus = "UNSPECIFIED"
	RunStatus_PENDING                    RunStatus = "PENDING"
	RunStatus_COMPILING                  RunStatus = "COMPILING"
	RunStatus_RUNNING                    RunStatus = "RUNNING"
	RunStatus_STOPPED                    RunStatus = "STOPPED"
	RunStatus_FAILED                     RunStatus = "FAILED"
	RunStatus_SUCCEEDED                  RunStatus = "SUCCEEDED"
	RunStatus_UNKNOWN                    RunStatus = "UNKNOWN"
	RunStatus_INITIALIZING               RunStatus = "INITIALIZING"
	RunStatus_FAILED_TO_START            RunStatus = "FAILED_TO_START"
	RunStatus_WAITING_FOR_FUZZING_AGENTS RunStatus = "WAITING_FOR_FUZZING_AGENTS"
)

These constants must have this exact value (in uppercase) to be able to parse JSON-marshalled reports as protobuf reports which use an enum for this field.

type Severity

type Severity struct {
	Description string  `json:"description,omitempty"`
	Score       float32 `json:"score,omitempty"`
}

Jump to

Keyboard shortcuts

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