policy

package
v1.0.11 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalRuleFamilyID added in v1.0.8

func CanonicalRuleFamilyID(id string) (string, error)

CanonicalRuleFamilyID returns the stable rule family identifier used for merge keys.

func NormalizeRuleID added in v1.0.8

func NormalizeRuleID(id string) (string, error)

NormalizeRuleID trims and uppercases a rule ID and validates namespace shape.

func RuleIDAliases added in v1.0.8

func RuleIDAliases(id string) []string

RuleIDAliases returns deterministic namespace aliases for a rule ID.

Types

type Rule

type Rule struct {
	ID          string `yaml:"id"`
	Title       string `yaml:"title"`
	Severity    string `yaml:"severity"`
	Remediation string `yaml:"remediation"`
	Kind        string `yaml:"kind"`
	Version     int    `yaml:"version"`
}

Rule is the deterministic policy contract loaded from YAML.

func LoadRules

func LoadRules(customPolicyPath, repoRoot string) ([]Rule, error)

type RulePack

type RulePack struct {
	Rules []Rule `yaml:"rules"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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