* Add rewrite support and fix existing tests * Add unit tests for policy matching * Compile regexes up front and store policies in map * Add test for verify flow with mirror * Rename ImageName -> ResolvedName And only set it when necessary * Rename Rewrite -> Replacement but keep it as rewrite in the yaml
11 lines
271 B
YAML
11 lines
271 B
YAML
version: v1
|
|
kind: policy-mapping
|
|
policies:
|
|
- id: local-policy
|
|
description: Local Policy
|
|
files:
|
|
- path: local-policy.rego
|
|
rules:
|
|
- pattern: "^docker[.]io/library/(.*)$"
|
|
policy-id: docker-official-images # note this policy does not exist in this file
|