Getting error: no implicit conversion of Array into String (TypeError)


#1

Hi,

I get the below error when i run below simple controls in inspec on cisco IOS 15.2. I also got the same error when i run compliance scan using ready mate profile available on chef automate (CIS Cisco IOS 15 Benchmark Level 1 v4.0.0 (admin/cis-ciscoios15-level1)). Anyone can advise?

Control which i run (example.rb)
========================
control "xccdf_org.cisecurity.benchmarks_rule_1.1.1_Enable_aaa_new-model" do
  title "Enable 'aaa new-model'"
  desc  "
    This command enables the AAA access control system.
    
    Rationale: Authentication, authorization and accounting (AAA) services provide an authoritative source for managing and monitoring access for devices. Centralizing control improves consistency of access control, the services that may be accessed once authenticated and accountability by tracking services accessed. Additionally, centralizing access control simplifies and reduces administrative costs of account provisioning and de-provisioning, especially when managing a large number of devices.
  "
  impact 1.0
  describe cisco_ios_running_config do
    it { should have_line(/^aaa new-model$/) }
  end
end

Error (from Inspec)
================
PS C:\Users\rccc\inspec\ciscoharden\controls> inspec exec example.rb -t ssh://cisco@192.168.10.91 --password 'xxxxx'
C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.25/lib/train/platforms/detect/helpers/os_common.rb:137:in
`update': no implicit conversion of Array into String (TypeError)
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.25/lib/train/platforms/detect/helpers/os_comm
on.rb:137:in `uuid_from_string'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.25/lib/train/platforms/detect/uuid.rb:19:in `
find_or_create_uuid'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.25/lib/train/platforms/platform.rb:45:in `uui
d'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/train-1.4.25/lib/train/platforms/platform.rb:52:in `[]'

        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/resources/platform.rb:41:in `[]'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/inspec/formatters/base.rb:190:in `pla
tform'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/inspec/formatters/base.rb:72:in `stop
'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:201:in `blo
ck in notify'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:200:in `eac
h'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:200:in `not
ify'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:194:in `sto
p'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:167:in `blo
ck in finish'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:186:in `clo
se_after'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:166:in `fin
ish'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/reporter.rb:76:in `repo
rt'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/rspec-core-3.8.0/lib/rspec/core/runner.rb:110:in `run_s
pecs'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/inspec/runner_rspec.rb:77:in `run'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/inspec/runner.rb:132:in `run_tests'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/inspec/runner.rb:103:in `run'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/lib/inspec/cli.rb:172:in `exec'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/command.rb:27:in `run'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/invocation.rb:126:in `invoke_comma
nd'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor.rb:387:in `dispatch'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/thor-0.20.0/lib/thor/base.rb:466:in `start'
        from C:/opscode/inspec/embedded/lib/ruby/gems/2.4.0/gems/inspec-2.2.61/bin/inspec:12:in `<top (required)>'
        from C:/opscode/inspec/bin/inspec:104:in `load'
        from C:/opscode/inspec/bin/inspec:104:in `<main>'