internal

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2025 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequiredAnnotations = []string{
	"title",
	"description",
	"controls",
}

Functions

func ExtractAnnotations

func ExtractAnnotations(comments []*ast.Comment) map[string]interface{}

ExtractAnnotations takes comments from a rego file, and finds the metadata within. Metadata starts with a line `METADATA`, followed by a yaml document specifying the metadata for the specific policy. We use this to build a better picture of what the policy is used for, which controls it verifies, and who the responsible parties are.

func IsOCI

func IsOCI(source string) bool

func OnError

func OnError(err error, callback func(err error))

func PolicyCompiler

func PolicyCompiler(ctx context.Context, policyPath string) *ast.Compiler

func SeededUUID

func SeededUUID(seedData []string) (uuid.UUID, error)

func SubtractSlice

func SubtractSlice(left []string, right []string) []string

func Untar

func Untar(destination string, tarReader io.Reader) error

Types

type Activity

type Activity struct {
	Title       string
	SubjectId   string
	Description string
	Type        string
	Steps       []Step
	Tools       []string
}

func (*Activity) AddStep

func (a *Activity) AddStep(steps ...Step)

type Step

type Step struct {
	Title       string
	SubjectId   string
	Description string
}

type Task

type Task struct {
	Title       string
	SubjectId   string
	Description string
	Activities  []Activity
}

func (*Task) AddActivity

func (t *Task) AddActivity(activities ...Activity)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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