A GPU provider's SDK was printing my API keys into logs

building-in-publicsecurity

Every time SoundScrub started a GPU pod, my worker log got a line with the secrets I hand to that pod.

SoundScrub (soundscrub.video) does the heavy audio work on rented GPUs from RunPod. For each job my backend asks RunPod for a pod through their Python SDK (1.8.1) and passes the pod its credentials as environment variables, like my RunPod API key and the storage keys.

The SDK’s create_pod function does a print of the whole API response. That response echoes the environment I just sent. My Celery worker sends stdout to its log, so every pod start wrote a WARNING line with those values in plain text.

What I changed

I wrapped the create_pod call so nothing the SDK prints to stdout reaches the log. I discard it instead of redacting it.

The test uses a fake create_pod that prints a made-up secret, and checks the secret never reaches the output. It fails without the wrapper and passes with it.

If you pass secrets to a pod through env vars, check what your SDK prints when it creates one.