Skip to content

Commit 0cc8a8f

Browse files
authored
Merge pull request #21 from dev-sec/chris-rock/guard-non-supported
inspec check fix
2 parents 0a057e6 + 8b5c979 commit 0cc8a8f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

controls/postgres_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
POSTGRES_HBA_CONF_FILE = attribute(
5656
'postgres_hba_conf_file',
5757
description: 'define path for the postgresql configuration file',
58-
default: postgres.conf_dir + '/pg_hba.conf'
58+
default: File.join(postgres.conf_dir.to_s, 'pg_hba.conf')
5959
)
6060

6161
only_if do
@@ -187,7 +187,7 @@
187187
impact 1.0
188188
title 'The PostgreSQL "data_directory" should be assigned exclusively to the database account (such as "postgres").'
189189
desc 'If file permissions on data are not property defined, other users may read, modify or delete those files.'
190-
find_command = 'find ' + POSTGRES_DATA + ' -user ' + USER + ' -group ' + USER + ' -perm /go=rwx'
190+
find_command = 'find ' + POSTGRES_DATA.to_s + ' -user ' + USER + ' -group ' + USER + ' -perm /go=rwx'
191191
describe command(find_command) do
192192
its('stdout') { should eq '' }
193193
end
@@ -274,7 +274,7 @@
274274
impact 1.0
275275
title 'We accept one peer and one ident for now (chef automation)'
276276
desc 'We accept one peer and one ident for now (chef automation)'
277-
describe command('cat ' + POSTGRES_HBA_CONF_FILE + ' | egrep \'peer|ident\' | wc -l') do
277+
describe command('cat ' + POSTGRES_HBA_CONF_FILE.to_s + ' | egrep \'peer|ident\' | wc -l') do
278278
its('stdout') { should match(/^[2|1]/) }
279279
end
280280
end

inspec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Hardening Framework Postgres Hardening Test Suite
33
maintainer: DevSec Hardening Framework Team
44
copyright: DevSec Hardening Framework Team
55
copyright_email: hello@dev-sec.io
6-
license: Apache 2 license
6+
license: Apache-2.0
77
summary: Test-suite for best-practice postgres hardening
88
version: 2.0.1
99
supports:

0 commit comments

Comments
 (0)