Documentation
¶
Index ¶
Constants ¶
View Source
const ( CommandAffected = "/affected" CommandNotAffected = "/not_affected" CommandFixed = "/fixed" CommandUnderInvestigation = "/under_investigation" JustificationComponentNotPresent = "component_not_present" JustificationVulnerableCodeNotPresent = "vulnerable_code_not_present" JustificationVulnerableCodeNotInExecutePath = "vulnerable_code_not_in_execute_path" JustificationVulnerableCodeCannotBeControlledByAdversary = "vulnerable_code_cannot_be_controlled_by_adversary" JustificationInlineMitigationsAlreadyExist = "inline_mitigations_already_exist" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Branch ¶
type Branch struct { // Repository URL Repository string `json:"repo"` // Name is the branch we're tracking Name string `json:"name"` // TargetCommit is the commit where we'll operate on. If blank, then the last // in the branch will be used. TargetCommit string `json:"-"` // LastCommit is the last commit seen in the branc LastCommit string `json:"-"` // ClonePath points to a local copy of the branch ClonePath string `json:"-"` }
func (*Branch) Identifier ¶
Identifier returns a URL that identifies the branch in the repo
func (*Branch) ToResourceDescriptor ¶
func (b *Branch) ToResourceDescriptor() *intoto.ResourceDescriptor
ToResourceDescriptor returns a representation of the branch as an intoto ResourceDescriptor suitable to use in an attestation.
func (*Branch) ToVexComponent ¶
ToVexComponent converts the branch data to an OpenVEX component ready to use in the product of a statement.
type Package ¶
type Repository ¶
type Repository struct {
Branches []Branch
}
type Scanner ¶
type Scanner interface {
GetBranchVulnerabilities(*Branch) ([]*Vulnerability, error)
}
type SlashCommand ¶
type SlashCommand struct { Command string Date time.Time Blurb string AuthorHandle string Raw string Notice *StatementNotice }
func (*SlashCommand) Subcommand ¶
func (sc *SlashCommand) Subcommand() string
func (*SlashCommand) VexJustification ¶
func (sc *SlashCommand) VexJustification() vex.Justification
func (*SlashCommand) VexStatus ¶
func (sc *SlashCommand) VexStatus() vex.Status
type StatementNotice ¶
type Triage ¶
type Triage struct { BackendID string `json:"backend_id"` Vulnerability *Vulnerability `json:"vulnerability"` Branch *Branch `json:"branch"` Status TriageStatus `json:"status"` SlashCommands []*SlashCommand `json:"-"` }
func (*Triage) LastCommand ¶
func (t *Triage) LastCommand() *SlashCommand
type TriageBackend ¶
type TriageStatus ¶
type TriageStatus string
const ( StatusClosed TriageStatus = "CLOSED" StatusWaitingForAsessment TriageStatus = "WAITING_USER" StatusWaitingForStatement TriageStatus = "WAITING_STATEMENT" StatusWaitingForClose TriageStatus = "FIN_WAIT" )
type VexPublisher ¶
type Vulnerability ¶
type Vulnerability struct { ID string `json:"id"` Aliases []string `json:"aliases"` Summary string `json:"-"` Details string `json:"-"` Component *Package `json:"component"` }
func (*Vulnerability) ComponentPurl ¶
func (vuln *Vulnerability) ComponentPurl() string
func (*Vulnerability) HasId ¶
func (vuln *Vulnerability) HasId(id string) bool
func (*Vulnerability) ToVex ¶
func (vuln *Vulnerability) ToVex() *vex.Vulnerability
func (*Vulnerability) ToVexVuln ¶
func (vuln *Vulnerability) ToVexVuln() *vex.Vulnerability
ToVexVuln converts the vulnerability to an openvex vuln
func (*Vulnerability) VexComponent ¶
func (vuln *Vulnerability) VexComponent() *vex.Component
Click to show internal directories.
Click to hide internal directories.