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.
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 )
Click to show internal directories.
Click to hide internal directories.