commands

package
v0.69.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 33 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanup added in v0.65.0

func Cleanup() error

Cleanup performs cleanup tasks before Trivy exits

func NewApp

func NewApp() *cobra.Command

NewApp is the factory method to return Trivy CLI

func NewCleanCommand added in v0.53.0

func NewCleanCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewClientCommand

func NewClientCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

NewClientCommand returns the 'client' subcommand that is deprecated

func NewConfigCommand added in v0.19.0

func NewConfigCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewConvertCommand added in v0.42.0

func NewConvertCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewFilesystemCommand

func NewFilesystemCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewImageCommand

func NewImageCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewKubernetesCommand added in v0.30.0

func NewKubernetesCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewModuleCommand added in v0.29.0

func NewModuleCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewPluginCommand

func NewPluginCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewRegistryCommand added in v0.57.0

func NewRegistryCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewRepositoryCommand

func NewRepositoryCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewRootCommand added in v0.30.0

func NewRootCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewRootfsCommand added in v0.20.0

func NewRootfsCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewSBOMCommand added in v0.30.0

func NewSBOMCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewServerCommand

func NewServerCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewVEXCommand added in v0.54.0

func NewVEXCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewVMCommand added in v0.35.0

func NewVMCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NewVersionCommand added in v0.25.0

func NewVersionCommand(globalFlags *flag.GlobalFlagGroup) *cobra.Command

func NotifyContext added in v0.65.0

func NotifyContext(parent context.Context) context.Context

NotifyContext returns a context that is canceled when SIGINT or SIGTERM is received. It also ensures cleanup of temporary files when the signal is received.

When a signal is received, Trivy will attempt to gracefully shut down by canceling the context and waiting for all operations to complete. If users want to force an immediate exit, they can send a second SIGINT or SIGTERM signal.

func Run added in v0.67.0

func Run(ctx context.Context) error

Run builds the CLI application and executes it with centralized error handling.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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