feat!: remove MockTUFClient (#135)
* feat! remove MockTUFClient *Breaking* - use LocalPolicyDir and nil TUFClient instead Other: - add stateful Verifier
This commit is contained in:
7
pkg/policy/testdata/policies/allow/doi/policy.rego
vendored
Normal file
7
pkg/policy/testdata/policies/allow/doi/policy.rego
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
package attest
|
||||
|
||||
import rego.v1
|
||||
|
||||
result := {
|
||||
"success": true,
|
||||
}
|
||||
17
pkg/policy/testdata/policies/allow/mapping.yaml
vendored
Normal file
17
pkg/policy/testdata/policies/allow/mapping.yaml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# map repos to policies
|
||||
version: v1
|
||||
kind: policy-mapping
|
||||
policies:
|
||||
- id: docker-official-images
|
||||
description: Docker Official Images
|
||||
attestations:
|
||||
repo: "localhost:5001/library-refs"
|
||||
files:
|
||||
- path: doi/policy.rego
|
||||
rules:
|
||||
- pattern: "^docker[.]io/library/(.*)$"
|
||||
policy-id: docker-official-images
|
||||
- pattern: ^localhost:5001/(.*)$
|
||||
rewrite: docker.io/library/$1
|
||||
- pattern: ^registry[.]local:5000/(.*)$
|
||||
rewrite: docker.io/library/$1
|
||||
Reference in New Issue
Block a user