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)
}
Click to show internal directories.
Click to hide internal directories.