policies

package
v0.59.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLinter added in v0.55.0

func NewLinter(paths []string) (linter.Linter, error)

func PreparePackageQuery

func PreparePackageQuery(ctx context.Context, modules []Module) (rego.PreparedEvalQuery, error)

func ReportPackages

func ReportPackages(ctx context.Context, logger *slog.Logger, sqlDB *sql.DB, platform string, org string, repo string, owner string, advisoryType string) (table.Writer, error)

Types

type Module

type Module struct {
	Filepath string
	Contents string
}

type Policies

type Policies struct{}

func (*Policies) AnonymiseData

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

func (*Policies) CreateTables

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

func (*Policies) Name

func (*Policies) Name() string

type PolicyViolation

type PolicyViolation struct {
	domain.Dependency
	DepTypes []string

	AdvisoryType advisory.AdvisoryType
	Description  string
}

func EvaluatePolicies

func EvaluatePolicies(ctx context.Context, query rego.PreparedEvalQuery, sqlDB *sql.DB) ([]PolicyViolation, int, error)

func (PolicyViolation) DepTypesAsString

func (v PolicyViolation) DepTypesAsString() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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