dev-sec / cis-dil-benchmark

CIS Distribution Independent Linux Benchmark - InSpec Profile
Apache License 2.0
149 stars 92 forks source link

dil-benchmark-1.6.2.2: undefined method `positive?' for #<RSpec::Matchers::DSL::Matcher cmp> #72

Closed benjamin-kuhar closed 4 years ago

benjamin-kuhar commented 4 years ago

Describe the bug As of a couple of days ago, our DIL benchmarks have had an undefined method 'positive?' Rspec failure for the 1.6.2.2 control examining apparmor_status --profiled.

Expected behavior I would expect this test to successfully run and not throw Rspec failures

Actual behavior

<testcase name="Command: `apparmor_status --profiled` stdout " classname="cis-dil-benchmark.cis-dil-benchmark-1.6.2.2" target="ssh://ubuntu@127.0.0.1:2200" time="0.000119002">
<failure message="undefined method `positive?' for #<RSpec::Matchers::DSL::Matcher cmp>"/>
</testcase>

Example code

OS / Environment

OS: Ubuntu 18.04

Inspec Version

3.9.0

Baseline Version

master

Additional context

chris-rock commented 4 years ago

Lets reverse the .positive? addition from the last PR. https://github.com/dev-sec/cis-dil-benchmark/pull/70/files#diff-6a65989c72f0ff31c2b298aa95a97e8bR154 Which ruby version are you using?

benjamin-kuhar commented 4 years ago

2.5 installed via our Ubuntu 18.04 container's apt-get. This could be updated though since Inspec is the only thing using Ruby for our benchmarking, if it would fix this issue.

Is there any documentation stating minimum Inspec / Ruby versions?

Thanks for everything you all do here!

chris-rock commented 4 years ago

@benjamin-kuhar Can you try #73?

benjamin-kuhar commented 4 years ago

Hi @chris-rock,

The tests completed successfully for me when running from that branch.

chris-rock commented 4 years ago

@benjamin-kuhar Thank you for testing