fix: add webhook mutation audit trail and stop logging full pod labels - #184
Merged
Merged
Conversation
Add structured audit log for every validation container injection with pod name, namespace, ModelValidation CR, auth method, continuous mode, and sidecar type. Replace full pod.Labels dump with only the match label value to prevent leaking business metadata in operator logs. Also removes redundant narration logs from the admission path and promotes "missing validation config" to Error level. Signed-off-by: Sachin Sampras M <sampras343@gmail.com>
miyunari
approved these changes
Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What
"labels", pod.Labels(full label map) with"matchLabel", pod.Labels[ModelValidationLabel](only the match value)Why
The webhook is the operator's primary security function, it decides what gets injected into which pods. Today, successful injections produce zero log output. You can see skips and errors, but not the actual mutations. This makes incident investigation and compliance auditing impossible.
The full label map dump leaks business metadata (team names, environment tags, deployment identifiers) into operator logs on every single pod admission in the cluster. A security operator shouldn't be the source of an information leak.
Closes #183
Release Note
Documentation