builds

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const JsonSchemaDateTimeFormat = "2006-01-02T15:04:05+00:00"

https://json-schema.org/understanding-json-schema/reference/string.html#dates-and-times

Variables

This section is empty.

Functions

func GenerateCycloneDX

func GenerateCycloneDX(deps *BuildDependencies, config types.ScanConfig) (*cdx.BOM, error)

Types

type BuildDependencies

type BuildDependencies struct {
	Code            []Package
	Tools           []Package
	Transitive      []Package
	UnresolvedFiles []string
}

func ResolveDependencies

func ResolveDependencies(observations BuildObservations) (*BuildDependencies, error)

type BuildObservations

type BuildObservations types.BuildObservations

export the imported type BuildObservations to keep the dependency to this package

func DependencyObservations

func DependencyObservations(observations BuildObservations) BuildObservations

DependencyObservations filters the build observations to only include dependency related opens and execs this means external includes (i.e. #include <stdio.h> -> /usr/include/* etc) and compilers calls (/usr/bin/cc etc)

type Package

type Package struct {
	Id              string
	Arch            string
	Name            string
	Version         string
	Dependencies    []string
	Files           []string
	IsSourcePackage bool
	Licenses        []licenses.License
	OSFamily        ospkgs.OSFamily
	Scope           Scope
}

TODO: replace this with pkg/os/Package?

type PackageIndexer

type PackageIndexer interface {
	Create() error
	PackageNameForFile(filename string) (string, bool)
	PackageForFile(filename string) (*ospkgs.Package, bool)
	PackageThatProvides(name string) (*ospkgs.Package, bool)
	InstalledPackage(name string) *ospkgs.Package
	LicensesForPackage(name string) ([]licenses.License, error)
}

type Scope

type Scope string
const (
	ScopeCode Scope = "code"
	ScopeTool Scope = "tool"
)

Jump to

Keyboard shortcuts

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