1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-22 07:41:10 +00:00

Fix: data access in audit annotations (#12394)

Signed-off-by: Frank Jogeleit <frank.jogeleit@web.de>
This commit is contained in:
Frank Jogeleit 2025-03-12 17:44:50 +01:00 committed by GitHub
parent 98ecf30a62
commit 6fdbdbce28
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -204,7 +204,7 @@ func (p *compiledPolicy) evaluateWithData(
auditAnnotations := make(map[string]string, 0)
for key, annotation := range p.auditAnnotations {
out, _, err := annotation.ContextEval(ctx, data)
out, _, err := annotation.ContextEval(ctx, dataNew)
if err != nil {
return nil, fmt.Errorf("failed to evaluate auditAnnotation '%s': %w", key, err)
}