rego

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CosignEvaluationRule = "isCompliant"

CosignEvaluationRule defines the expected evaluation role of a provided rego module

View Source
const CosignRegoPackageName = "sigstore"

CosignRegoPackageName defines the expected package name of a provided rego module

View Source
const QUERY = "data.signature.allow"

The query below should meet the following requirements: * Provides no Bindings. Do not use a query that sets a variable, e.g. x := data.signature.allow * Queries for a single value.

Variables

This section is empty.

Functions

func ValidateJSON

func ValidateJSON(jsonBody []byte, entrypoints []string) []error

func ValidateJSONWithModuleInput

func ValidateJSONWithModuleInput(jsonBody []byte, moduleInput string) (warnings error, errors error)

ValidateJSONWithModuleInput takes the body of the results to evaluate and the defined module in a policy to validate against the input data

Types

type CosignRuleResult

type CosignRuleResult struct {
	Warning string `json:"warning,omitempty"`
	Error   string `json:"error,omitempty"`
	Result  bool   `json:"result,omitempty"`
}

CosignRuleResult defines a expected result object when wrapping the custom messages of the result of our cosign rego rule

Jump to

Keyboard shortcuts

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