Documentation
¶
Index ¶
Constants ¶
View Source
const ( SeverityInfo = Severity("info") SeverityLow = Severity("low") SeverityMedium = Severity("medium") SeverityHigh = Severity("high") SeverityError = Severity("error") )
View Source
const ( ActivityReported = ActivityType("reported") // the issue was reported by plugin or user ActivityConfirmed = ActivityType("confirmed") // the issue was confirmed by someone ActivityMuted = ActivityType("muted") // go away! I'll fix you later ActivityUnmuted = ActivityType("unmuted") ActivityFalse = ActivityType("false") // set to false ActivityTrue = ActivityType("true") // set to true ActivityResolved = ActivityType("resolved") ActivityReopened = ActivityType("reopened") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityType ¶
type ActivityType string
func (ActivityType) Convert ¶
func (t ActivityType) Convert(text string) (interface{}, error)
func (ActivityType) Enum ¶
func (t ActivityType) Enum() []interface{}
func (ActivityType) MarshalJSON ¶
func (t ActivityType) MarshalJSON() ([]byte, error)
It's a hack to show custom type as string in swagger
type HttpEntity ¶
type HttpTransaction ¶
type HttpTransaction struct {
Id int `json:"id,omitempty"`
Url string `json:"url"`
Params []string `json:"params,omitempty"`
Method string `json:"method"`
Request *HttpEntity `json:"request,omitempty"`
Response *HttpEntity `json:"response,omitempty"`
}
type Issue ¶
type Issue struct {
UniqId string `json:"uniqId,omitempty" bson:"uniqId" description:"id for merging similar issues"`
Summary string `json:"summary"`
VulnType int `json:"vulnType,omitempty" bson:"vulnType" description:"vulnerability type from vulndb"`
Severity Severity `json:"severity"`
References []*Reference `json:"references,omitempty" bson:"references" description:"information about vulnerability"`
Extras []*Extra `json:"extras,omitempty" bson:"extras" description:"information about vulnerability, deprecated"`
Desc string `json:"desc,omitempty"`
Vector *Vector `json:"vector,omitempty"`
}
func (*Issue) GenerateUniqId ¶
type Severity ¶
type Severity string
func (Severity) MarshalJSON ¶
It's a hack to show custom type as string in swagger
type TargetIssue ¶
type TargetIssue struct {
Id bson.ObjectId `json:"id,omitempty" bson:"_id"`
Target bson.ObjectId `json:"target"`
Project bson.ObjectId `json:"project"`
Created time.Time `json:"created,omitempty" description:"when issue is created"`
Updated time.Time `json:"updated,omitempty" description:"when issue is updated"`
ResolvedAt time.Time `json:"resolvedAt,omitempty" bson:"resolvedAt" description:"resolved time"`
Activities []*Activity `json:"activities,omitempty"`
// usually this field is taken from the last report
Issue `json:",inline" bson:",inline"`
Status `json:",inline" bson:",inline"`
}
func (*TargetIssue) AddReportActivity ¶
func (i *TargetIssue) AddReportActivity(reportId, scanId, sessionId bson.ObjectId)
func (*TargetIssue) AddUserReportActivity ¶
func (i *TargetIssue) AddUserReportActivity(userId bson.ObjectId)
type TargetIssueList ¶
type TargetIssueList struct {
pagination.Meta `json:",inline"`
Results []*TargetIssue `json:"results"`
}
type Vector ¶
type Vector struct {
Url string `json:"url,omitempty" description:"where this issue is happened"`
HttpTransactions []*HttpTransaction `json:"httpTransactions,omitempty" bson:"httpTransactions"`
}
Click to show internal directories.
Click to hide internal directories.