From ac7d6c3fc441d48bfb4f22b38f3ea84bbfe11c19 Mon Sep 17 00:00:00 2001 From: Amol Yadav Date: Thu, 12 Feb 2026 14:21:19 +0530 Subject: [PATCH] inspect: preserve secret target name in env masking Fixes #28075 Signed-off-by: Amol Yadav --- libpod/container_inspect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libpod/container_inspect.go b/libpod/container_inspect.go index b6e08259be..ba5e485a2a 100644 --- a/libpod/container_inspect.go +++ b/libpod/container_inspect.go @@ -386,9 +386,9 @@ func (c *Container) generateInspectContainerConfig(spec *spec.Spec) *define.Insp // env variables come in the style `name=value` envName := strings.Split(envValue, "=")[0] - envSecret, ok := envSecrets[envName] + _, ok := envSecrets[envName] if ok { - ctrConfig.Env[envIndex] = envSecret.Name + "=*******" + ctrConfig.Env[envIndex] = envName + "=*******" } }