misconf

package
v0.55.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: Apache-2.0 Imports: 33 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDataFS added in v0.44.0

func CreateDataFS(dataPaths []string, opts ...string) (fs.FS, []string, error)

func CreatePolicyFS added in v0.44.0

func CreatePolicyFS(policyPaths []string) (fs.FS, []string, error)

func NewCauseWithCode

func NewCauseWithCode(underlying scan.Result) types.CauseMetadata

func ResultsToMisconf

func ResultsToMisconf(configType types.ConfigType, scannerName string, results scan.Results) []types.Misconfiguration

ResultsToMisconf is exported for trivy-plugin-aqua purposes only

Types

type ConfigFileSchema added in v0.55.0

type ConfigFileSchema struct {
	// contains filtered or unexported fields
}

func LoadConfigSchemas added in v0.55.0

func LoadConfigSchemas(paths []string) ([]*ConfigFileSchema, error)

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

func NewScanner

func NewScanner(t detection.FileType, opt ScannerOption) (*Scanner, error)

func (*Scanner) Scan

func (s *Scanner) Scan(ctx context.Context, fsys fs.FS) ([]types.Misconfiguration, error)

type ScannerOption added in v0.41.0

type ScannerOption struct {
	Trace                    bool
	RegoOnly                 bool
	Namespaces               []string
	PolicyPaths              []string
	DataPaths                []string
	DisableEmbeddedPolicies  bool
	DisableEmbeddedLibraries bool
	IncludeDeprecatedChecks  bool

	HelmValues              []string
	HelmValueFiles          []string
	HelmFileValues          []string
	HelmStringValues        []string
	HelmAPIVersions         []string
	HelmKubeVersion         string
	TerraformTFVars         []string
	CloudFormationParamVars []string
	TfExcludeDownloaded     bool
	K8sVersion              string

	FilePatterns      []string
	ConfigFileSchemas []*ConfigFileSchema
}

func (*ScannerOption) Sort added in v0.41.0

func (o *ScannerOption) Sort()

Jump to

Keyboard shortcuts

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