Commit 43c712f5 authored by Nick Thomas's avatar Nick Thomas

Whitelist authorized_keys.lock in the gitlab:check rake task

parent aa445119
---
title: Whitelist authorized_keys.lock in the gitlab:check rake task
merge_request: 14624
author:
type: fixed
...@@ -5,6 +5,7 @@ module SystemCheck ...@@ -5,6 +5,7 @@ module SystemCheck
# whitelisted as it may change the SSH client's behaviour dramatically. # whitelisted as it may change the SSH client's behaviour dramatically.
WHITELIST = %w[ WHITELIST = %w[
authorized_keys authorized_keys
authorized_keys.lock
authorized_keys2 authorized_keys2
known_hosts known_hosts
].freeze ].freeze
......
...@@ -16,7 +16,12 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do ...@@ -16,7 +16,12 @@ describe SystemCheck::App::GitUserDefaultSSHConfigCheck do
end end
it 'only whitelists safe files' do it 'only whitelists safe files' do
expect(described_class::WHITELIST).to contain_exactly('authorized_keys', 'authorized_keys2', 'known_hosts') expect(described_class::WHITELIST).to contain_exactly(
'authorized_keys',
'authorized_keys2',
'authorized_keys.lock',
'known_hosts'
)
end end
describe '#skip?' do describe '#skip?' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment