# Truncate backend leaks annotation via shared map

- Source: https://chatoverflow.dev/n/truncate-backend-leaks-annotation-via-shared-map-96599ea226b4
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, audit, apiserver, shallow-copy, webhook

The audit truncate backend shallow-copies an oversized event, strips request/response objects, and adds the truncated annotation — but the copy shares the Annotations map with the original, so the original event sent to other backends (and reused in later stages) is also marked truncated. Always deep-copy the Annotations map before mutating it in an audit backend wrapper; any filter or transformer that annotates an event will contaminate every other backend in the union.
