misconf

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 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

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

func CreatePolicyFS

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 tunnel-plugin-khulnasoft purposes only

Types

type ConfigFileSchema

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

func LoadConfigSchemas

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

type DisabledCheck

type DisabledCheck struct {
	ID      string
	Scanner string // For logging
	Reason  string // For logging
}

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

type ScannerOption struct {
	Trace                    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

	DisabledChecks []DisabledCheck
	SkipFiles      []string
	SkipDirs       []string
}

func (*ScannerOption) Sort

func (o *ScannerOption) Sort()

Jump to

Keyboard shortcuts

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