Merge "Enforce 0600 permissions on private SSH key file."

This commit is contained in:
Zuul 2020-01-14 20:44:40 +00:00 committed by Gerrit Code Review
commit ce3327d088
1 changed files with 1 additions and 0 deletions

View File

@ -1447,6 +1447,7 @@ def ssh_private_key(workdir, key):
return None
if (isinstance(key, six.string_types) and
os.path.exists(key)):
os.chmod(key, 0o600)
return key
path = os.path.join(workdir, 'ssh_private_key')