Documentation ¶
Index ¶
- func IsProto(t string) bool
- type Option
- func WithConfigPath(path string) Option
- func WithFilterRegex(regex string) Option
- func WithIacFileType(fileType string) Option
- func WithIacKubeConfig(configPath string) Option
- func WithIacKubeNameSpace(namespace string) Option
- func WithIacLimitSize(iacSize int64) Option
- func WithIacProxy(proxy string) Option
- func WithIacSshPath(path string) Option
- func WithInsecure(insecure bool) Option
- func WithParallelContainerMode(mode bool) Option
- func WithResourcePath(path string) Option
- func WithSpecFlags(flags []string) Option
- func WithTempPath(path string) Option
- func WithThread(thread int) Option
- type Options
- type Proto
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option func(*Options)
func WithConfigPath ¶
func WithFilterRegex ¶
func WithIacFileType ¶
func WithIacKubeConfig ¶
func WithIacKubeNameSpace ¶
func WithIacLimitSize ¶
func WithIacProxy ¶
func WithIacSshPath ¶
func WithInsecure ¶
func WithResourcePath ¶
func WithSpecFlags ¶
func WithTempPath ¶
func WithThread ¶
type Options ¶
type Options struct { Thread int TempPath string ConfigPath string ResourcePath string ParallelContainerMode bool Insecure bool SpecFlags []string // For Iac Scan IacFileType string IacLimitSize int64 IacSshPath string IacProxy string IacKubeConfig string IacKubeNameSpace string // For Registry Scan CatalogFilterRegex string }
type Proto ¶
type Proto string
const ( UNKNOWN Proto = "unknown" // DOCKERD CONTAINERD: container protol // DOCKERD CONTAINERD REGISTRY TARBALL: image protol DOCKERD Proto = "dockerd" CONTAINERD Proto = "containerd" REGISTRY Proto = "registry" REGISTRY_IMAGE Proto = "registry-image" TARBALL Proto = "tarball" // LOCAL GIT KUBERNETES: iac protol LOCAL Proto = "host" GIT Proto = "git" KUBERNETES Proto = "kubernetes" )
type Target ¶
type Target struct { Proto Proto Value string Opts *Options Plugins []*plugin.Plugin ServiceManager *plugind.Manager ReportService *report.Service }
func NewTargets ¶
func NewTargets(cmd *cmd.Command, args []string, plugins []*plugin.Plugin, serviceManager *plugind.Manager, reportService *report.Service, opts ...Option) []*Target
NewTargets parse arg to Target docker: || "" -> scan all with docker runtime docker:imageRef || imageRef -> scan imageRef with docker runtime containerd: -> scan all with containerd runtime containerd:imageRef -> scan imageRef with containerd runtime registry: -> scan all with remote runtime(do not support docker.io) registry: imageRef -> scan imageRef with remote runtime
func (*Target) WithDefaultOptions ¶
func (t *Target) WithDefaultOptions(opts ...Option) []plugin.ExecOption
WithDefaultOptions Transfer Target.Options to plugin.ExecOption
Click to show internal directories.
Click to hide internal directories.