config

package
v0.0.0-...-0710af2 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrApplicationConfigNotFound = fmt.Errorf("application config not found")
)

Functions

This section is empty.

Types

type Application

type Application struct {
	// the location where the application config was read from (either from -c or discovered while loading); default .syft.yaml
	ConfigPath string `yaml:"configPath,omitempty" json:"configPath" mapstructure:"config"`
	Verbosity  uint   `yaml:"verbosity,omitempty" json:"verbosity" mapstructure:"verbosity"`
	// -q, indicates to not show any status output to stderr (ETUI or logging UI)
	Quiet                           bool               `yaml:"quiet" json:"quiet" mapstructure:"quiet"`
	Outputs                         []string           `yaml:"output" json:"output" mapstructure:"output"`                                           // -o, the format to use for output
	OutputTemplatePath              string             `yaml:"output-template-path" json:"output-template-path" mapstructure:"output-template-path"` // -t template file to use for output
	File                            string             `yaml:"file" json:"file" mapstructure:"file"`                                                 // --file, the file to write report output to
	CheckForAppUpdate               bool               `yaml:"check-for-app-update" json:"check-for-app-update" mapstructure:"check-for-app-update"` // whether to check for an application update on start up or not
	Dev                             development        `yaml:"dev" json:"dev" mapstructure:"dev"`
	Log                             logging            `yaml:"log" json:"log" mapstructure:"log"` // all logging-related options
	Catalogers                      []string           `yaml:"catalogers" json:"catalogers" mapstructure:"catalogers"`
	Package                         pkg                `yaml:"package" json:"package" mapstructure:"package"`
	Golang                          golang             `yaml:"golang" json:"golang" mapstructure:"golang"`
	LinuxKernel                     linuxKernel        `yaml:"linux-kernel" json:"linux-kernel" mapstructure:"linux-kernel"`
	Python                          python             `yaml:"python" json:"python" mapstructure:"python"`
	Attest                          attest             `yaml:"attest" json:"attest" mapstructure:"attest"`
	FileMetadata                    FileMetadata       `yaml:"file-metadata" json:"file-metadata" mapstructure:"file-metadata"`
	FileClassification              fileClassification `yaml:"file-classification" json:"file-classification" mapstructure:"file-classification"`
	FileContents                    fileContents       `yaml:"file-contents" json:"file-contents" mapstructure:"file-contents"`
	Secrets                         secrets            `yaml:"secrets" json:"secrets" mapstructure:"secrets"`
	Registry                        registry           `yaml:"registry" json:"registry" mapstructure:"registry"`
	Exclusions                      []string           `yaml:"exclude" json:"exclude" mapstructure:"exclude"`
	Platform                        string             `yaml:"platform" json:"platform" mapstructure:"platform"`
	Name                            string             `yaml:"name" json:"name" mapstructure:"name"`
	Source                          sourceCfg          `yaml:"source" json:"source" mapstructure:"source"`
	Parallelism                     int                `yaml:"parallelism" json:"parallelism" mapstructure:"parallelism"`                                           // the number of catalog workers to run in parallel
	DefaultImagePullSource          string             `yaml:"default-image-pull-source" json:"default-image-pull-source" mapstructure:"default-image-pull-source"` // specify default image pull source
	BasePath                        string             `yaml:"base-path" json:"base-path" mapstructure:"base-path"`                                                 // specify base path for all file paths
	ExcludeBinaryOverlapByOwnership bool               ``                                                                                                           // exclude synthetic binary packages owned by os package files
	/* 136-byte string literal not displayed */
}

Application is the main syft application configuration.

func (*Application) LoadAllValues

func (cfg *Application) LoadAllValues(v *viper.Viper, configPath string) error

func (Application) String

func (cfg Application) String() string

func (Application) ToCatalogerConfig

func (cfg Application) ToCatalogerConfig() cataloger.Config

type FileMetadata

type FileMetadata struct {
	Cataloger catalogerOptions `yaml:"cataloger" json:"cataloger" mapstructure:"cataloger"`
	Digests   []string         `yaml:"digests" json:"digests" mapstructure:"digests"`
}

type RegistryCredentials

type RegistryCredentials struct {
	Authority string `yaml:"authority" json:"authority" mapstructure:"authority"`
	// IMPORTANT: do not show the username in any YAML/JSON output (sensitive information)
	Username string `yaml:"-" json:"-" mapstructure:"username"`
	// IMPORTANT: do not show the password in any YAML/JSON output (sensitive information)
	Password string `yaml:"-" json:"-" mapstructure:"password"`
	// IMPORTANT: do not show the token in any YAML/JSON output (sensitive information)
	Token string `yaml:"-" json:"-" mapstructure:"token"`
}

Jump to

Keyboard shortcuts

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