json

package
v0.1.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cvss

type Cvss struct {
	BaseScore           float64  `json:"base-score"`
	ExploitabilityScore *float64 `json:"exploitability-score,omitempty"`
	ImpactScore         *float64 `json:"impact-score,omitempty"`
	Vector              string   `json:"vector"`
}

type Finding

type Finding struct {
	Vulnerability Vulnerability     `json:"vulnerability"`
	MatchDetails  MatchDetails      `json:"matched-by"`
	Artifact      syftJson.Artifact `json:"artifact"`
}

Finding is a single item for the JSON array reported

type MatchDetails

type MatchDetails struct {
	Matcher   string `json:"matcher"`
	SearchKey string `json:"search-key"`
}

MatchDetails contains all data that indicates how the result match was found

type Presenter

type Presenter struct {
	// contains filtered or unexported fields
}

Presenter is a generic struct for holding fields needed for reporting

func NewPresenter

func NewPresenter(results result.Result, catalog *pkg.Catalog, theScope scope.Scope, metadataProvider vulnerability.MetadataProvider) *Presenter

NewPresenter is a *Presenter constructor

func (*Presenter) Present

func (pres *Presenter) Present(output io.Writer) error

Present creates a JSON-based reporting

type Vulnerability

type Vulnerability struct {
	ID          string   `json:"id"`
	Severity    string   `json:"severity,omitempty"`
	Links       []string `json:"links,omitempty"`
	Description string   `json:"description,omitempty"`
	CvssV2      *Cvss    `json:"cvss-v2,omitempty"`
	CvssV3      *Cvss    `json:"cvss-v3,omitempty"`
}

func NewVulnerability

func NewVulnerability(m match.Match, metadata *vulnerability.Metadata) Vulnerability

Jump to

Keyboard shortcuts

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