Closed bmenant closed 1 month ago
Hi. I was able to reproduce this. Can any maintainer confirm if this should be fixed or is working as intended?
If so, I have an implementation ready. Should there be an option to allow showing/hiding these secrets ? Or always hide it by default?
Thanks.
Issue Description
Values of secrets attached to containers with
type=env
option are available on container inspection (running or exited). It is not the case with secrets attached withtype=mount
option.I do not know if this is expected per specs?
Steps to reproduce the issue
Steps to reproduce the issue
printf 'secret value' | podman secret create mysecret -
podman container run --rm --secret mysecret,type=env -d alpine sleep 300
podman container inspect -l --format '{{ .Config.Env }}'
Describe the results you received
The value of the secret is disclosed on container inspection in the
Config.Env
attribute:[... mysecret=secret value]
It is not listed in theConfig.Secrets
attribute.Describe the results you expected
I’d expect it to not appear in the
Config.Env
attribute. I’d expect to find it (undisclosed) in theConfig.Secrets
attribute, like mount type secrets are.podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
No
Additional environment details
No response
Additional information
No response