Skip to content

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

Description

@levid0s

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions