ddtrivy

package module
v0.0.0-...-07614fb Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

README

ddtrivy

Datadog wrapper for the Trivy library.

This library includes shared code that is used by the datadog agent, but also by the agentless-scanner. The goal is to make sure the code is in-sync between those two components.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasLinuxPackageFiles

func HasLinuxPackageFiles(rootFS string) (string, bool)

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 trivyartifact.Type) (*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.

func TrivyOptionsOS

func TrivyOptionsOS(parallel int) trivyartifact.Option

func UpdateJavaDB

func UpdateJavaDB() error

Types

This section is empty.

Directories

Path Synopsis
Package walker holds the trivy walkers
Package walker holds the trivy walkers

Jump to

Keyboard shortcuts

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