config

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Deprecated: this is now private and should not be used outside the scanner

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config deprecated

type Config struct {
	IgnoredVulns      []IgnoreEntry          `toml:"IgnoredVulns"`
	PackageOverrides  []PackageOverrideEntry `toml:"PackageOverrides"`
	GoVersionOverride string                 `toml:"GoVersionOverride"`
	// The path to config file that this config was loaded from,
	// set by the scanner after having successfully parsed the file
	LoadPath string `toml:"-"`
}

Deprecated: this is now private and should not be used outside the scanner

func (*Config) ShouldIgnore deprecated

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

Deprecated: this is now private and should not be used outside the scanner

func (*Config) ShouldIgnorePackage deprecated added in v1.8.5

func (c *Config) ShouldIgnorePackage(pkg models.PackageVulns) (bool, PackageOverrideEntry)

ShouldIgnorePackage determines if the given package should be ignored based on override entries in the config

Deprecated: this is now private and should not be used outside the scanner

func (*Config) ShouldIgnorePackageVersion deprecated added in v1.8.0

func (c *Config) ShouldIgnorePackageVersion(name, version, ecosystem string) (bool, PackageOverrideEntry)

Deprecated: Use ShouldIgnorePackage instead

func (*Config) ShouldIgnorePackageVulnerabilities deprecated added in v1.9.1

func (c *Config) ShouldIgnorePackageVulnerabilities(pkg models.PackageVulns) bool

ShouldIgnorePackageVulnerabilities determines if the given package should have its vulnerabilities ignored based on override entries in the config

Deprecated: this is now private and should not be used outside the scanner

func (*Config) ShouldOverridePackageLicense deprecated added in v1.8.5

func (c *Config) ShouldOverridePackageLicense(pkg models.PackageVulns) (bool, PackageOverrideEntry)

ShouldOverridePackageLicense determines if the given package should have its license ignored or changed based on override entries in the config

Deprecated: this is now private and should not be used outside the scanner

func (*Config) ShouldOverridePackageVersionLicense deprecated added in v1.8.0

func (c *Config) ShouldOverridePackageVersionLicense(name, version, ecosystem string) (bool, PackageOverrideEntry)

Deprecated: Use ShouldOverridePackageLicense instead

type ConfigManager deprecated

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
}

Ignore stuttering as that would be a breaking change TODO: V2 rename?

Deprecated: this is now private and should not be used outside the scanner

func (*ConfigManager) Get deprecated

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

Attempts to get the config

Deprecated: this is now private and should not be used outside the scanner

func (*ConfigManager) UseOverride deprecated

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

Deprecated: this is now private and should not be used outside the scanner

type IgnoreEntry deprecated

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

Deprecated: this is now private and should not be used outside the scanner

type License deprecated added in v1.8.0

type License struct {
	Override []string `toml:"override"`
	Ignore   bool     `toml:"ignore"`
}

Deprecated: this is now private and should not be used outside the scanner

type PackageOverrideEntry deprecated added in v1.8.0

type PackageOverrideEntry struct {
	Name string `toml:"name"`
	// If the version is empty, the entry applies to all versions.
	Version        string        `toml:"version"`
	Ecosystem      string        `toml:"ecosystem"`
	Group          string        `toml:"group"`
	Ignore         bool          `toml:"ignore"`
	Vulnerability  Vulnerability `toml:"vulnerability"`
	License        License       `toml:"license"`
	EffectiveUntil time.Time     `toml:"effectiveUntil"`
	Reason         string        `toml:"reason"`
}

Deprecated: this is now private and should not be used outside the scanner

type Vulnerability deprecated added in v1.9.1

type Vulnerability struct {
	Ignore bool `toml:"ignore"`
}

Deprecated: this is now private and should not be used outside the scanner

Jump to

Keyboard shortcuts

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