Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPolicyScriptFromSpec ¶ added in v0.93.8
LoadPolicyScriptFromSpec loads a policy referenced from the spec
func LoadPolicySpec ¶ added in v0.93.8
func LoadPolicySpec(attachment *v1.PolicyAttachment) (*v1.Policy, error)
LoadPolicySpec loads and validates a policy spec from a contract
func LogPolicyViolations ¶ added in v0.94.0
func LogPolicyViolations(evaluations []*v12.PolicyEvaluation, logger *zerolog.Logger)
Types ¶
type PolicyError ¶ added in v0.94.2
type PolicyError struct {
// contains filtered or unexported fields
}
func NewPolicyError ¶ added in v0.94.2
func NewPolicyError(err error) *PolicyError
func (*PolicyError) Error ¶ added in v0.94.2
func (e *PolicyError) Error() string
type PolicyVerifier ¶
type PolicyVerifier struct {
// contains filtered or unexported fields
}
func NewPolicyVerifier ¶
func NewPolicyVerifier(schema *v1.CraftingSchema, logger *zerolog.Logger) *PolicyVerifier
func (*PolicyVerifier) VerifyMaterial ¶ added in v0.93.8
func (pv *PolicyVerifier) VerifyMaterial(ctx context.Context, material *v12.Attestation_Material, artifactPath string) ([]*v12.PolicyEvaluation, error)
VerifyMaterial applies all required policies to a material
func (*PolicyVerifier) VerifyStatement ¶ added in v0.93.8
func (pv *PolicyVerifier) VerifyStatement(ctx context.Context, statement *intoto.Statement) ([]*v12.PolicyEvaluation, error)
VerifyStatement verifies that the statement is compliant with the policies present in the schema
Click to show internal directories.
Click to hide internal directories.