sbom

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2023 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Indexing edn.Keyword = "sbom.state/INDEXING"
	Indexed  edn.Keyword = "sbom.state/INDEXED"
)

Variables

This section is empty.

Functions

func DiffImages added in v0.0.5

func DiffImages(image1 string, image2 string, cli command.Cli, workspace string, apikey string) error

func IndexImage

func IndexImage(image string, options IndexOptions) (*types.Sbom, error)

func IndexPath

func IndexPath(path string, name string, cli command.Cli) (*types.Sbom, error)

func Send added in v0.0.24

func Send(sb *types.Sbom, entities chan<- string) error

func Upload added in v0.0.33

func Upload(sb *types.Sbom, workspace string, apikey string) error

UploadSbom transact an image and its data into the data plane

func WatchImages added in v0.0.10

func WatchImages(cli command.Cli) error

Types

type BlobEntity

type BlobEntity struct {
	skill.Entity `entity-type:"docker.image/blob"`
	Size         int64  `edn:"docker.image.blob/size"`
	Digest       string `edn:"docker.image.blob/digest"`
	DiffId       string `edn:"docker.image.blob/diff-id"`
}

type DependencyEntity

type DependencyEntity struct {
	skill.Entity `entity-type:"package/dependency"`
	Scopes       []string      `edn:"package.dependency/scopes"`
	Parent       string        `edn:"package.dependency/parent"`
	Package      PackageEntity `edn:"package.dependency/package"`
	Files        []FileEntity  `edn:"package.dependency/files"`
}

type EnvironmentVariableEntity

type EnvironmentVariableEntity struct {
	skill.Entity `entity-type:"docker.image.environment/variable"`
	Name         string `edn:"docker.image.environment.variable/name"`
	Value        string `edn:"docker.image.environment.variable/value"`
}

type FileEntity

type FileEntity struct {
	skill.Entity `entity-type:"package/file"`
	Id           string `edn:"package.file/id"`
	Path         string `edn:"package.file/path"`
	Digest       string `edn:"package.file/digest"`
}

type ImageEntity

type ImageEntity struct {
	skill.Entity         `entity-type:"docker/image"`
	Digest               string                       `edn:"docker.image/digest"`
	CreatedAt            *time.Time                   `edn:"docker.image/created-at,omitempty"`
	Repository           string                       `edn:"docker.image/repository,omitempty"`
	Repositories         *skill.ManyRef               `edn:"docker.image/repositories,omitempty"`
	Tags                 *skill.ManyRef               `edn:"docker.image/tags,omitempty"`
	Labels               *[]LabelEntity               `edn:"docker.image/labels,omitempty"`
	Ports                *[][2]string                 `edn:"docker.image/ports,omitempty"`
	Env                  *[][2]string                 `edn:"docker.image/env,omitempty"`
	EnvironmentVariables *[]EnvironmentVariableEntity `edn:"docker.image/environment-variables,omitempty"`
	Layers               *[]LayerEntity               `edn:"docker.image/layers,omitempty"`
	BlobDigest           string                       `edn:"docker.image/blob-digest,omitempty"`
	DiffChainId          string                       `edn:"docker.image/diff-chain-id,omitempty"`
	Sha                  string                       `edn:"docker.image/sha,omitempty"`

	SbomState        edn.Keyword `edn:"sbom/state,omitempty"`
	SbomVersion      string      `edn:"sbom/version,omitempty"`
	SbomLastUpdated  *time.Time  `edn:"sbom/last-updated,omitempty"`
	SbomPackageCount int         `edn:"sbom/package-count,omitempty"`

	Dependencies *skill.ManyRef `edn:"artifact/dependencies,omitempty"`
}

type ImageIndexResult added in v0.0.5

type ImageIndexResult struct {
	Input string
	Sbom  *types.Sbom
	Error error
}

type IndexOptions added in v0.0.33

type IndexOptions struct {
	Username string
	Password string

	Cli command.Cli
}

type LabelEntity

type LabelEntity struct {
	skill.Entity `entity-type:"docker.image/label"`
	Name         string `edn:"docker.image.label/name"`
	Value        string `edn:"docker.image.label/value"`
}

type LayerEntity

type LayerEntity struct {
	skill.Entity `entity-type:"docker.image/layer"`
	Ordinal      int        `edn:"docker.image.layer/ordinal"`
	ImageDigest  string     `edn:"docker.image.layer/image-digest"`
	Blob         BlobEntity `edn:"docker.image.layer/blob"`
	CreatedAt    time.Time  `edn:"docker.image.layer/created-at"`
	CreatedBy    string     `edn:"docker.image.layer/created-by"`
	BlobDigest   string     `edn:"docker.image.layer/blob-digest"`
	ChainId      string     `edn:"docker.image.layer/chain-id"`
}

type PackageEntity

type PackageEntity struct {
	skill.Entity `entity-type:"package"`
	Purl         string   `edn:"package/url"`
	Type         string   `edn:"package/type"`
	Namespace    string   `edn:"package/namespace,omitempty"`
	Name         string   `edn:"package/name"`
	Version      string   `edn:"package/version"`
	Author       string   `edn:"package/author,omitempty"`
	Licenses     []string `edn:"package/licenses,omitempty"`
	Description  string   `edn:"package/description,omitempty"`
	Url          string   `edn:"package/homepage,omitempty"`
	Size         int      `edn:"package/size,omitempty"`
	AdvisoryUrl  string   `edn:"package/advisory-url"`
}

type PackageEntry added in v0.0.5

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

type PackageMap added in v0.0.5

type PackageMap map[string]PackageEntry

type PlatformEntity

type PlatformEntity struct {
	skill.Entity `entity-type:"docker/platform"`
	Image        string `edn:"docker.platform/image"`
	Os           string `edn:"docker.platform/os"`
	Architecture string `edn:"docker.platform/architecture"`
	Variant      string `edn:"docker.platform/variant,omitempty"`
}

type RepositoryEntity

type RepositoryEntity struct {
	skill.Entity `entity-type:"docker/repository"`
	Host         string        `edn:"docker.repository/host"`
	Name         string        `edn:"docker.repository/repository"`
	Platforms    skill.ManyRef `edn:"docker.repository/platforms"`
	Type         edn.Keyword   `edn:"docker.repository/type,omitempty"`
}

type TagEntity

type TagEntity struct {
	skill.Entity `entity-type:"docker/tag"`
	Name         string    `edn:"docker.tag/name"`
	UpdatedAt    time.Time `edn:"docker.tag/updated-at"`
	Repository   string    `edn:"docker.tag/repository"`
	Digest       string    `edn:"docker.tag/digest"`
	Image        string    `edn:"docker.tag/image"`
}

type TransactionMaker added in v0.0.24

type TransactionMaker = func() skill.Transaction

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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