bom

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bom defines the bom struct of syft output Modify based on github.com/anchore/syft/internal/presenter/packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONDistribution

type JSONDistribution struct {
	Name    string `json:"name"`    // Name of the Linux distribution
	Version string `json:"version"` // Version of the Linux distribution (major or major.minor version)
	IDLike  string `json:"idLike"`  // the ID_LIKE field found within the /etc/os-release file
}

JSONDistribution provides information about a detected Linux JSONDistribution.

type JSONDocument

type JSONDocument struct {
	// Artifacts is the list of packages discovered and placed into the catalog
	Artifacts             []JSONPackage      `json:"artifacts"`
	ArtifactRelationships []JSONRelationship `json:"artifactRelationships"`
	// Source represents the original object that was cataloged
	Source JSONSource `json:"source"`
	// Distro represents the Linux distribution that was detected from the source
	Distro JSONDistribution `json:"distro"`
}

JSONDocument represents the syft cataloging findings as a JSON document.

func NewJSONDocument

func NewJSONDocument(catalog *pkg.Catalog, srcMetadata source.Metadata, d *linux.Release, scope source.Scope,
) (JSONDocument, error)

NewJSONDocument creates and populates a new JSON document struct from the given cataloging results.

type JSONImageSource

type JSONImageSource struct {
	source.ImageMetadata
	Scope source.Scope `json:"scope"`
}

JSONImageSource object represents the image source.

type JSONPackage

type JSONPackage struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Version      string            `json:"version"`
	Type         string            `json:"type"`
	FoundBy      string            `json:"foundBy"`
	Locations    []source.Location `json:"locations"`
	Licenses     []string          `json:"licenses"`
	Language     string            `json:"language"`
	CPEs         []string          `json:"cpes"`
	PURL         string            `json:"purl"`
	MetadataType string            `json:"metadataType"`
	Metadata     interface{}       `json:"metadata"`
}

JSONPackage represents a pkg.Package object specialized for JSON marshaling and unmarshaling.

type JSONRelationship

type JSONRelationship struct {
	Parent   string      `json:"parent"`
	Child    string      `json:"child"`
	Type     string      `json:"type"`
	Metadata interface{} `json:"metadata"`
}

JSONRelationship denotes the relationship of artifacts.

type JSONSource

type JSONSource struct {
	Type   string      `json:"type"`
	Target interface{} `json:"target"`
}

JSONSource object represents the thing that was cataloged.

Jump to

Keyboard shortcuts

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