In the processes of setting up continuous deployment for an open source project with Travis I came across a predicament, can the encrypted private key be easily exfilitrated? For context, the deployment workflow is:
- In a Travis build job, build and test code
- If it passes, deploy the code
- Decrypt the encrypted private SSH key and start the SSH client
- Push to the Git remote on the production server
travis encrypt-file deploy_rsa --add, the private key is encrypted and only decryptable within the Travis build job. Am I correct in the assumption that someone forking the repo and creating a Travis build job will not be able to decrypt the key? In addition, the only attack vector would be for someone with push rights to modify the
.travis-ci script to decrypt the key and send it to themselves?