Separate personal config files from source code
  • 12 May 2019
  • 1 Minute To Read
  • Contributors
  • Share
  • Dark

Separate personal config files from source code

  • Share
  • Dark

This rule provides a safety check to verify that any personal config files (e.g. local configuration / history / preference) that you wish to remain private are not committed to your source control.

Including personal config files is unnecessary, could be counterproductive, and might have security implications if you expose details about your machineโ€™s setup.

Use case(s)

  • Ensure appropriate commits and source control additions
  • Prevent a potential security breach by exposing information regarding your machine / server

When does this rule fail?

When one of the commits in the pull request contains a personal file pattern.


How to fix?

The personal config file cotain sensitive data (e.g. token)?
You should follow this guide instead.
  1. Remove the personal config files (listed in the failure message)
  2. Push the new code to your branch:
$ git rm <personal-config-file-path>
$ git commit -m "removed personal config files from code"
$ git push
  1. Datree's policy check automatically ensures no personal config file are removed from the pull request

What's Next

Activate a policy
Was This Article Helpful?