issue

package
v0.0.0-...-c937b9e Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2015 License: MIT Imports: 8 Imported by: 23

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 Activity

type Activity struct {
	Type    ActivityType `json:"type"`
	Created time.Time    `json:"created"`

	User   bson.ObjectId `json:"user,omitempty" bson:",omitempty" description:"who did the activity"`
	Report *Report       `json:"report,omitempty" description:"link to report for reported activity"`
}

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 Extra

type Extra struct {
	Url   string `json:"url" description:""`
	Title string `json:"title"`
}

type HttpBody

type HttpBody struct {
	ContentEncoding string `json:"contentEncoding"`
	Content         string `json:"content"`
}

type HttpEntity

type HttpEntity struct {
	Status string      `json:"status"`
	Header http.Header `json:"header"`
	Body   *HttpBody   `json:"body,omitempty"`
}

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

func (i *Issue) GenerateUniqId() string

type Reference

type Reference struct {
	Url   string `json:"url"`
	Title string `json:"title,omitempty"`
}

type Report

type Report struct {
	Report      bson.ObjectId `json:"report" description:"report id"`
	Scan        bson.ObjectId `json:"scan,omitempty" description:"scan id"`
	ScanSession bson.ObjectId `json:"scanSession,omitempty" bson:"scanSession" description:"scan session id"`
}

type Severity

type Severity string

func (Severity) Convert

func (t Severity) Convert(text string) (interface{}, error)

func (Severity) Enum

func (t Severity) Enum() []interface{}

func (Severity) MarshalJSON

func (t Severity) MarshalJSON() ([]byte, error)

It's a hack to show custom type as string in swagger

type Status

type Status struct {
	Confirmed bool `json:"confirmed" description:"the issue was confirmed by someone"`
	False     bool `json:"false"`
	Muted     bool `json:"muted"`
	Resolved  bool `json:"resolved"`
}

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"`
}

Jump to

Keyboard shortcuts

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