Documentation
¶
Index ¶
- func HasLinuxPackageFiles(rootFS string) (string, bool)
- func InitJavaDB(trivyCacheDir string)
- func ScanImage(ctx context.Context, artifactOpts trivyartifact.Option, ...) (*trivytypes.Report, error)
- func ScanOverlays(ctx context.Context, artifactOpts trivyartifact.Option, ...) (*trivytypes.Report, error)
- func ScanRootFS(ctx context.Context, artifactOpts artifact.Option, trivyCache trivycache.Cache, ...) (*trivytypes.Report, error)
- func TrivyOptionsAll(parallel int) trivyartifact.Option
- func TrivyOptionsAllForHosts(parallel int) trivyartifact.Option
- func TrivyOptionsOS(parallel int) trivyartifact.Option
- func UpdateJavaDB() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasLinuxPackageFiles ¶
HasLinuxPackageFiles returns true when the target root file system contains a directory supported by Trivy's operating system packages analyzers.
func InitJavaDB ¶
func InitJavaDB(trivyCacheDir string)
func ScanImage ¶
func ScanImage(ctx context.Context, artifactOpts trivyartifact.Option, trivyCache trivycache.Cache, image ftypes.Image) (*trivytypes.Report, error)
ScanImage launches a trivy scan on an image.
func ScanOverlays ¶
func ScanOverlays(ctx context.Context, artifactOpts trivyartifact.Option, trivyCache trivycache.Cache, ctr ftypes.Container) (*trivytypes.Report, error)
ScanOverlays launches a trivy scan on a local filesystem represened by a set of overlays.
func ScanRootFS ¶
func ScanRootFS(ctx context.Context, artifactOpts artifact.Option, trivyCache trivycache.Cache, rootFS string, artifactType ftypes.ArtifactType) (*trivytypes.Report, error)
ScanRootFS launches a trivy scan on a root filesystems.
func TrivyOptionsAll ¶
func TrivyOptionsAll(parallel int) trivyartifact.Option
TrivyOptionsAll returns the default options for trivy to scan application and OS packages.
func TrivyOptionsAllForHosts ¶
func TrivyOptionsAllForHosts(parallel int) trivyartifact.Option
TrivyOptionsAllForHosts returns the default options for trivy to scan applications on possibly big hosts root filesystems. Because TypeIndividualPkgs and TypeExecutable do not implement StaticPathAnalyzer, Trivy falls back to full filesystem traversal. OnlyDirs is required here to restrict the walker's scope: without it the walker would traverse the entire filesystem. osPkgDirs must be included so that the OS analyzers' directories are visited during the full traversal.
func TrivyOptionsOS ¶
func TrivyOptionsOS(parallel int) trivyartifact.Option
TrivyOptionsOS returns the default options for trivy to scan OS packages. See the comment in getArtifactOption for why OnlyDirs is not set.
func UpdateJavaDB ¶
func UpdateJavaDB() error
Types ¶
This section is empty.