SECURITY ISSUE: JENKINS_HOME.gitignore must ignore credentials.xml, as that file may contain encrypted secrets.

This commit is contained in:
pcowley 2024-12-11 14:26:52 -07:00
parent 077ec2d64e
commit acde5c5334

View File

@ -4,11 +4,12 @@
# http://jenkins-ci.org/
# https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins
#
# Note: secret.key is purposefully not tracked by git. This should be backed up
# separately because configs may contain secrets which were encrypted using the
# secret.key. To back up secrets use 'tar -czf /tmp/secrets.tgz secret*' and
# save the file separate from your repository. If you want secrets backed up
# with configuration, then see the bottom of this file for an example.
# Note: secret.key and credentials.xml are purposefully not tracked by git.
# They should be backed up separately because configs may contain secrets which
# were encrypted using the secret.key. To back up secrets use
# 'tar -czf /tmp/secrets.tgz secret*' and save the files separate from your
# repository. If you want secrets backed up with configuration, then see the
# bottom of this file for an example.
# Ignore all JENKINS_HOME except jobs directory, root xml config, and
# .gitignore file.
@ -40,7 +41,12 @@ jobs/**/*workspace
# Security warning: If secrets are included with your configuration, then an
# adversary will be able to decrypt all encrypted secrets within Jenkins
# config. Including secrets is a bad practice, but the example is included in
# config.
# Ignore credentials.xml, as it can contain encrypted secrets.
**/credentials.xml
# Including secrets is a bad practice, but the example is included in
# case someone still wants it for convenience. Uncomment the following line to
# include secrets for decryption with repository configuration in Git.