0

我几周以来一直有这个问题。我在 jenkins 管道中使用 chef inspec 进行静态安全评估。我尝试在 html 报告中生成产品,但我在 jenkins 的输入/输出中遇到了这个问题:

输入:

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

输出:

  • 检查执行https://github.com/dev-sec/linux-baseline/archive/master.tar.gz -t docker ://microservices-sample --reporter html:/Results/Linux_Baseline_report.html --chef-license =接受/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'来自/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:ineach' 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' 来自 /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' 来自 /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' 来自 /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' 来自 /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' 来自 /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb: 127:invoke_command' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in 从 /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in dispatch start' from /opt/inspec/embedded/lib/ruby/gems/2.7.0/gems/inspec-core-4.46.13/lib/inspec/base_cli.rb:35:in ' 来自 /opt/inspec/嵌入式/lib/ruby/gems/2.7.0/gems/inspec-bin-4.46.13/bin/inspec:11:in<top (required)>' from /usr/bin/inspec:272:in 从/usr/bin/inspec:272:in `'加载'
4

0 回答 0