Separate personal config files from source code
  • Updated on 12 May 2019
  • 1 minute to read
  • Contributors
  • Share
  • Dark
    Light

Separate personal config files from source code

  • Share
  • Dark
    Light

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.

3x-92bc8cb-Screen_Shot_2019-01-22_at_13.26.38.png

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?