advisory

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AdvisoryTypeDeprecated   = "DEPRECATED"
	AdvisoryTypeUnmainatined = "UNMAINTAINED"
	AdvisoryTypeSecurity     = "SECURITY"
	AdvisoryTypeOther        = "OTHER"
)
View Source
const (
	VersionMatchStrategyAny              = "ANY"
	VersionMatchStrategyEquals           = "EQUALS"
	VersionMatchStrategyLessThan         = "LESS_THAN"
	VersionMatchStrategyLessOrEqualTo    = "LESS_EQUAL"
	VersionMatchStrategyGreaterThan      = "GREATER_THAN"
	VersionMatchStrategyGreaterOrEqualTo = "GREATER_EQUAL"
)

Variables

This section is empty.

Functions

func GenerateAdvisories

func GenerateAdvisories(ctx context.Context, logger log.Logger, sqlDB *sql.DB, pw progress.Writer) error

func ReportAWS added in v0.28.0

func ReportAWS(ctx context.Context, logger log.Logger, sqlDB *sql.DB) (table.Writer, error)

func ReportPackages added in v0.39.0

func ReportPackages(ctx context.Context, logger log.Logger, sqlDB *sql.DB) (table.Writer, error)

Types

type Advisories

type Advisories struct{}

func (*Advisories) AnonymiseData

func (d *Advisories) AnonymiseData(ctx context.Context, sqlDB *sql.DB, orgs []string) (err error)

func (*Advisories) CreateTables

func (*Advisories) CreateTables(ctx context.Context, sqlDB *sql.DB) error

func (*Advisories) Name

func (*Advisories) Name() string

type Advisory

type Advisory struct {
	// PackagePattern contains a simple wildcard-aware pattern of packages that these advisories are for
	// For example:
	// `github.com/gorilla/*` would expect to match `github.com/gorilla/mux` and `github.com/gorilla/`
	// `git*.com/jamietanna/*` would expect to match `gitlab.com/jamietanna/test` and `github.com/jamietanna/not-test`
	PackagePattern string
	PackageManager string
	// Version contains the version that is expected to match. If nil, will always match
	Version *string
	// VersionMatchStrategy:
	//
	// VersionMatchStrategy defines the way that the version is expected to lexicographically match. If nil, will always match
	VersionMatchStrategy *VersionMatchStrategy
	AdvisoryType         AdvisoryType
	// Description describes why a given advisory is set on this package
	Description string
}

Advisory contains a package advisory, which allows flagging packages (for an optional set of version(s)) for arbitrary reasons

type AdvisoryType

type AdvisoryType = string

AdvisoryType is the type of package advisory that is present

type VersionMatchStrategy

type VersionMatchStrategy = string

VersionMatchStrategy defines how the Advisory.Version, if present, should be compared lexicographically with a CurrentVersion

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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