security

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidTier

func ValidTier(tier string) bool

ValidTier reports whether tier is a recognised permission tier name.

Types

type PermissionEngine

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

PermissionEngine controls what actions the agent is allowed to perform. The allowlist is determined by the configured permission tier.

func NewDenyAll

func NewDenyAll() *PermissionEngine

NewDenyAll creates a permission engine that denies every action. Intended for testing scenarios where no permissions should be granted.

func NewPermissionEngine

func NewPermissionEngine(tier string) (*PermissionEngine, error)

NewPermissionEngine creates a permission engine for the given tier. Valid tiers: "autonomous", "supervised", "restricted".

func (*PermissionEngine) CanExecute

func (p *PermissionEngine) CanExecute(action string) bool

CanExecute checks if an action is allowed under the current tier.

func (*PermissionEngine) Tier

func (p *PermissionEngine) Tier() string

Tier returns the current permission tier.

Jump to

Keyboard shortcuts

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