v1

package
v0.6.39 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaxSeverity

func MaxSeverity(violations []*console.StackPolicyViolationAttributes) int

func SeverityInt

func SeverityInt(severity console.VulnSeverity) int

Types

type Config

type Config struct{}

Config is a struct that holds configuration variables for Scanner.

type DefaultScanner

type DefaultScanner struct {
	// PolicyPaths defines the paths to the policy files.
	PolicyPaths []string

	// PolicyNamespaces defines the namespaces where the policies should be applied.
	PolicyNamespaces []string
}

DefaultScanner is a base Scanner struct that holds shared configuration variables.

type ScanOption

type ScanOption func(*ScanOptions)

ScanOption is a function that modifies ScanOptions.

func WithTerraform

func WithTerraform(options TerraformScanOptions) ScanOption

WithTerraform sets Terraform scan options.

type ScanOptions

type ScanOptions struct {
	// Terraform scan options
	Terraform TerraformScanOptions
}

ScanOptions is a wrapper for tool-specific scan options.

type Scanner

type Scanner interface {
	Scan(tool console.StackType, options ...ScanOption) (violations []*console.StackPolicyViolationAttributes, err error)
}

Scanner is an interface for security scanning tools.

type ScannerType

type ScannerType string

ScannerType defines the type of Scanner to be used.

type TerraformScanOptions

type TerraformScanOptions struct {
	// WorkDir is the root directory where the stack tarball was extracted.
	// It is used to resolve paths relative to the tarball root, e.g. custom policy dirs.
	WorkDir string

	// Dir is a directory containing files that should be scanned.
	Dir string

	// PlanFileName is a terraform plan file name.
	PlanFileName string

	// VariablesFileName is a terraform variables file name.
	VariablesFileName string
}

TerraformScanOptions defines options for terraform scan.

Jump to

Keyboard shortcuts

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