Closed ghunsl closed 2 years ago
@ghunsl Were you attempting to run with Docker? Can you please try again with docker image tagged 2.0.7?
I had the same error for CentOS 7.
With the container tagged 2.0.7 for CentOS 7, I received the following undefined method 'split' for nil:NilClass
error:
Traceback (most recent call last):
12: from /usr/local/bundle/bin/inspec_tools:23:in `<main>'
11: from /usr/local/bundle/bin/inspec_tools:23:in `load'
10: from /usr/local/bundle/gems/inspec_tools-2.0.7/exe/inspec_tools:14:in `<top (required)>'
9: from /usr/local/bundle/gems/inspec-core-4.22.1/lib/inspec/base_cli.rb:35:in `start'
8: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
7: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
6: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
5: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
4: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/plugin_cli.rb:133:in `pdf2inspec'
3: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:37:in `to_inspec'
2: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:59:in `parse_controls'
1: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:59:in `each'
/usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:62:in `block in parse_controls': undefined method `split' for nil:NilClass (NoMethodError)
The included Ubuntu benchmark in examples completed successfully.
I had the same error for CentOS 7.
With the container tagged 2.0.7 for CentOS 7, I received the following
undefined method 'split' for nil:NilClass
error:Traceback (most recent call last): 12: from /usr/local/bundle/bin/inspec_tools:23:in `<main>' 11: from /usr/local/bundle/bin/inspec_tools:23:in `load' 10: from /usr/local/bundle/gems/inspec_tools-2.0.7/exe/inspec_tools:14:in `<top (required)>' 9: from /usr/local/bundle/gems/inspec-core-4.22.1/lib/inspec/base_cli.rb:35:in `start' 8: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/base.rb:485:in `start' 7: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch' 6: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command' 5: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run' 4: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/plugin_cli.rb:133:in `pdf2inspec' 3: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:37:in `to_inspec' 2: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:59:in `parse_controls' 1: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:59:in `each' /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:62:in `block in parse_controls': undefined method `split' for nil:NilClass (NoMethodError)
The included Ubuntu benchmark in examples completed successfully.
Is the PDF you are trying to convert a publicly available PDF?
@tomrobison Your current issue will probably come down to the way the PDF is formatted. But from what you said it sounds like 2.0.7 fixed the original problem...
I did run the RedHat Benchmark so to be inline with the original poster. The output was
Traceback (most recent call last):
12: from /usr/local/bundle/bin/inspec_tools:23:in `<main>'
11: from /usr/local/bundle/bin/inspec_tools:23:in `load'
10: from /usr/local/bundle/gems/inspec_tools-2.0.7/exe/inspec_tools:14:in `<top (required)>'
9: from /usr/local/bundle/gems/inspec-core-4.22.1/lib/inspec/base_cli.rb:35:in `start'
8: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/base.rb:485:in `start'
7: from /usr/local/bundle/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
6: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
5: from /usr/local/bundle/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
4: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/plugin_cli.rb:133:in `pdf2inspec'
3: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:37:in `to_inspec'
2: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:59:in `parse_controls'
1: from /usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:59:in `each'
/usr/local/bundle/gems/inspec_tools-2.0.7/lib/inspec_tools/pdf.rb:62:in `block in parse_controls': undefined method `split' for nil:NilClass (NoMethodError)
If the issue was that the PDF benchmark was not correctly processed, then the issue is not resolved.
If the issue was there was no stacktrace, then the issue is resolved.
PDF2InSpec is no longer being maintained as inspec_tools is being depreciated, for more information see the SAF CLI
When I run following command to convert pdf to inspec, I get an exception error.
Running with debug option does not output anything else, either.