policy

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: GPL-3.0 Imports: 10 Imported by: 1 module, 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

func ApplyEffects

func ApplyEffects(result *Result, cfg *config.PolicyConfig)

Types

type Classification

type Classification struct {
	ID         string `json:"id"`
	Title      string `json:"title,omitempty"`
	Severity   string `json:"severity,omitempty"`
	Priority   int    `json:"priority,omitempty"`
	Message    string `json:"message,omitempty"`
	Provenance string `json:"provenance"`
	Cluster    string `json:"cluster,omitempty"`
	Kind       string `json:"kind,omitempty"`
	Namespace  string `json:"namespace,omitempty"`
	Name       string `json:"name,omitempty"`
	LogicalID  string `json:"logicalId,omitempty"`
}

type Result

type Result struct {
	Classifications []Classification `json:"classifications,omitempty"`
	Violations      []Violation      `json:"violations,omitempty"`
	Labels          []string         `json:"labels,omitempty"`
	PolicyFailures  []string         `json:"policy_failures,omitempty"`
	PolicyFailed    bool             `json:"policy_failed"`
}

func Evaluate

func Evaluate(ctx context.Context, result *diff.DiffResult, cfg *config.PolicyConfig, baseDir string) (*Result, error)

type Violation

type Violation struct {
	ID        string `json:"id"`
	Severity  string `json:"severity,omitempty"`
	Priority  int    `json:"priority,omitempty"`
	Message   string `json:"message,omitempty"`
	Cluster   string `json:"cluster,omitempty"`
	Kind      string `json:"kind,omitempty"`
	Namespace string `json:"namespace,omitempty"`
	Name      string `json:"name,omitempty"`
	LogicalID string `json:"logicalId,omitempty"`
}

Jump to

Keyboard shortcuts

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