This is technically incorrect YAML, but if you transcode YAML between several tools you may end up with a date/time value being an explicit string.
It would be helpful if InSpec supported any string value that easily translates to a Time.
Signed-off-by: James Stocks <jstocks@chef.io>
Fixes#5037
The YAML parser may parse a waiver timestamp as a Time rather than a Date. Even when the user doesn't care about time, they may be using a tool that outputs YAML with trailing zeroes for hour, minutes, seconds etc.
Signed-off-by: James Stocks <jstocks@chef.io>
Fixes#5031
See above issue for full context, this updates to the latest rubocop requirements for incoming ruby OpenSSL deprecations
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
The comment about running `bundle exec rake dependencies:update_omnibus_gemfile_lock`
is copy-pasta from chef/chef. The inspec project does not commit any
Gemfile.lock files, including omnibus/Gemfile.lock, due to
`Gemfile.lock` being in the `.gitignore` file.
Signed-off-by: Bryan McLellan <btm@loftninjas.org>
Recent versions of Ruby have included Rubygems and Bundler, which they
did not always do. We also recently fixed some issues in Appbundler so
these software dependencies are no longer needed.
Signed-off-by: tyler-ball <tball@chef.io>
I removed the skip to see what would break, and on my Windows laptop
these tests pass OK. The TODO didn't explain what wasn't applicable to
Windows, so I'm just going to remove it.
Signed-off-by: James Stocks <jstocks@chef.io>
The base reporter class should access the InSpec config cache, instead of the runner needing to inject config into the base reporter
Signed-off-by: James Stocks <jstocks@chef.io>
When this part of the README was updated five years ago ( b58a4b3f43 ), the executable was to be found in `bin/inspec`. It has since been extracted to `inspec-bin/bin/inspec`.
This current phrasing could cause some confusion as a user might actually run `bundle install` from their root and try to then run `bin/inspec`.
This commit clarifies that you need to first `cd` down into `inspec-bin`
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
In https://github.com/inspec/inspec/issues/4936 the issue was reported that naming an input the same as a control caused an unexpected failure.
In that particular case, the naming was a result of a pre-waivers workaround which is no longer necessary, but ultimately a breakage of that name clash is an unexpected occurrance.
Due to how inputs are named and registered, `__apply_waivers` thinks that an object is a waiver that is not a waiver and tries to process it. On the micro level, it breaks when trying to pass a variable to a string as if it were a Hash.
It is imperative that we preserve 100% of the current featureset, pass our tests, and fix this edge case along with new test coverage for the failure.
This PR updates the code to do a slightly more elegant and small ‘waiver check’ to stop the namespace clash from breaking our code.
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
They don't need to be json specific, they should apply to any reporter if the user has chosen these settings.
Signed-off-by: James Stocks <jstocks@chef.io>