Run command with decrypted env

Inject decrypted secrets as env vars for one command; note: nothing hits disk

sops exec-env secrets.enc.yaml 'terraform apply'

tool
sops4 commands
tags
sopssecretscisecurity

More sops commands

  • sops --set '["db"]["password"] "s3cr3t"' secrets.enc.yaml

    Set a single nested key without opening an editor; great for scripted rotation

  • SOPS_AGE_RECIPIENTS=age1<id> sops -e -i secrets.yaml

    Encrypt only values in place; note: keys stay readable so diffs stay reviewable

  • sops updatekeys secrets.yaml

    Rotate data key to recipients in .sops.yaml without re-encrypting plaintext manually

all 4 sops commands