rules

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(f domain.Finding, id string) domain.Finding

Apply copies spec fields onto a finding.

Types

type Spec

type Spec struct {
	ID          string               `yaml:"id" json:"id"`
	Family      domain.Family        `yaml:"family" json:"family"`
	Severity    domain.Severity      `yaml:"severity" json:"severity"`
	Confidence  domain.Confidence    `yaml:"confidence" json:"confidence"`
	Clean       domain.CleanStrategy `yaml:"clean" json:"clean"`
	Description string               `yaml:"description" json:"description"`
}

Spec is a versioned rule definition.

func Load

func Load() ([]Spec, error)

Load reads the embedded v1 pack. Safe to call many times.

func Lookup

func Lookup(id string) (Spec, bool)

Lookup returns a spec by id.

func MustLookup

func MustLookup(id string) Spec

MustLookup returns a spec or prints to stderr and returns a fallback.

Jump to

Keyboard shortcuts

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