Closed amitchettri closed 4 years ago
for all the profile when --reporter html:name.html CLI flag is used. the generated page have below error's added on it
below is from a sample from nginx-baseline profile. And a sample snapshot from patch and linux basline profile
Failure/Error: [0m[1;34;4mDEFAULT_FAILURE_NOTIFIER[0m = lambda { |failure, _opts| raise failure }
# nginx-baseline-master/controls/nginx_spec.rb:133:in `block (3 levels) in load_with_context'
nginx-baseline-master/controls/nginx_spec.rb:133:in `block (3 levels) in load_with_context'
131# Couldn't get snippet for nginx-baseline-master/controls/nginx_spec.rb
I can't reproduce this error on ubuntu 18.04 and inspec 4.18.114 using dev-sec/linux-patch-baseline . What OS and inspec version are you using?
I can't reproduce this error on ubuntu 18.04 and inspec 4.18.114 using dev-sec/linux-patch-baseline . What OS and inspec version are you using?
Hello @clintoncwolfe,
Below are the details for the OS used and Inspec
4.18.104
OS where inspec is installed
CentOS Linux release 7.7.1908 (Core)
~What OS is the target?~ I'm able to reproduce the issue running 4.18.104 locally on a centos7 machine, but targeting a centos7 machine from a MacOS machine does not reproduce the issue. Curious.
Anyway, what I'd like to do is to put in a run_data filter (#5054). That will filter out the error message in plugin-type and core reporters (such as the proposed html2 reporter (#5045)) but not formatter-type reporters (such as the existing html reporter).
That's the approach I'd like to take as it avoids getting into the RSpec innards and our anticipated way forward is with the html2 reporter.
Target os is a mix of CentOS OS and ubuntu 18.04
I've looked into this in further detail, and found that it only occurs on a centOS host with an RSpec formatter such as html
; by the time it reaches the InSpec reporter (either core or plugin) it does not appear in the result message. So, fixing it on a run data filter isn't needed and #5054 is moot. Since our way forward for HTML reports is the html2 reporter plugin, and fixing this would require a monkeypatch into the HTML formatter (which we don't want people to use anyway), I think this is one we are not going to fix directly.
Thanks @clintoncwolfe for the detail information, l will check on this.
@amitchettri we merged in #5045 back on 2020-06-25 and released it with version 4.21.1: https://github.com/inspec/inspec/releases/tag/v4.21.1
Are you able to verify and see if it resolves your issue? Thanks!
@amitchettri per my comment from back in July, I haven't seen a follow-up so assuming we're resolved here. I'm going to close the issue. Feel free to file a new issue, based on any findings you have using the html2 reporter plugin, and we can go from there. Thanks!
Describe the problem
I am using InSpec Reporter to generate the patch scan report in HTML format but in the report I am getting error message as show in the snapshot. Can i get some help overcome this?
I have used the devsec community profile from the supermarket to get this report and below is the command executed
inspec supermarket exec dev-sec/linux-patch-baseline -t ssh://root:password@192.168.4.13 --reporter html:patch.htm
When i don't generate the report and get the output on screen the output is normal as below
Aha! Link: https://chef.aha.io/features/SH-2529