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

replace attribute calls with input calls so inspec 4.52+ works #403

Open
levid0s opened this issue Mar 7, 2022 · 0 comments
Open

replace attribute calls with input calls so inspec 4.52+ works #403

levid0s opened this issue Mar 7, 2022 · 0 comments
Assignees

Comments

@levid0s
Copy link

levid0s commented Mar 7, 2022

Hi,

Just wondering if this resource pack should work with the latest Inspec version?
On my end I'm getting the following error generated for every .rb file inside inspec-gcp-1.10.19.tar.gz after upgrading the inspec client.

$ inspec --version�[0;m
4.52.9
[...]
$ inspec vendor test --overwrite
[2022-03-07 14:17:04] Dependencies for profile test successfully vendored to /builds/my_repo/test/vendor

$ inspec check test
/builds/my_repo/test/vendor/40dfc35279bb1e74d51fac6fcb8a9db2980e4719a3d7487d99fdf77309963351/inspec-gcp-1.10.19/.rubocop.yml: Warning: no department given for Documentation.
/builds/my_repo/test/vendor/40dfc35279bb1e74d51fac6fcb8a9db2980e4719a3d7487d99fdf77309963351/inspec-gcp-1.10.19/.rubocop.yml: Warning: no department given for Documentation.
[...]
[2022-03-07 14:17:15] Offenses:
[2022-03-07 14:17:15] �[36m × test/vendor/40dfc35279bb1e74d51fac6fcb8a9db2980e4719a3d7487d99fdf77309963351/inspec-gcp-1.10.19/test/integration/verify/controls/container_cluster.rb:3:18:  [Correctable] InSpec/Deprecations/AttributeHelper: InSpec attributes have been renamed to inputs. Use the input method not the deprecation attribute method to access these values.
[2022-03-07 14:17:15] �[0m�[36m × test/vendor/40dfc35279bb1e74d51fac6fcb8a9db2980e4719a3d7487d99fdf77309963351/inspec-gcp-1.10.19/test/integration/verify/controls/container_cluster.rb:3:45:  [Correctable] InSpec/Deprecations/AttributeDefault: The InSpec inputs default option has been replaced with the value option.
[2022-03-07 14:17:15] �[0m�[36m × test/vendor/40dfc35279bb1e74d51fac6fcb8a9db2980e4719a3d7487d99fdf77309963351/inspec-gcp-1.10.19/test/integration/verify/controls/container_cluster.rb:4:25:  [Correctable] InSpec/Deprecations/AttributeHelper: InSpec attributes have been renamed to inputs. Use the input method not the deprecation attribute method to access these values.

Looking at the inspec-gcp source code I do see that indeed the attribute method is being used. (I don't have any ruby knowledge)

gcp_kube_cluster_name = attribute(:gcp_kube_cluster_name, default: '', description: 'The GKE cluster name.')

Thanks

@clintoncwolfe clintoncwolfe changed the title Inspec 4.52+ support? replace attribute calls with input calls so inspec 4.52+ works Mar 10, 2022
@sa-progress sa-progress self-assigned this Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants