artifacts

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCoverageMode added in v0.8.1

func GetCoverageMode(inputFilename string) (coverage.CoverageMode, error)

func IsCoverageReport added in v0.8.1

func IsCoverageReport(inputFilename string) bool

Types

type CyclondexAffectedPackage

type CyclondexAffectedPackage struct {
	Ref string `json:"ref"`
}

type CyclonedxAdvisory

type CyclonedxAdvisory struct {
	URL string `json:"url"`
}

type CyclonedxComponent

type CyclonedxComponent struct {
	BOMRef  string `json:"bom-ref"`
	Name    string `json:"name"`
	Version string `json:"version"`
}

type CyclonedxRating

type CyclonedxRating struct {
	Source   CyclonedxSource `json:"source"`
	Severity string          `json:"severity"`
}

type CyclonedxReportMin

type CyclonedxReportMin struct {
	Components      []CyclonedxComponent     `json:"components"`
	Vulnerabilities []CyclonedxVulnerability `json:"vulnerabilities"`
}

CyclonedxReportMin is a minimum representation of an Cyclonedx scan report

It contains only the necessary fields for validation and listing

func (CyclonedxReportMin) AffectedPackages

func (r CyclonedxReportMin) AffectedPackages(vulnerabilityIndex int) string

func (*CyclonedxReportMin) SelectBySeverity

func (r *CyclonedxReportMin) SelectBySeverity(severity string) []CyclonedxVulnerability

type CyclonedxSource

type CyclonedxSource struct {
	Name string `json:"name"`
}

type CyclonedxVulnerability

type CyclonedxVulnerability struct {
	ID         string                     `json:"id"`
	Advisories []CyclonedxAdvisory        `json:"advisories"`
	Affects    []CyclondexAffectedPackage `json:"affects"`
	Ratings    []CyclonedxRating          `json:"ratings"`
}

func (*CyclonedxVulnerability) HighestSeverity

func (r *CyclonedxVulnerability) HighestSeverity() string

type GitLeaksReportMin

type GitLeaksReportMin []GitleaksFinding

func (*GitLeaksReportMin) Count

func (r *GitLeaksReportMin) Count() int

type GitleaksFinding

type GitleaksFinding struct {
	RuleID    string `json:"RuleID"`
	File      string `json:"File"`
	Commit    string `json:"Commit"`
	StartLine int    `json:"StartLine"`
}

func (*GitleaksFinding) CommitShort

func (f *GitleaksFinding) CommitShort() string

func (*GitleaksFinding) FileShort

func (f *GitleaksFinding) FileShort() string

type GrypeArtifact

type GrypeArtifact struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type GrypeDescriptor

type GrypeDescriptor struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type GrypeMatch

type GrypeMatch struct {
	Artifact      GrypeArtifact      `json:"artifact"`
	Vulnerability GrypeVulnerability `json:"vulnerability"`
}

type GrypeReportMin

type GrypeReportMin struct {
	Descriptor GrypeDescriptor `json:"descriptor"`
	Matches    []GrypeMatch    `json:"matches"`
}

GrypeReportMin is a minimum representation of an Anchore Grype scan report

It contains only the necessary fields for validation and listing

func (*GrypeReportMin) SelectBySeverity

func (g *GrypeReportMin) SelectBySeverity(severity string) []GrypeMatch

type GrypeVulnerability

type GrypeVulnerability struct {
	ID         string `json:"id"`
	Severity   string `json:"severity"`
	DataSource string `json:"dataSource"`
}

type SemgrepExtra

type SemgrepExtra struct {
	Severity string          `json:"severity"`
	Metadata SemgrepMetadata `json:"metadata"`
	Message  string          `json:"message"`
}

type SemgrepMetadata

type SemgrepMetadata struct {
	Category   string `json:"category"`
	Confidence string `json:"confidence"`
	CWE        any    `json:"cwe"`
	Impact     string `json:"impact"`
	Likelihood string `json:"likelihood"`
	Shortlink  string `json:"shortlink"`
	Owasp      any    `json:"owasp"`
}

func (*SemgrepMetadata) OwaspIDs

func (s *SemgrepMetadata) OwaspIDs() string

type SemgrepReportMin

type SemgrepReportMin struct {
	Version string           `json:"version"`
	Errors  []semgrepError   `json:"errors"`
	Results []SemgrepResults `json:"results"`
}

func (*SemgrepReportMin) SelectBySeverity

func (s *SemgrepReportMin) SelectBySeverity(severity string) []SemgrepResults

type SemgrepResults

type SemgrepResults struct {
	Extra   SemgrepExtra `json:"extra"`
	CheckID string       `json:"check_id"`
}

func (*SemgrepResults) ShortCheckID

func (s *SemgrepResults) ShortCheckID() string

Jump to

Keyboard shortcuts

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