mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-23 00:01:55 +00:00
Fix: data access in audit annotations (#12394)
Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
This commit is contained in:
parent
98ecf30a62
commit
6fdbdbce28
1 changed files with 1 additions and 1 deletions
|
@ -204,7 +204,7 @@ func (p *compiledPolicy) evaluateWithData(
|
||||||
|
|
||||||
auditAnnotations := make(map[string]string, 0)
|
auditAnnotations := make(map[string]string, 0)
|
||||||
for key, annotation := range p.auditAnnotations {
|
for key, annotation := range p.auditAnnotations {
|
||||||
out, _, err := annotation.ContextEval(ctx, data)
|
out, _, err := annotation.ContextEval(ctx, dataNew)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to evaluate auditAnnotation '%s': %w", key, err)
|
return nil, fmt.Errorf("failed to evaluate auditAnnotation '%s': %w", key, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue