config

package
v1.6.0-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IgnoredVulns []IgnoreEntry `toml:"IgnoredVulns"`
	LoadPath     string        `toml:"LoadPath"`
}

func (*Config) ShouldIgnore

func (c *Config) ShouldIgnore(vulnID string) (bool, IgnoreEntry)

type ConfigManager

type ConfigManager struct {
	// Override to replace all other configs
	OverrideConfig *Config
	// Config to use if no config file is found alongside manifests
	DefaultConfig Config
	// Cache to store loaded configs
	ConfigMap map[string]Config
}

func (*ConfigManager) Get

func (c *ConfigManager) Get(r reporter.Reporter, targetPath string) Config

Attempts to get the config

func (*ConfigManager) UseOverride

func (c *ConfigManager) UseOverride(configPath string) error

Sets the override config by reading the config file at configPath. Will return an error if loading the config file fails

type IgnoreEntry

type IgnoreEntry struct {
	ID          string    `toml:"id"`
	IgnoreUntil time.Time `toml:"ignoreUntil"`
	Reason      string    `toml:"reason"`
}

Jump to

Keyboard shortcuts

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