Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inspec-gcp : failure when using gem nori:2.7.0 #596

Open
vedisquori opened this issue Feb 15, 2024 · 1 comment
Open

inspec-gcp : failure when using gem nori:2.7.0 #596

vedisquori opened this issue Feb 15, 2024 · 1 comment

Comments

@vedisquori
Copy link

vedisquori commented Feb 15, 2024

Hi, i'm a bit new to inspec and inspec-gcp but there is what I found
From two days ago, there was a new release of gem nori 2.7.0, something changed the default behavior of inspec-gcp.

Describe the problem

When launching bundle exec kitchen verify, there is an error which says : undefined method '[]' for nil:NilClass
I tried directly with bundle exec inspec exec . -t gcp:// same thing, but it goes a bit deeper into the error :
Input 'my_input' does not have a value. Skipping test.libraries/google_compute_target_http_proxy.rb:56:in 'to_s': undefined method `[]' for nil:NilClass (NoMethodError)

When forcing nori:2.6.0 in gemfile, all goes according to plan, no error and inspec-gcp works well.

Possible Solution

Forcing usage of nori:2.6.0 or wait for a fix in next nori version ?

@brettcurtis
Copy link

I'm seeing this specifically on the following resource with the most basic tests:

control 'service_account' do
  title 'Service Account'

  # Service Account Resource
  # https://www.inspec.io/docs/reference/resources/google_service_account

  describe google_service_account(project: 'my-project-tf40dbd6-sb', name: '[email protected]' ) do
    it { should exist }
  end
end

Other resource like google_service_account_keys and google_project_iam_binding work fine.

Adding nori:2.6.0 to my Gemfile helped me W/A the problem. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants