Documentation
¶
Index ¶
- type Component
- type Options
- type Product
- type ProductData
- type Protecode
- func (pc *Protecode) DeclareFetchURL(cleanupMode, group, fetchURL string) *ResultData
- func (pc *Protecode) DeleteScan(cleanupMode string, productID int)
- func (pc *Protecode) LoadExistingProduct(group string, reuseExisting bool) int
- func (pc *Protecode) LoadReport(reportFileName string, productID int) *io.ReadCloser
- func (pc *Protecode) ParseResultForInflux(result Result, excludeCVEs string) (map[string]int, []Vuln)
- func (pc *Protecode) PollForResult(productID int, timeOutInMinutes string) ResultData
- func (pc *Protecode) SetOptions(options Options)
- func (pc *Protecode) UploadScanFile(cleanupMode, group, filePath, fileName string) *ResultData
- type Result
- type ResultData
- type Triage
- type User
- type Vuln
- type Vulnerability
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Component ¶
type Component struct {
Vulns []Vulnerability `json:"vulns,omitempty"`
}
Component the protecode component information
type Options ¶
type Options struct {
ServerURL string
Duration time.Duration
Username string
Password string
Logger *logrus.Entry
}
Options struct which can be used to configure the Protecode struct
type Product ¶
type Product struct {
ProductID int `json:"product_id,omitempty"`
}
Product holds the id of the protecode product
type ProductData ¶
type ProductData struct {
Products []Product `json:"products,omitempty"`
}
ProductData holds the product information of the protecode product
type Protecode ¶
type Protecode struct {
// contains filtered or unexported fields
}
Protecode ist the protecode client which is used by the step
func (*Protecode) DeclareFetchURL ¶
func (pc *Protecode) DeclareFetchURL(cleanupMode, group, fetchURL string) *ResultData
DeclareFetchURL configures the fetch url for the protecode scan
func (*Protecode) DeleteScan ¶
DeleteScan deletes if configured the scan on the protecode server
func (*Protecode) LoadExistingProduct ¶
LoadExistingProduct loads the existing product from protecode service
func (*Protecode) LoadReport ¶
func (pc *Protecode) LoadReport(reportFileName string, productID int) *io.ReadCloser
LoadReport loads the report of the protecode scan
func (*Protecode) ParseResultForInflux ¶
func (pc *Protecode) ParseResultForInflux(result Result, excludeCVEs string) (map[string]int, []Vuln)
ParseResultForInflux parses the result from the scan into the internal format
func (*Protecode) PollForResult ¶
func (pc *Protecode) PollForResult(productID int, timeOutInMinutes string) ResultData
PollForResult polls the protecode scan for the result scan
func (*Protecode) SetOptions ¶
SetOptions setter function to set the internal properties of the protecode
func (*Protecode) UploadScanFile ¶
func (pc *Protecode) UploadScanFile(cleanupMode, group, filePath, fileName string) *ResultData
UploadScanFile upload the scan file to the protecode server
type Result ¶
type Result struct {
ProductID int `json:"product_id,omitempty"`
ReportURL string `json:"report_url,omitempty"`
Status string `json:"status,omitempty"`
Components []Component `json:"components,omitempty"`
}
Result holds the detail information about the protecode result
type ResultData ¶
type ResultData struct {
Result Result `json:"results,omitempty"`
}
ResultData holds the information about the protecode result
type Triage ¶
type Triage struct {
ID int `json:"id,omitempty"`
VulnID string `json:"vuln_id,omitempty"`
Component string `json:"component,omitempty"`
Vendor string `json:"vendor,omitempty"`
Codetype string `json:"codetype,omitempty"`
Version string `json:"version,omitempty"`
Modified string `json:"modified,omitempty"`
Scope string `json:"scope,omitempty"`
Description string `json:"description,omitempty"`
User User `json:"user,omitempty"`
}
Triage holds the triaging information
type User ¶
type User struct {
ID int `json:"id,omitempty"`
Email string `json:"email,omitempty"`
Girstname string `json:"firstname,omitempty"`
Lastname string `json:"lastname,omitempty"`
Username string `json:"username,omitempty"`
}
User holds the user information
type Vuln ¶
type Vuln struct {
Cve string `json:"cve,omitempty"`
Cvss float64 `json:"cvss,omitempty"`
Cvss3Score string `json:"cvss3_score,omitempty"`
}
Vuln holds the inforamtion about the vulnerability
type Vulnerability ¶
type Vulnerability struct {
Exact bool `json:"exact,omitempty"`
Vuln Vuln `json:"vuln,omitempty"`
Triage []Triage `json:"triage,omitempty"`
}
Vulnerability the protecode vulnerability information