I've this problem from weeks. I'm using chef inspec in jenkins pipeline for Static Security Assesment. I try to product at html report but i've this problem on jenkins' input/ output:
(I think the problem is "gems" because the path of the error is always coming from ruby/gems/2.7.0/gems )
(I am tired. I've had this error for weeks and I'm stuck)
input: inspec exec https://github.com/dev-sec/linux-baseline/archive/master.tar.gz -t docker://microservices-sample --reporter html:/Results/Linux_Baseline_report.html --chef-license=accept || true
output:
inspec exec https://github.com/dev-sec/linux-baseline/archive/master.tar.gz -t docker://microservices-sample --reporter html:/Results/Linux_Baseline_report.html --chef-license=accept /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:269:in initialize': Permission denied @ rb_sysopen - /Results/Linux_Baseline_report.html (Errno::EACCES) from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:269:in new' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:269:in open_stream' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:154:in block in add' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:154:in map' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/formatters.rb:154:in add' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/rspec-core-3.10.1/lib/rspec/core/configuration.rb:974:in add_formatter' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner_rspec.rb:142:in block in set_optional_formatters' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner_rspec.rb:137:in each' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner_rspec.rb:137:in set_optional_formatters' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner_rspec.rb:155:in configure_output' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner_rspec.rb:115:in reset' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner_rspec.rb:18:in initialize' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner.rb:59:in new' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/runner.rb:59:in initialize' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/cli.rb:285:in new' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/cli.rb:285:in exec' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in run' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in invoke_command' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in dispatch' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in start' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/base_cli.rb:35:in start' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-bin-4.46.13/bin/inspec:11:in <top (required)>' from /usr/bin/inspec:272:in load' from /usr/bin/inspec:272:in `'