rego

package
v1.43.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine added in v1.39.0

type Engine struct {
	// contains filtered or unexported fields
}

Engine policy checker for chainloop attestations and materials

func NewEngine added in v1.39.0

func NewEngine(opts ...EngineOption) *Engine

NewEngine creates a new policy engine with the given options default operating mode is EnvironmentModeRestrictive default allowed network domains are www.chainloop.dev and www.cisa.gov user provided allowed network domains are appended to the base ones

func (*Engine) Capabilities added in v1.39.0

func (r *Engine) Capabilities() *ast.Capabilities

Capabilities returns the capabilities of the environment based on the mode of operation defaulting to EnvironmentModeRestrictive if not provided.

func (*Engine) Verify added in v1.39.0

func (r *Engine) Verify(ctx context.Context, policy *engine.Policy, input []byte, args map[string]any) (*engine.EvaluationResult, error)

type EngineOption added in v1.39.0

type EngineOption func(*newEngineOptions)

func WithAllowedNetworkDomains added in v1.39.0

func WithAllowedNetworkDomains(domains ...string) EngineOption

func WithEnablePrint added in v1.43.0

func WithEnablePrint(enable bool) EngineOption

func WithIncludeRawData added in v1.42.0

func WithIncludeRawData(include bool) EngineOption

func WithOperatingMode added in v1.39.0

func WithOperatingMode(mode EnvironmentMode) EngineOption

type EnvironmentMode added in v0.96.19

type EnvironmentMode int32

EnvironmentMode defines the mode of running the policy engine

const (
	// EnvironmentModeRestrictive restricts operations that the compiler can do
	EnvironmentModeRestrictive EnvironmentMode = 0
	// EnvironmentModePermissive allows all operations on the compiler
	EnvironmentModePermissive EnvironmentMode = 1
)

Jump to

Keyboard shortcuts

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