allowlist

package
v0.0.0-...-a548ab7 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidErr

func IsInvalidErr(err error) bool

IsInvalidErr checks if the error is an invalidErr

func NewInvalidErr

func NewInvalidErr(s string) error

NewInvalidErr ...

func Validate

func Validate(wl models2.CVEAllowlist) error

Validate help validates the CVE allowlist, to ensure the CVE ID is valid and there's no duplication

Types

type Manager

type Manager interface {
	// CreateEmpty creates empty allowlist for given project
	CreateEmpty(ctx context.Context, projectID int64) error
	// Set sets the allowlist for given project (create or update)
	Set(ctx context.Context, projectID int64, list models.CVEAllowlist) error
	// Get gets the allowlist for given project
	Get(ctx context.Context, projectID int64) (*models.CVEAllowlist, error)
	// SetSys sets system level allowlist
	SetSys(ctx context.Context, list models.CVEAllowlist) error
	// GetSys gets system level allowlist
	GetSys(ctx context.Context) (*models.CVEAllowlist, error)
}

Manager defines the interface of CVE allowlist manager, it support both system level and project level allowlists

func NewDefaultManager

func NewDefaultManager() Manager

NewDefaultManager return a new instance of defaultManager

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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