<#7747 [BUG] Copilot exposes object-storage creden...
# flyte-github
a
#7747 [BUG] Copilot exposes object-storage credentials in generated Pod command arguments Issue created by MarktHart Describe the bug When Flyte is configured with an S3-compatible storage backend using
auth_type: accesskey
, the controller copies the access key ID and secret access key into every generated copilot init container's command-line arguments. The controller itself receives the storage configuration through a projected Kubernetes Secret, using the mechanism added by #6419. However, a generated raw-container task Pod contains the equivalent of: initContainers: - name: flyte-copilot-downloader command: - /bin/flyte-copilot - --storage.stow.config - access_key_id=<redacted> - --storage.stow.config - secret_key=<redacted> # ... - name: flyte-copilot-uploader command: - /bin/flyte-copilot - --storage.stow.config - access_key_id=<redacted> - --storage.stow.config - secret_key=<redacted> # ... The literal credentials are therefore visible through the Pod API to any principal allowed to
get
or
list
Pods, even if that principal is not allowed to read Kubernetes Secrets. They may also be retained in Pod snapshots, support bundles, audit tooling, and similar operational systems. This is distinct from #6394 / #6419: those changes keep storage credentials out of Helm values and ConfigMaps by mounting a Secret into the Flyte controller. The exposure described here occurs afterward, when Flyte generates the task Pod. Steps to reproduce 1. Configure Flyte storage for an S3-compatible endpoint with
auth_type: accesskey
, supplying the storage configuration through a Kubernetes Secret. 2. Deploy a raw
ContainerTask
that uses copilot for input/output staging. 3. Start the task remotely. 4. Inspect the generated Pod: kubectl get pod <task-pod> -o yaml 5. Observe that both copilot init containers contain the unredacted storage credentials in
.spec.initContainers[*].command
. Expected behavior Storage credentials should not be copied into the Pod specification or process arguments. Copilot should obtain them through a Secret-backed environment variable, a mounted credential file, the provider credential chain, or another reference-based mechanism. Static credentials are sometimes unavoidable for self-hosted S3-compatible storage, so this should work without requiring cloud workload identity. Actual behavior Flyte renders
access_key_id=<value>
and
secret_key=<value>
as literal copilot command arguments in the generated Pod. Environment • Flyte Helm chart:
flyte-binary
v2.0.30
• Flyte controller image:
cr.flyte.org/flyteorg/flyte-binary-v2:v2.0.30
• Copilot image:
cr.flyte.org/flyteorg/flyte-binary-v2:v2.0.30
• Flyte Python SDK:
2.5.14
• Storage: self-hosted S3-compatible endpoint using access-key authentication Related issues • #6394 • #6419 • #5012 Are you sure this issue hasn't been raised already? • Yes Have you read the Code of Conduct? • Yes flyteorg/flyte