How encryption works in tf-via-pr
mainTo prevent sensitive data exposure, tf-via-pr can encrypt the plan file at rest before uploading it as a GitHub artifact. This is controlled by the plan-encrypt input (e.g., using a GitHub Secret like ${{ secrets.PASSPHRASE }}).
Encryption uses OpenSSL's symmetric stream counter mode (256 bit AES in CTR) with salt and pbkdf2.
To decrypt a plan file locally:
- Download the artifact.
- Unzip the file.
- Use OpenSSL to decrypt the
.encryptedfile using your passphrase.
unzip <tfplan.zip>
openssl enc -d -aes-256-ctr -pbkdf2 -salt \
-in tfplan.encrypted \
-out tfplan.decrypted \
-pass pass:"<passphrase>"
<tf.tool> show tfplan.decrypted