assetversion

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: AGPL-3.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDependencyTree

func BuildDependencyTree(elements []models.ComponentDependency) tree

func CalculateDepth

func CalculateDepth(node *treeNode, currentDepth int, depthMap map[string]int)

func GetComponentDepth

func GetComponentDepth(elements []models.ComponentDependency) map[string]int

func NewService

func NewService(assetVersionRepository core.AssetVersionRepository, componentRepository core.ComponentRepository, dependencyVulnRepository core.DependencyVulnRepository, firstPartyVulnRepository core.FirstPartyVulnRepository, dependencyVulnService core.DependencyVulnService, firstPartyVulnService core.FirstPartyVulnService, assetRepository core.AssetRepository, projectRepository core.ProjectRepository, orgRepository core.OrganizationRepository, vulnEventRepository core.VulnEventRepository, componentService core.ComponentService, thirdPartyIntegration core.ThirdPartyIntegration, licenseRiskRepository core.LicenseRiskRepository, artifactService core.ArtifactService) *service

Types

type AssetVersionController

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

func NewAssetVersionController

func NewAssetVersionController(
	assetVersionRepository core.AssetVersionRepository,
	assetVersionService core.AssetVersionService,
	dependencyVulnRepository core.DependencyVulnRepository,
	componentRepository core.ComponentRepository,
	dependencyVulnService core.DependencyVulnService,
	supplyChainRepository core.SupplyChainRepository,
	licenseRiskRepository core.LicenseRiskRepository,
	componentService core.ComponentService,
	statisticsService core.StatisticsService,
	artifactService core.ArtifactService,
) *AssetVersionController

func (*AssetVersionController) AffectedComponents

func (a *AssetVersionController) AffectedComponents(ctx core.Context) error

func (*AssetVersionController) BuildPDFFromSBOM

func (a *AssetVersionController) BuildPDFFromSBOM(ctx core.Context) error

func (*AssetVersionController) BuildVulnerabilityReportPDF

func (a *AssetVersionController) BuildVulnerabilityReportPDF(ctx core.Context) error

func (*AssetVersionController) Delete

func (a *AssetVersionController) Delete(ctx core.Context) error

Function to delete provided asset version

func (*AssetVersionController) DependencyGraph

func (a *AssetVersionController) DependencyGraph(ctx core.Context) error

func (*AssetVersionController) GetAssetVersionsByAssetID

func (a *AssetVersionController) GetAssetVersionsByAssetID(ctx core.Context) error

func (*AssetVersionController) GetDependencyPathFromPURL

func (a *AssetVersionController) GetDependencyPathFromPURL(ctx core.Context) error

function to return a graph of all dependencies which lead to the requested pURL

func (*AssetVersionController) ListArtifacts

func (a *AssetVersionController) ListArtifacts(ctx core.Context) error

func (*AssetVersionController) Metrics

func (a *AssetVersionController) Metrics(ctx core.Context) error

func (*AssetVersionController) OpenVEXJSON

func (a *AssetVersionController) OpenVEXJSON(ctx core.Context) error

func (*AssetVersionController) Read

func (*AssetVersionController) RefetchLicenses

func (a *AssetVersionController) RefetchLicenses(ctx core.Context) error

RefetchLicenses forces re-fetching license information for all components of the current asset version

func (*AssetVersionController) SBOMJSON

func (a *AssetVersionController) SBOMJSON(ctx core.Context) error

func (*AssetVersionController) SBOMXML

func (a *AssetVersionController) SBOMXML(ctx core.Context) error

func (*AssetVersionController) VEXJSON

func (a *AssetVersionController) VEXJSON(ctx core.Context) error

func (*AssetVersionController) VEXXML

func (a *AssetVersionController) VEXXML(ctx core.Context) error

type Diffable

type Diffable interface {
	AssetVersionIndependentHash() string
	GetAssetVersionName() string
	GetEvents() []models.VulnEvent
}

type VulnerabilityInReport

type VulnerabilityInReport struct {
	CVEID               string
	SourceName          string
	SourceURL           string
	AffectedComponent   string
	CveDescription      string
	AnalysisState       string
	AnalysisResponse    string
	AnalysisDetail      string
	AnalysisFirstIssued string
	AnalysisLastUpdated string
	CVSS                float64
	Severity            string
	CVSSMethod          string
	Vector              string
	DevguardScore       float64
	DevguardSeverity    string
	DevguardVector      string
	Depth               int
}

VulnerabilityInReport represents a single CVE entry in the template.

type VulnerabilityReport

type VulnerabilityReport struct {
	AppTitle           string
	AppVersion         string
	ReportCreationDate string
	AmountCritical     int
	AmountHigh         int
	AmountMedium       int
	AmountLow          int
	AvgFixTimeCritical string
	AvgFixTimeHigh     string
	AvgFixTimeMedium   string
	AvgFixTimeLow      string
	CriticalVulns      []VulnerabilityInReport
	HighVulns          []VulnerabilityInReport
	MediumVulns        []VulnerabilityInReport
	LowVulns           []VulnerabilityInReport
}

VulnerabilityReport is the top-level model matching the markdown.gotmpl context.

Jump to

Keyboard shortcuts

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