Skip to content

Commit

Permalink
use input instead of attribute (#47)
Browse files Browse the repository at this point in the history
* use input instead of attribute

In the last versions of Inspec and cinc-auditor, attribute is deprecated and input should be used.

https://docs.chef.io/workstation/cookstyle/inspec_deprecations_attributehelper/
Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* Update inspec.yml

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>
  • Loading branch information
micheelengronne authored Jan 12, 2022
1 parent 7ba9974 commit 81e7191
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controls/ssl_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# author: Patrick Muench
# author: Christoph Kappel

invalid_targets = attribute(
invalid_targets = input(
'invalid_targets',
value: [
'127.0.0.1',
Expand All @@ -30,19 +30,19 @@
)

# Array of TCP ports to exclude from SSL checking. For example: [443, 8443]
exclude_ports = attribute(
exclude_ports = input(
'exclude_ports',
value: [],
description: 'Array of TCP ports to exclude from SSL checking'
)

target_hostname = attribute(
target_hostname = input(
'target_hostname',
value: command('hostname').stdout.strip,
description: 'Target hostname to check'
)

force_ssl = attribute(
force_ssl = input(
'force_ssl',
value: false,
description: 'The profile should not check if SSL is enabled on every port and assume it is'
Expand Down
1 change: 1 addition & 0 deletions inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ maintainer: DevSec Hardening Framework Team
copyright: DevSec Hardening Framework Team & Chef Software Inc.
copyright_email: hello@dev-sec.io
license: Apache-2.0
inspec_version: '>= 4.6.3'
version: 1.6.4
supports:
- inspec_version: '>= 1.21.0'
Expand Down

0 comments on commit 81e7191

Please sign in to comment.