Skip to content

Commit 90ce40c

Browse files
committed
Add two more checks for PATH env variable
Signed-off-by: Mikhail Aseev <[email protected]>
1 parent 4a44c94 commit 90ce40c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controls/os_spec.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,12 @@
145145
control 'os-04' do
146146
impact 1.0
147147
title 'Dot in PATH variable'
148-
desc 'Do not include the current working directory in PATH variable. This makes it easier for an attacker to gain extensive rights by executing a Trojan program'
148+
desc 'Do not include the current working directory as well as its parent one in PATH variable. This makes it easier for an attacker to gain extensive rights by executing a Trojan program'
149149
describe os_env('PATH') do
150150
its('split') { should_not include('') }
151+
its('split') { should_not include(' ') }
151152
its('split') { should_not include('.') }
153+
its('split') { should_not include('..') }
152154
end
153155
end
154156

0 commit comments

Comments
 (0)