Merge pull request #671 from rp-tanium/git_env_whitelist

Whitelists env var GIT_SSH
This commit is contained in:
Anthony Sottile
2018-01-02 16:52:52 -05:00
committed by GitHub

View File

@@ -77,7 +77,8 @@ def no_git_env():
# GIT_DIR: Causes git clone to clone wrong thing
# GIT_INDEX_FILE: Causes 'error invalid object ...' during commit
return {
k: v for k, v in os.environ.items() if not k.startswith('GIT_')
k: v for k, v in os.environ.items()
if not k.startswith('GIT_') or k in {'GIT_SSH'}
}