output

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CauseMetadata added in v0.1.0

type CauseMetadata struct {
	Resource string
	Provider string
	Service  string
	Code     Code
}

type Code added in v0.1.0

type Code struct {
	Lines []Line
}

type DataSource added in v0.0.5

type DataSource struct {
	ID   string
	Name string
	URL  string
}

type Issue added in v0.3.0

type Issue interface {
	// GetType returns the IssueType
	GetType() IssueType

	// GetID returns the ID of the issue.
	GetID() string

	// GetTitle returns the title of the issue.
	GetTitle() string

	// GetDescription returns the description of the issue.
	GetDescription() string

	// GetDatasourceName returns the name of the datasource.
	GetDatasourceName() string

	// GetSeverity returns the severity of the issue.
	GetSeverity() string

	// GetSeveritySource returns the severity source of the issue.
	GetSeveritySource() string

	// GetPackageName returns the package name
	GetPackageName() string

	// GetPackagePath returns the package path
	GetPackagePath() string

	// GetPrimaryURL returns the primary URL
	GetPrimaryURL() string

	// GetInstalledVersion returns the installed version
	GetInstalledVersion() string

	// GetFixedVersion returns the fixed version
	GetFixedVersion() string

	// GetReferences returns the references
	GetReferences() []string

	// GetCVSS returns the CVSS
	GetCVSS() map[string]interface{}

	// GetMisconfigurationType returns the misconfiguration type
	GetMisconfigurationType() string

	// GetMessage returns the message
	GetMessage() string

	// GetResolution returns the resolution
	GetResolution() string

	// GetStatus returns the status
	GetStatus() string

	// GetCauseMetadata returns the cause metadata
	GetCauseMetadata() CauseMetadata

	// GetMatch returns the match
	GetMatch() string

	// GetDeleted returns the deleted
	GetDeleted() string
}

Issue is the interface that makes the shared SummaryWidget possible

type IssueType added in v0.3.0

type IssueType int
const (
	IssueTypeMisconfiguration IssueType = iota
	IssueTypeVulnerability
	IssueTypeSecret
)

type Line added in v0.3.0

type Line struct {
	Number     int
	Content    string
	IsCause    bool
	Annotation string
	Truncated  bool
	FirstCause bool
	LastCause  bool
}

type Misconfiguration added in v0.1.0

type Misconfiguration struct {
	Type          string
	ID            string
	Title         string
	Description   string
	Message       string
	Resolution    string
	Severity      string
	Status        string
	CauseMetadata CauseMetadata
	References    []string
}

func (Misconfiguration) GetCVSS added in v0.3.0

func (m Misconfiguration) GetCVSS() map[string]interface{}

func (Misconfiguration) GetCauseMetadata added in v0.3.0

func (m Misconfiguration) GetCauseMetadata() CauseMetadata

func (Misconfiguration) GetDatasourceName added in v0.3.0

func (m Misconfiguration) GetDatasourceName() string

func (Misconfiguration) GetDeleted added in v0.3.0

func (m Misconfiguration) GetDeleted() string

func (Misconfiguration) GetDescription added in v0.3.0

func (m Misconfiguration) GetDescription() string

func (Misconfiguration) GetFixedVersion added in v0.3.0

func (m Misconfiguration) GetFixedVersion() string

func (Misconfiguration) GetID added in v0.3.0

func (m Misconfiguration) GetID() string

func (Misconfiguration) GetInstalledVersion added in v0.3.0

func (m Misconfiguration) GetInstalledVersion() string

func (Misconfiguration) GetMatch added in v0.3.0

func (m Misconfiguration) GetMatch() string

func (Misconfiguration) GetMessage added in v0.3.0

func (m Misconfiguration) GetMessage() string

func (Misconfiguration) GetMisconfigurationType added in v0.3.0

func (m Misconfiguration) GetMisconfigurationType() string

func (Misconfiguration) GetPackageName added in v0.3.0

func (m Misconfiguration) GetPackageName() string

func (Misconfiguration) GetPackagePath added in v0.3.0

func (m Misconfiguration) GetPackagePath() string

func (Misconfiguration) GetPrimaryURL added in v0.3.0

func (m Misconfiguration) GetPrimaryURL() string

func (Misconfiguration) GetReferences added in v0.3.0

func (m Misconfiguration) GetReferences() []string

func (Misconfiguration) GetResolution added in v0.3.0

func (m Misconfiguration) GetResolution() string

func (Misconfiguration) GetSeverity added in v0.3.0

func (m Misconfiguration) GetSeverity() string

func (Misconfiguration) GetSeveritySource added in v0.3.0

func (m Misconfiguration) GetSeveritySource() string

func (Misconfiguration) GetStatus added in v0.3.0

func (m Misconfiguration) GetStatus() string

func (Misconfiguration) GetTitle added in v0.3.0

func (m Misconfiguration) GetTitle() string

func (Misconfiguration) GetType added in v0.3.0

func (m Misconfiguration) GetType() IssueType

type Report

type Report struct {
	ImageName     string
	Results       []*Result
	SeverityMap   map[string][]*Result
	SeverityCount map[string]int
	// contains filtered or unexported fields
}

func FromJSON added in v0.0.2

func FromJSON(imageName string, content string) (*Report, error)

func (*Report) GetResultForTarget added in v0.3.0

func (r *Report) GetResultForTarget(target string) (*Result, error)

func (*Report) GetTotalMisconfigurations added in v0.1.0

func (r *Report) GetTotalMisconfigurations() int

func (*Report) GetTotalVulnerabilities added in v0.1.0

func (r *Report) GetTotalVulnerabilities() int

func (*Report) HasIssues added in v0.2.0

func (r *Report) HasIssues() bool

func (*Report) Process added in v0.1.0

func (r *Report) Process()

type Result

type Result struct {
	Target            string
	Issues            []Issue
	Vulnerabilities   []Vulnerability
	Misconfigurations []Misconfiguration
	Secrets           []Secret
}

func (*Result) GetIssuesForSeverity added in v0.3.0

func (r *Result) GetIssuesForSeverity(severity string) []Issue

func (*Result) GetSeverityCounts added in v0.1.0

func (r *Result) GetSeverityCounts() map[string]int

func (*Result) HasIssues added in v0.3.0

func (r *Result) HasIssues() bool

type Secret added in v0.3.0

type Secret struct {
	RuleID   string
	Category string
	Severity string
	Title    string
	Match    string
	Deleted  bool
}

func (Secret) GetCVSS added in v0.3.0

func (s Secret) GetCVSS() map[string]interface{}

func (Secret) GetCauseMetadata added in v0.3.0

func (s Secret) GetCauseMetadata() CauseMetadata

func (Secret) GetDatasourceName added in v0.3.0

func (s Secret) GetDatasourceName() string

func (Secret) GetDeleted added in v0.3.0

func (s Secret) GetDeleted() string

func (Secret) GetDescription added in v0.3.0

func (s Secret) GetDescription() string

func (Secret) GetFixedVersion added in v0.3.0

func (s Secret) GetFixedVersion() string

func (Secret) GetID added in v0.3.0

func (s Secret) GetID() string

func (Secret) GetInstalledVersion added in v0.3.0

func (s Secret) GetInstalledVersion() string

func (Secret) GetMatch added in v0.3.0

func (s Secret) GetMatch() string

func (Secret) GetMessage added in v0.3.0

func (s Secret) GetMessage() string

func (Secret) GetMisconfigurationType added in v0.3.0

func (s Secret) GetMisconfigurationType() string

func (Secret) GetPackageName added in v0.3.0

func (s Secret) GetPackageName() string

func (Secret) GetPackagePath added in v0.3.0

func (s Secret) GetPackagePath() string

func (Secret) GetPrimaryURL added in v0.3.0

func (s Secret) GetPrimaryURL() string

func (Secret) GetReferences added in v0.3.0

func (s Secret) GetReferences() []string

func (Secret) GetResolution added in v0.3.0

func (s Secret) GetResolution() string

func (Secret) GetSeverity added in v0.3.0

func (s Secret) GetSeverity() string

func (Secret) GetSeveritySource added in v0.3.0

func (s Secret) GetSeveritySource() string

func (Secret) GetStatus added in v0.3.0

func (s Secret) GetStatus() string

func (Secret) GetTitle added in v0.3.0

func (s Secret) GetTitle() string

func (Secret) GetType added in v0.3.0

func (s Secret) GetType() IssueType

type Vulnerability

type Vulnerability struct {
	VulnerabilityID  string
	DataSource       *DataSource
	Title            string
	Description      string
	Severity         string
	SeveritySource   string
	PkgName          string
	PkgPath          string
	PrimaryURL       string
	InstalledVersion string
	FixedVersion     string
	References       []string
	CVSS             map[string]interface{}
}

func (Vulnerability) GetCVSS added in v0.3.0

func (v Vulnerability) GetCVSS() map[string]interface{}

func (Vulnerability) GetCauseMetadata added in v0.3.0

func (v Vulnerability) GetCauseMetadata() CauseMetadata

func (Vulnerability) GetDatasourceName added in v0.3.0

func (v Vulnerability) GetDatasourceName() string

func (Vulnerability) GetDeleted added in v0.3.0

func (v Vulnerability) GetDeleted() string

func (Vulnerability) GetDescription added in v0.3.0

func (v Vulnerability) GetDescription() string

func (Vulnerability) GetFixedVersion added in v0.3.0

func (v Vulnerability) GetFixedVersion() string

func (Vulnerability) GetID added in v0.3.0

func (v Vulnerability) GetID() string

func (Vulnerability) GetInstalledVersion added in v0.3.0

func (v Vulnerability) GetInstalledVersion() string

func (Vulnerability) GetMatch added in v0.3.0

func (v Vulnerability) GetMatch() string

func (Vulnerability) GetMessage added in v0.3.0

func (v Vulnerability) GetMessage() string

func (Vulnerability) GetMisconfigurationType added in v0.3.0

func (v Vulnerability) GetMisconfigurationType() string

func (Vulnerability) GetPackageName added in v0.3.0

func (v Vulnerability) GetPackageName() string

func (Vulnerability) GetPackagePath added in v0.3.0

func (v Vulnerability) GetPackagePath() string

func (Vulnerability) GetPrimaryURL added in v0.3.0

func (v Vulnerability) GetPrimaryURL() string

func (Vulnerability) GetReferences added in v0.3.0

func (v Vulnerability) GetReferences() []string

func (Vulnerability) GetResolution added in v0.3.0

func (v Vulnerability) GetResolution() string

func (Vulnerability) GetSeverity added in v0.3.0

func (v Vulnerability) GetSeverity() string

func (Vulnerability) GetSeveritySource added in v0.3.0

func (v Vulnerability) GetSeveritySource() string

func (Vulnerability) GetStatus added in v0.3.0

func (v Vulnerability) GetStatus() string

func (Vulnerability) GetTitle added in v0.3.0

func (v Vulnerability) GetTitle() string

func (Vulnerability) GetType added in v0.3.0

func (v Vulnerability) GetType() IssueType

Jump to

Keyboard shortcuts

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