Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BinDirs = []string{"bin/", "sbin/", "usr/bin/", "usr/sbin/"}
BinDirs is the list of binary directories to search for commands. This is exported so that callers can append to it as needed.
var BootDirs = []string{"boot/...", "lib/modules/...", "usr/lib/modules/..."}
BootDirs is the list of directories to search for kernels. This is exported so that callers can append to it as needed. Scanning lib/modules and usr/lib/modules is done to make this work well for bootc, which suggests sticking kernel images at /usr/lib/modules/`uname -r`/vmlinuz.
var LibDirs = []string{"lib/", "usr/lib/", "lib64/", "usr/lib64/"}
LibDirs is the list of library directories to search for shared objects. This is exported so that callers can append to it as needed.
var ModuleDirs = []string{"usr/lib/modules/...", "lib/modules/..."}
ModuleDirs is the list of directories to search for kernel modules. This is exported so that callers can append to it as needed.
Functions ¶
Types ¶
type DependencyGenerator ¶
DependencyGenerator takes an SCAHandle, config.Dependencies pointer and a list of paths to be appended to LibDirs and returns findings based on analysis.
type SCAFS ¶
SCAFS represents the minimum required filesystem accessors which are needed by the SCA engine.
type SCAHandle ¶
type SCAHandle interface {
// PackageName returns the name of the current package being analyzed.
PackageName() string
// RelativeNames returns the name of other packages related to the current
// package being analyzed.
RelativeNames() []string
// Version returns the version and epoch of the package being analyzed.
Version() string
// FilesystemForRelative returns a usable filesystem representing the package
// contents for a given package name.
FilesystemForRelative(pkgName string) (SCAFS, error)
// Filesystem returns a usable filesystem representing the current package.
// It is equivalent to FilesystemForRelative(PackageName()).
Filesystem() (SCAFS, error)
// Options returns a config.PackageOption struct.
Options() config.PackageOption
// BaseDependencies returns the underlying set of declared dependencies before
// the SCA engine runs.
BaseDependencies() config.Dependencies
// InstalledPackages returns a map [package name] => [package
// version] for all build dependencies installed during build.
InstalledPackages() map[string]string
// PkgResolver returns the package resolver associated with
// the current package/build being analyzed.
PkgResolver() *apk.PkgResolver
}
SCAHandle represents all of the state necessary to analyze a package.