inspec 4.18.51 → 4.18.85
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/inspec.gemspec +15 -37
- data/lib/resource_support/aws/aws_resource_mixin.rb +1 -1
- metadata +22 -709
- data/Gemfile +0 -61
- data/LICENSE +0 -14
- data/README.md +0 -474
- data/etc/deprecations.json +0 -125
- data/etc/plugin_filters.json +0 -45
- data/lib/bundles/README.md +0 -3
- data/lib/bundles/inspec-compliance/api.rb +0 -7
- data/lib/bundles/inspec-compliance/configuration.rb +0 -7
- data/lib/bundles/inspec-compliance/http.rb +0 -7
- data/lib/bundles/inspec-compliance/support.rb +0 -7
- data/lib/bundles/inspec-compliance/target.rb +0 -7
- data/lib/bundles/inspec-supermarket.rb +0 -9
- data/lib/bundles/inspec-supermarket/README.md +0 -45
- data/lib/bundles/inspec-supermarket/api.rb +0 -87
- data/lib/bundles/inspec-supermarket/cli.rb +0 -71
- data/lib/bundles/inspec-supermarket/target.rb +0 -31
- data/lib/inspec.rb +0 -30
- data/lib/inspec/archive/tar.rb +0 -25
- data/lib/inspec/archive/zip.rb +0 -15
- data/lib/inspec/backend.rb +0 -101
- data/lib/inspec/base_cli.rb +0 -318
- data/lib/inspec/cached_fetcher.rb +0 -65
- data/lib/inspec/cli.rb +0 -469
- data/lib/inspec/completions/bash.sh.erb +0 -45
- data/lib/inspec/completions/fish.sh.erb +0 -34
- data/lib/inspec/completions/zsh.sh.erb +0 -61
- data/lib/inspec/config.rb +0 -511
- data/lib/inspec/control_eval_context.rb +0 -248
- data/lib/inspec/dependencies/cache.rb +0 -74
- data/lib/inspec/dependencies/dependency_set.rb +0 -93
- data/lib/inspec/dependencies/lockfile.rb +0 -115
- data/lib/inspec/dependencies/requirement.rb +0 -135
- data/lib/inspec/dependencies/resolver.rb +0 -86
- data/lib/inspec/describe_base.rb +0 -53
- data/lib/inspec/dist.rb +0 -20
- data/lib/inspec/dsl.rb +0 -115
- data/lib/inspec/dsl_shared.rb +0 -32
- data/lib/inspec/env_printer.rb +0 -156
- data/lib/inspec/errors.rb +0 -18
- data/lib/inspec/exceptions.rb +0 -11
- data/lib/inspec/expect.rb +0 -42
- data/lib/inspec/fetcher.rb +0 -48
- data/lib/inspec/fetcher/git.rb +0 -211
- data/lib/inspec/fetcher/local.rb +0 -116
- data/lib/inspec/fetcher/mock.rb +0 -34
- data/lib/inspec/fetcher/url.rb +0 -281
- data/lib/inspec/file_provider.rb +0 -318
- data/lib/inspec/formatters.rb +0 -3
- data/lib/inspec/formatters/base.rb +0 -269
- data/lib/inspec/formatters/json_rspec.rb +0 -20
- data/lib/inspec/formatters/show_progress.rb +0 -12
- data/lib/inspec/globals.rb +0 -9
- data/lib/inspec/impact.rb +0 -36
- data/lib/inspec/input.rb +0 -421
- data/lib/inspec/input_dsl_helpers.rb +0 -26
- data/lib/inspec/input_registry.rb +0 -315
- data/lib/inspec/library_eval_context.rb +0 -55
- data/lib/inspec/log.rb +0 -7
- data/lib/inspec/metadata.rb +0 -253
- data/lib/inspec/method_source.rb +0 -20
- data/lib/inspec/objects.rb +0 -14
- data/lib/inspec/objects/control.rb +0 -85
- data/lib/inspec/objects/describe.rb +0 -106
- data/lib/inspec/objects/each_loop.rb +0 -41
- data/lib/inspec/objects/input.rb +0 -49
- data/lib/inspec/objects/list.rb +0 -15
- data/lib/inspec/objects/or_test.rb +0 -45
- data/lib/inspec/objects/ruby_helper.rb +0 -13
- data/lib/inspec/objects/tag.rb +0 -32
- data/lib/inspec/objects/test.rb +0 -94
- data/lib/inspec/objects/value.rb +0 -32
- data/lib/inspec/plugin/v1.rb +0 -2
- data/lib/inspec/plugin/v1/plugin_types/cli.rb +0 -22
- data/lib/inspec/plugin/v1/plugin_types/fetcher.rb +0 -83
- data/lib/inspec/plugin/v1/plugin_types/resource.rb +0 -176
- data/lib/inspec/plugin/v1/plugin_types/secret.rb +0 -11
- data/lib/inspec/plugin/v1/plugin_types/source_reader.rb +0 -36
- data/lib/inspec/plugin/v1/plugins.rb +0 -59
- data/lib/inspec/plugin/v1/registry.rb +0 -90
- data/lib/inspec/plugin/v2.rb +0 -46
- data/lib/inspec/plugin/v2/activator.rb +0 -40
- data/lib/inspec/plugin/v2/config_file.rb +0 -151
- data/lib/inspec/plugin/v2/filter.rb +0 -96
- data/lib/inspec/plugin/v2/installer.rb +0 -512
- data/lib/inspec/plugin/v2/loader.rb +0 -321
- data/lib/inspec/plugin/v2/plugin_base.rb +0 -112
- data/lib/inspec/plugin/v2/plugin_types/cli.rb +0 -49
- data/lib/inspec/plugin/v2/plugin_types/dsl.rb +0 -11
- data/lib/inspec/plugin/v2/plugin_types/input.rb +0 -34
- data/lib/inspec/plugin/v2/plugin_types/mock.rb +0 -12
- data/lib/inspec/plugin/v2/registry.rb +0 -98
- data/lib/inspec/plugin/v2/status.rb +0 -29
- data/lib/inspec/profile.rb +0 -658
- data/lib/inspec/profile_context.rb +0 -203
- data/lib/inspec/profile_vendor.rb +0 -84
- data/lib/inspec/reporters.rb +0 -73
- data/lib/inspec/reporters/automate.rb +0 -78
- data/lib/inspec/reporters/base.rb +0 -25
- data/lib/inspec/reporters/cli.rb +0 -370
- data/lib/inspec/reporters/json.rb +0 -113
- data/lib/inspec/reporters/json_automate.rb +0 -80
- data/lib/inspec/reporters/json_min.rb +0 -48
- data/lib/inspec/reporters/junit.rb +0 -77
- data/lib/inspec/reporters/yaml.rb +0 -20
- data/lib/inspec/require_loader.rb +0 -29
- data/lib/inspec/resource.rb +0 -114
- data/lib/inspec/resources.rb +0 -130
- data/lib/inspec/resources/aide_conf.rb +0 -153
- data/lib/inspec/resources/apache.rb +0 -47
- data/lib/inspec/resources/apache_conf.rb +0 -156
- data/lib/inspec/resources/apt.rb +0 -151
- data/lib/inspec/resources/audit_policy.rb +0 -64
- data/lib/inspec/resources/auditd.rb +0 -251
- data/lib/inspec/resources/auditd_conf.rb +0 -45
- data/lib/inspec/resources/bash.rb +0 -33
- data/lib/inspec/resources/bond.rb +0 -70
- data/lib/inspec/resources/bridge.rb +0 -125
- data/lib/inspec/resources/bsd_service.rb +0 -2
- data/lib/inspec/resources/chocolatey_package.rb +0 -82
- data/lib/inspec/resources/command.rb +0 -91
- data/lib/inspec/resources/cpan.rb +0 -58
- data/lib/inspec/resources/cran.rb +0 -64
- data/lib/inspec/resources/crontab.rb +0 -173
- data/lib/inspec/resources/csv.rb +0 -56
- data/lib/inspec/resources/dh_params.rb +0 -83
- data/lib/inspec/resources/directory.rb +0 -23
- data/lib/inspec/resources/docker.rb +0 -274
- data/lib/inspec/resources/docker_container.rb +0 -91
- data/lib/inspec/resources/docker_image.rb +0 -84
- data/lib/inspec/resources/docker_object.rb +0 -52
- data/lib/inspec/resources/docker_plugin.rb +0 -64
- data/lib/inspec/resources/docker_service.rb +0 -91
- data/lib/inspec/resources/elasticsearch.rb +0 -165
- data/lib/inspec/resources/etc_fstab.rb +0 -96
- data/lib/inspec/resources/etc_group.rb +0 -157
- data/lib/inspec/resources/etc_hosts.rb +0 -68
- data/lib/inspec/resources/etc_hosts_allow.rb +0 -2
- data/lib/inspec/resources/etc_hosts_allow_deny.rb +0 -114
- data/lib/inspec/resources/etc_hosts_deny.rb +0 -2
- data/lib/inspec/resources/file.rb +0 -339
- data/lib/inspec/resources/filesystem.rb +0 -139
- data/lib/inspec/resources/firewalld.rb +0 -148
- data/lib/inspec/resources/gem.rb +0 -80
- data/lib/inspec/resources/group.rb +0 -2
- data/lib/inspec/resources/groups.rb +0 -241
- data/lib/inspec/resources/grub_conf.rb +0 -230
- data/lib/inspec/resources/host.rb +0 -310
- data/lib/inspec/resources/http.rb +0 -275
- data/lib/inspec/resources/iis_app.rb +0 -101
- data/lib/inspec/resources/iis_app_pool.rb +0 -127
- data/lib/inspec/resources/iis_site.rb +0 -148
- data/lib/inspec/resources/iis_website.rb +0 -2
- data/lib/inspec/resources/inetd_conf.rb +0 -53
- data/lib/inspec/resources/ini.rb +0 -28
- data/lib/inspec/resources/interface.rb +0 -204
- data/lib/inspec/resources/ip6tables.rb +0 -79
- data/lib/inspec/resources/iptables.rb +0 -80
- data/lib/inspec/resources/json.rb +0 -116
- data/lib/inspec/resources/kernel_module.rb +0 -106
- data/lib/inspec/resources/kernel_parameter.rb +0 -54
- data/lib/inspec/resources/key_rsa.rb +0 -66
- data/lib/inspec/resources/ksh.rb +0 -33
- data/lib/inspec/resources/launchd_service.rb +0 -2
- data/lib/inspec/resources/limits_conf.rb +0 -45
- data/lib/inspec/resources/linux_kernel_parameter.rb +0 -2
- data/lib/inspec/resources/login_defs.rb +0 -56
- data/lib/inspec/resources/mount.rb +0 -88
- data/lib/inspec/resources/mssql_session.rb +0 -117
- data/lib/inspec/resources/mysql.rb +0 -81
- data/lib/inspec/resources/mysql_conf.rb +0 -128
- data/lib/inspec/resources/mysql_session.rb +0 -88
- data/lib/inspec/resources/nginx.rb +0 -96
- data/lib/inspec/resources/nginx_conf.rb +0 -232
- data/lib/inspec/resources/noop.rb +0 -9
- data/lib/inspec/resources/npm.rb +0 -68
- data/lib/inspec/resources/ntp_conf.rb +0 -51
- data/lib/inspec/resources/oneget.rb +0 -71
- data/lib/inspec/resources/oracledb_session.rb +0 -149
- data/lib/inspec/resources/os.rb +0 -34
- data/lib/inspec/resources/os_env.rb +0 -86
- data/lib/inspec/resources/package.rb +0 -391
- data/lib/inspec/resources/packages.rb +0 -111
- data/lib/inspec/resources/parse_config.rb +0 -112
- data/lib/inspec/resources/parse_config_file.rb +0 -2
- data/lib/inspec/resources/passwd.rb +0 -73
- data/lib/inspec/resources/pip.rb +0 -132
- data/lib/inspec/resources/platform.rb +0 -112
- data/lib/inspec/resources/port.rb +0 -791
- data/lib/inspec/resources/postfix_conf.rb +0 -35
- data/lib/inspec/resources/postgres.rb +0 -152
- data/lib/inspec/resources/postgres_conf.rb +0 -116
- data/lib/inspec/resources/postgres_hba_conf.rb +0 -86
- data/lib/inspec/resources/postgres_ident_conf.rb +0 -75
- data/lib/inspec/resources/postgres_session.rb +0 -70
- data/lib/inspec/resources/powershell.rb +0 -67
- data/lib/inspec/resources/ppa.rb +0 -2
- data/lib/inspec/resources/processes.rb +0 -219
- data/lib/inspec/resources/rabbitmq_conf.rb +0 -2
- data/lib/inspec/resources/rabbitmq_config.rb +0 -52
- data/lib/inspec/resources/registry_key.rb +0 -296
- data/lib/inspec/resources/runit_service.rb +0 -2
- data/lib/inspec/resources/script.rb +0 -1
- data/lib/inspec/resources/security_identifier.rb +0 -91
- data/lib/inspec/resources/security_policy.rb +0 -182
- data/lib/inspec/resources/service.rb +0 -820
- data/lib/inspec/resources/shadow.rb +0 -150
- data/lib/inspec/resources/ssh_config.rb +0 -98
- data/lib/inspec/resources/sshd_config.rb +0 -2
- data/lib/inspec/resources/ssl.rb +0 -99
- data/lib/inspec/resources/sys_info.rb +0 -119
- data/lib/inspec/resources/systemd_service.rb +0 -2
- data/lib/inspec/resources/sysv_service.rb +0 -2
- data/lib/inspec/resources/toml.rb +0 -30
- data/lib/inspec/resources/upstart_service.rb +0 -2
- data/lib/inspec/resources/user.rb +0 -1
- data/lib/inspec/resources/users.rb +0 -742
- data/lib/inspec/resources/vbscript.rb +0 -67
- data/lib/inspec/resources/virtualization.rb +0 -255
- data/lib/inspec/resources/windows_feature.rb +0 -126
- data/lib/inspec/resources/windows_hotfix.rb +0 -37
- data/lib/inspec/resources/windows_registry_key.rb +0 -2
- data/lib/inspec/resources/windows_task.rb +0 -112
- data/lib/inspec/resources/wmi.rb +0 -109
- data/lib/inspec/resources/x509_certificate.rb +0 -143
- data/lib/inspec/resources/xinetd_conf.rb +0 -103
- data/lib/inspec/resources/xml.rb +0 -48
- data/lib/inspec/resources/yaml.rb +0 -42
- data/lib/inspec/resources/yum.rb +0 -162
- data/lib/inspec/resources/zfs_dataset.rb +0 -62
- data/lib/inspec/resources/zfs_pool.rb +0 -50
- data/lib/inspec/rspec_extensions.rb +0 -116
- data/lib/inspec/rule.rb +0 -389
- data/lib/inspec/runner.rb +0 -333
- data/lib/inspec/runner_mock.rb +0 -37
- data/lib/inspec/runner_rspec.rb +0 -184
- data/lib/inspec/runtime_profile.rb +0 -23
- data/lib/inspec/schema.rb +0 -245
- data/lib/inspec/secrets.rb +0 -15
- data/lib/inspec/secrets/yaml.rb +0 -29
- data/lib/inspec/shell.rb +0 -211
- data/lib/inspec/shell_detector.rb +0 -89
- data/lib/inspec/source_reader.rb +0 -26
- data/lib/inspec/ui.rb +0 -213
- data/lib/inspec/ui_table_helper.rb +0 -12
- data/lib/inspec/utils/command_wrapper.rb +0 -23
- data/lib/inspec/utils/convert.rb +0 -8
- data/lib/inspec/utils/database_helpers.rb +0 -75
- data/lib/inspec/utils/deprecation.rb +0 -6
- data/lib/inspec/utils/deprecation/config_file.rb +0 -109
- data/lib/inspec/utils/deprecation/deprecator.rb +0 -118
- data/lib/inspec/utils/deprecation/errors.rb +0 -14
- data/lib/inspec/utils/deprecation/global_method.rb +0 -9
- data/lib/inspec/utils/enumerable_delegation.rb +0 -7
- data/lib/inspec/utils/erlang_parser.rb +0 -190
- data/lib/inspec/utils/file_reader.rb +0 -24
- data/lib/inspec/utils/filter.rb +0 -461
- data/lib/inspec/utils/filter_array.rb +0 -25
- data/lib/inspec/utils/find_files.rb +0 -44
- data/lib/inspec/utils/hash.rb +0 -37
- data/lib/inspec/utils/json_log.rb +0 -15
- data/lib/inspec/utils/modulator.rb +0 -9
- data/lib/inspec/utils/nginx_parser.rb +0 -101
- data/lib/inspec/utils/object_traversal.rb +0 -47
- data/lib/inspec/utils/parser.rb +0 -277
- data/lib/inspec/utils/pkey_reader.rb +0 -17
- data/lib/inspec/utils/simpleconfig.rb +0 -121
- data/lib/inspec/utils/spdx.rb +0 -10
- data/lib/inspec/utils/spdx.txt +0 -383
- data/lib/inspec/utils/telemetry.rb +0 -3
- data/lib/inspec/utils/telemetry/collector.rb +0 -81
- data/lib/inspec/utils/telemetry/data_series.rb +0 -44
- data/lib/inspec/utils/telemetry/global_methods.rb +0 -22
- data/lib/inspec/version.rb +0 -3
- data/lib/matchers/matchers.rb +0 -341
- data/lib/plugins/README.md +0 -16
- data/lib/plugins/inspec-artifact/lib/inspec-artifact.rb +0 -12
- data/lib/plugins/inspec-artifact/lib/inspec-artifact/base.rb +0 -170
- data/lib/plugins/inspec-artifact/lib/inspec-artifact/cli.rb +0 -116
- data/lib/plugins/inspec-artifact/test/functional/inspec_artifact_test.rb +0 -50
- data/lib/plugins/inspec-compliance/README.md +0 -207
- data/lib/plugins/inspec-compliance/lib/inspec-compliance.rb +0 -12
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/api.rb +0 -362
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/api/login.rb +0 -198
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/cli.rb +0 -269
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/configuration.rb +0 -103
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/http.rb +0 -117
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/images/cc-token.png +0 -0
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/support.rb +0 -34
- data/lib/plugins/inspec-compliance/lib/inspec-compliance/target.rb +0 -146
- data/lib/plugins/inspec-compliance/test/functional/inspec_compliance_test.rb +0 -53
- data/lib/plugins/inspec-compliance/test/integration/default/cli.rb +0 -91
- data/lib/plugins/inspec-compliance/test/unit/api/login_test.rb +0 -190
- data/lib/plugins/inspec-compliance/test/unit/api_test.rb +0 -386
- data/lib/plugins/inspec-compliance/test/unit/target_test.rb +0 -155
- data/lib/plugins/inspec-habitat/Berksfile +0 -5
- data/lib/plugins/inspec-habitat/README.md +0 -150
- data/lib/plugins/inspec-habitat/kitchen.yml +0 -28
- data/lib/plugins/inspec-habitat/lib/inspec-habitat.rb +0 -11
- data/lib/plugins/inspec-habitat/lib/inspec-habitat/cli.rb +0 -41
- data/lib/plugins/inspec-habitat/lib/inspec-habitat/profile.rb +0 -265
- data/lib/plugins/inspec-habitat/templates/habitat/plan.sh.erb +0 -6
- data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/Berksfile +0 -2
- data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/README.md +0 -3
- data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/files/hab_setup.exp +0 -28
- data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/metadata.rb +0 -9
- data/lib/plugins/inspec-habitat/test/cookbooks/inspec_habitat_fixture/recipes/default.rb +0 -61
- data/lib/plugins/inspec-habitat/test/functional/inspec_habitat_test.rb +0 -34
- data/lib/plugins/inspec-habitat/test/integration/default/inspec_habitat/README.md +0 -3
- data/lib/plugins/inspec-habitat/test/integration/default/inspec_habitat/controls/inspec_habitat.rb +0 -40
- data/lib/plugins/inspec-habitat/test/integration/default/inspec_habitat/inspec.yml +0 -10
- data/lib/plugins/inspec-habitat/test/support/example_profile/README.md +0 -3
- data/lib/plugins/inspec-habitat/test/support/example_profile/controls/example.rb +0 -7
- data/lib/plugins/inspec-habitat/test/support/example_profile/inspec.yml +0 -10
- data/lib/plugins/inspec-habitat/test/unit/profile_test.rb +0 -242
- data/lib/plugins/inspec-init/README.md +0 -31
- data/lib/plugins/inspec-init/lib/inspec-init.rb +0 -12
- data/lib/plugins/inspec-init/lib/inspec-init/cli.rb +0 -15
- data/lib/plugins/inspec-init/lib/inspec-init/cli_plugin.rb +0 -243
- data/lib/plugins/inspec-init/lib/inspec-init/cli_profile.rb +0 -47
- data/lib/plugins/inspec-init/lib/inspec-init/renderer.rb +0 -97
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Gemfile +0 -11
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/LICENSE +0 -2
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/README.md +0 -28
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/Rakefile +0 -40
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template.rb +0 -14
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template/cli_command.rb +0 -62
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template/plugin.rb +0 -53
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/lib/inspec-plugin-template/version.rb +0 -8
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/fixtures/README.md +0 -24
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/functional/README.md +0 -12
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/functional/inspec_plugin_template_test.rb +0 -110
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/helper.rb +0 -24
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/unit/README.md +0 -17
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/unit/cli_args_test.rb +0 -67
- data/lib/plugins/inspec-init/templates/plugins/inspec-plugin-template/test/unit/plugin_def_test.rb +0 -51
- data/lib/plugins/inspec-init/templates/profiles/aws/libraries/.gitkeep +0 -0
- data/lib/plugins/inspec-init/templates/profiles/azure/libraries/.gitkeep +0 -0
- data/lib/plugins/inspec-init/templates/profiles/gcp/libraries/.gitkeep +0 -0
- data/lib/plugins/inspec-init/templates/profiles/os/README.md +0 -3
- data/lib/plugins/inspec-init/templates/profiles/os/controls/example.rb +0 -18
- data/lib/plugins/inspec-init/templates/profiles/os/inspec.yml +0 -10
- data/lib/plugins/inspec-init/templates/profiles/os/libraries/.gitkeep +0 -0
- data/lib/plugins/inspec-init/test/functional/inspec_init_plugin_test.rb +0 -184
- data/lib/plugins/inspec-init/test/functional/inspec_init_profile_test.rb +0 -121
- data/lib/plugins/inspec-plugin-manager-cli/README.md +0 -6
- data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli.rb +0 -17
- data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/cli_command.rb +0 -518
- data/lib/plugins/inspec-plugin-manager-cli/lib/inspec-plugin-manager-cli/plugin.rb +0 -12
- data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/config_dirs/empty/.gitkeep +0 -0
- data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/inspec-egg-white-omelette/lib/inspec-egg-white-omelette.rb +0 -2
- data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/inspec-egg-white-omelette/lib/inspec-egg-white-omelette/.gitkeep +0 -0
- data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/inspec-wrong-structure/.gitkeep +0 -0
- data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/wrong-name/lib/wrong-name.rb +0 -1
- data/lib/plugins/inspec-plugin-manager-cli/test/fixtures/plugins/wrong-name/lib/wrong-name/.gitkeep +0 -0
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/help_test.rb +0 -23
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/helper.rb +0 -62
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/install_test.rb +0 -368
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/list_test.rb +0 -101
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/search_test.rb +0 -129
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/uninstall_test.rb +0 -63
- data/lib/plugins/inspec-plugin-manager-cli/test/functional/update_test.rb +0 -84
- data/lib/plugins/inspec-plugin-manager-cli/test/unit/cli_args_test.rb +0 -77
- data/lib/plugins/inspec-plugin-manager-cli/test/unit/plugin_def_test.rb +0 -39
- data/lib/plugins/shared/core_plugin_test_helper.rb +0 -153
- data/lib/plugins/things-for-train-integration.rb +0 -14
- data/lib/source_readers/flat.rb +0 -36
- data/lib/source_readers/inspec.rb +0 -66
data/Gemfile
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
gem "inspec", path: "."
|
4
|
-
|
5
|
-
# This dependency is NOT used for normal gem deployment
|
6
|
-
# - instead, inspec-bin gemspec-depends on inspec
|
7
|
-
#
|
8
|
-
# However, AppBundler requires a top-level Gemfile.lock with inspec-bin
|
9
|
-
# in it in order to package the executable. Hence the odd backwards dependency.
|
10
|
-
gem "inspec-bin", path: "./inspec-bin"
|
11
|
-
|
12
|
-
gem "ffi", ">= 1.9.14"
|
13
|
-
|
14
|
-
group :omnibus do
|
15
|
-
gem "rb-readline"
|
16
|
-
gem "appbundler"
|
17
|
-
gem "ed25519" # ed25519 ssh key support done here as its a native gem we can't put in the gemspec
|
18
|
-
gem "bcrypt_pbkdf" # ed25519 ssh key support done here as its a native gem we can't put in the gemspec
|
19
|
-
end
|
20
|
-
|
21
|
-
group :test do
|
22
|
-
gem "chefstyle", "~> 0.13.0"
|
23
|
-
gem "minitest", "~> 5.5"
|
24
|
-
gem "minitest-sprint", "~> 1.0"
|
25
|
-
gem "rake", ">= 10"
|
26
|
-
gem "simplecov", "~> 0.10"
|
27
|
-
gem "concurrent-ruby", "~> 1.0"
|
28
|
-
gem "mocha", "~> 1.1"
|
29
|
-
gem "ruby-progressbar", "~> 1.8"
|
30
|
-
gem "webmock", "~> 3.0"
|
31
|
-
gem "m"
|
32
|
-
gem "pry", "~> 0.10"
|
33
|
-
gem "pry-byebug"
|
34
|
-
end
|
35
|
-
|
36
|
-
group :integration do
|
37
|
-
gem "berkshelf"
|
38
|
-
gem "chef", "< 15"
|
39
|
-
gem "test-kitchen"
|
40
|
-
gem "kitchen-vagrant"
|
41
|
-
gem "kitchen-inspec"
|
42
|
-
gem "kitchen-ec2"
|
43
|
-
gem "kitchen-dokken"
|
44
|
-
gem "git"
|
45
|
-
end
|
46
|
-
|
47
|
-
# gems for Maintainers.md generation
|
48
|
-
group :maintenance do
|
49
|
-
gem "tomlrb"
|
50
|
-
|
51
|
-
# To sync maintainers with github
|
52
|
-
gem "octokit"
|
53
|
-
gem "netrc"
|
54
|
-
end
|
55
|
-
|
56
|
-
group :deploy do
|
57
|
-
gem "inquirer"
|
58
|
-
end
|
59
|
-
|
60
|
-
# add these additional dependencies into Gemfile.local
|
61
|
-
eval_gemfile(__FILE__ + ".local") if File.exist?(__FILE__ + ".local")
|
data/LICENSE
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Copyright (c) 2015 Chef Software Inc.
|
2
|
-
Copyright (c) 2015 Vulcano Security GmbH.
|
3
|
-
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
you may not use this file except in compliance with the License.
|
6
|
-
You may obtain a copy of the License at
|
7
|
-
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
See the License for the specific language governing permissions and
|
14
|
-
limitations under the License.
|
data/README.md
DELETED
@@ -1,474 +0,0 @@
|
|
1
|
-
# Chef InSpec: Inspect Your Infrastructure
|
2
|
-
|
3
|
-
* **Project State: Active**
|
4
|
-
* **Issues Response SLA: 3 business days**
|
5
|
-
* **Pull Request Response SLA: 3 business days**
|
6
|
-
|
7
|
-
For more information on project states and SLAs, see [this documentation](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md).
|
8
|
-
|
9
|
-
[![Slack](https://community-slack.chef.io/badge.svg)](https://community-slack.chef.io/)
|
10
|
-
[![Build status](https://badge.buildkite.com/bf4c5fdc3858cc9f8c8bab8376e8e40d625ad046df9d4d8619.svg?branch=master)](https://buildkite.com/chef-oss/inspec-inspec-master-verify)
|
11
|
-
[![Coverage Status](https://coveralls.io/repos/github/inspec/inspec/badge.svg?branch=master)](https://coveralls.io/github/inspec/inspec?branch=master)
|
12
|
-
|
13
|
-
Chef InSpec is an open-source testing framework for infrastructure with a human- and machine-readable language for specifying compliance, security and policy requirements.
|
14
|
-
|
15
|
-
```ruby
|
16
|
-
# Disallow insecure protocols by testing
|
17
|
-
|
18
|
-
describe package('telnetd') do
|
19
|
-
it { should_not be_installed }
|
20
|
-
end
|
21
|
-
|
22
|
-
describe inetd_conf do
|
23
|
-
its("telnet") { should eq nil }
|
24
|
-
end
|
25
|
-
```
|
26
|
-
|
27
|
-
Chef InSpec makes it easy to run your tests wherever you need. More options are found in our [CLI docs](https://www.inspec.io/docs/reference/cli/).
|
28
|
-
|
29
|
-
```bash
|
30
|
-
# run test locally
|
31
|
-
inspec exec test.rb
|
32
|
-
|
33
|
-
# run test on remote host via SSH
|
34
|
-
inspec exec test.rb -t ssh://user@hostname -i /path/to/key
|
35
|
-
|
36
|
-
# run test on remote host using SSH agent private key authentication. Requires Chef InSpec 1.7.1
|
37
|
-
inspec exec test.rb -t ssh://user@hostname
|
38
|
-
|
39
|
-
# run test on remote windows host via WinRM
|
40
|
-
inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-password'
|
41
|
-
|
42
|
-
# run test on remote windows host via WinRM as a domain user
|
43
|
-
inspec exec test.rb -t winrm://windowshost --user 'UserName@domain' --password 'your-password'
|
44
|
-
|
45
|
-
# run test on docker container
|
46
|
-
inspec exec test.rb -t docker://container_id
|
47
|
-
```
|
48
|
-
|
49
|
-
# Features
|
50
|
-
|
51
|
-
- Built-in Compliance: Compliance no longer occurs at the end of the release cycle
|
52
|
-
- Targeted Tests: Chef InSpec writes tests that specifically target compliance issues
|
53
|
-
- Metadata: Includes the metadata required by security and compliance pros
|
54
|
-
- Easy Testing: Includes a command-line interface to run tests quickly
|
55
|
-
|
56
|
-
## Installation
|
57
|
-
|
58
|
-
Chef InSpec requires Ruby ( >= 2.4 ).
|
59
|
-
|
60
|
-
Note: Versions of Chef InSpec 4.0 and later require accepting the EULA to use. Please visit the [license acceptance page](https://docs.chef.io/chef_license_accept.html) on the Chef docs site for more information.
|
61
|
-
|
62
|
-
### Install as package
|
63
|
-
|
64
|
-
The Chef InSpec package is available for MacOS, RedHat, Ubuntu and Windows. Download the latest package at [Chef InSpec Downloads](https://downloads.chef.io/inspec) or install Chef InSpec via script:
|
65
|
-
|
66
|
-
```
|
67
|
-
# RedHat, Ubuntu, and macOS
|
68
|
-
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P inspec
|
69
|
-
|
70
|
-
# Windows
|
71
|
-
. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project inspec
|
72
|
-
```
|
73
|
-
|
74
|
-
### Install it via rubygems.org
|
75
|
-
|
76
|
-
When installing from source, gem dependencies may require ruby build tools to be installed.
|
77
|
-
|
78
|
-
For CentOS/RedHat/Fedora:
|
79
|
-
|
80
|
-
```bash
|
81
|
-
yum -y install ruby ruby-devel make gcc gcc-c++
|
82
|
-
```
|
83
|
-
|
84
|
-
For Ubuntu:
|
85
|
-
|
86
|
-
```bash
|
87
|
-
apt-get -y install ruby ruby-dev gcc g++ make
|
88
|
-
```
|
89
|
-
|
90
|
-
To install the `inspec` executable, which requires accepting the [Chef License](https://docs.chef.io/chef_license_accept.html), run:
|
91
|
-
|
92
|
-
```bash
|
93
|
-
gem install inspec-bin
|
94
|
-
```
|
95
|
-
|
96
|
-
You may also use `inspec` as a library, with no executable. This does not require accepting the license. To install the library as a gem, run:
|
97
|
-
|
98
|
-
```bash
|
99
|
-
gem install inspec
|
100
|
-
```
|
101
|
-
|
102
|
-
|
103
|
-
### Usage via Docker
|
104
|
-
|
105
|
-
Download the image and define a function for convenience:
|
106
|
-
|
107
|
-
For Linux:
|
108
|
-
|
109
|
-
```
|
110
|
-
docker pull chef/inspec
|
111
|
-
function inspec { docker run -it --rm -v $(pwd):/share chef/inspec "$@"; }
|
112
|
-
```
|
113
|
-
|
114
|
-
For Windows (PowerShell):
|
115
|
-
|
116
|
-
```
|
117
|
-
docker pull chef/inspec
|
118
|
-
function inspec { docker run -it --rm -v "$(pwd):/share" chef/inspec $args; }
|
119
|
-
```
|
120
|
-
|
121
|
-
If you call `inspec` from your shell, it automatically mounts the current directory into the Docker container. Therefore you can easily use local tests and key files. Note: Only files in the current directory and sub-directories are available within the container.
|
122
|
-
|
123
|
-
```
|
124
|
-
$ ls -1
|
125
|
-
vagrant
|
126
|
-
test.rb
|
127
|
-
|
128
|
-
$ inspec exec test.rb -t ssh://root@192.168.64.2:11022 -i vagrant
|
129
|
-
..
|
130
|
-
|
131
|
-
Finished in 0.04321 seconds (files took 0.54917 seconds to load)
|
132
|
-
2 examples, 0 failures
|
133
|
-
```
|
134
|
-
|
135
|
-
|
136
|
-
### Install it from source
|
137
|
-
|
138
|
-
Note that installing from OS packages from [the download page](https://downloads.chef.io) is the preferred method.
|
139
|
-
|
140
|
-
That requires [bundler](http://bundler.io/):
|
141
|
-
|
142
|
-
```bash
|
143
|
-
bundle install
|
144
|
-
bundle exec bin/inspec help
|
145
|
-
```
|
146
|
-
|
147
|
-
To install it as a gem locally, run:
|
148
|
-
|
149
|
-
```bash
|
150
|
-
gem build inspec.gemspec
|
151
|
-
gem install inspec-*.gem
|
152
|
-
```
|
153
|
-
|
154
|
-
On Windows, you need to install [Ruby](http://rubyinstaller.org/downloads/) with [Ruby Development Kit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) to build dependencies with its native extensions.
|
155
|
-
|
156
|
-
### Install via Chef Habitat
|
157
|
-
|
158
|
-
Currently, this method of installation only supports Linux. See the [Chef Habitat site](https://www.habitat.sh/) for more information.
|
159
|
-
|
160
|
-
Download the `hab` binary from the [Chef Habitat](https://www.habitat.sh/docs/get-habitat/) site.
|
161
|
-
|
162
|
-
```bash
|
163
|
-
hab pkg install chef/inspec --binlink
|
164
|
-
|
165
|
-
inspec
|
166
|
-
```
|
167
|
-
|
168
|
-
### Run Chef InSpec
|
169
|
-
|
170
|
-
You should now be able to run:
|
171
|
-
|
172
|
-
```bash
|
173
|
-
$ inspec --help
|
174
|
-
Commands:
|
175
|
-
inspec archive PATH # archive a profile to tar.gz (default) ...
|
176
|
-
inspec check PATH # verify all tests at the specified PATH
|
177
|
-
inspec compliance SUBCOMMAND ... # Chef Compliance commands
|
178
|
-
inspec detect # detect the target OS
|
179
|
-
inspec exec PATH(S) # run all test files at the specified PATH.
|
180
|
-
inspec help [COMMAND] # Describe available commands or one spe...
|
181
|
-
inspec init TEMPLATE ... # Scaffolds a new project
|
182
|
-
inspec json PATH # read all tests in PATH and generate a ...
|
183
|
-
inspec shell # open an interactive debugging shell
|
184
|
-
inspec supermarket SUBCOMMAND ... # Supermarket commands
|
185
|
-
inspec version # prints the version of this tool
|
186
|
-
|
187
|
-
Options:
|
188
|
-
[--diagnose], [--no-diagnose] # Show diagnostics (versions, configurations)
|
189
|
-
```
|
190
|
-
|
191
|
-
# Examples
|
192
|
-
|
193
|
-
* Only accept requests on secure ports - This test ensures that a web server is only listening on well-secured ports.
|
194
|
-
|
195
|
-
```ruby
|
196
|
-
describe port(80) do
|
197
|
-
it { should_not be_listening }
|
198
|
-
end
|
199
|
-
|
200
|
-
describe port(443) do
|
201
|
-
it { should be_listening }
|
202
|
-
its('protocols') {should include 'tcp'}
|
203
|
-
end
|
204
|
-
```
|
205
|
-
|
206
|
-
* Use approved strong ciphers - This test ensures that only enterprise-compliant ciphers are used for SSH servers.
|
207
|
-
|
208
|
-
```ruby
|
209
|
-
describe sshd_config do
|
210
|
-
its('Ciphers') { should eq('chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr') }
|
211
|
-
end
|
212
|
-
```
|
213
|
-
|
214
|
-
* Test your `kitchen.yml` file to verify that only Vagrant is configured as the driver. The %w() formatting will
|
215
|
-
pass rubocop linting and allow you to access nested mappings.
|
216
|
-
|
217
|
-
```ruby
|
218
|
-
describe yaml('.kitchen.yml') do
|
219
|
-
its(%w(driver name)) { should eq('vagrant') }
|
220
|
-
end
|
221
|
-
```
|
222
|
-
|
223
|
-
Also have a look at our examples for:
|
224
|
-
- [Using Chef InSpec with Test Kitchen & Chef Infra](https://github.com/chef/inspec/tree/master/examples/kitchen-chef)
|
225
|
-
- [Using Chef InSpec with Test Kitchen & Puppet](https://github.com/chef/inspec/tree/master/examples/kitchen-puppet)
|
226
|
-
- [Using Chef InSpec with Test Kitchen & Ansible](https://github.com/chef/inspec/tree/master/examples/kitchen-ansible)
|
227
|
-
- [Implementing an Chef InSpec profile](https://github.com/chef/inspec/tree/master/examples/profile)
|
228
|
-
|
229
|
-
## Or tests: Testing for a OR b
|
230
|
-
|
231
|
-
* Using describe.one, you can test for a or b. The control will be marked as passing if EITHER condition is met.
|
232
|
-
|
233
|
-
```ruby
|
234
|
-
control 'or-test' do
|
235
|
-
impact 1.0
|
236
|
-
title 'This is a OR test'
|
237
|
-
describe.one do
|
238
|
-
describe ssh_config do
|
239
|
-
its('Protocol') { should eq('3') }
|
240
|
-
end
|
241
|
-
describe ssh_config do
|
242
|
-
its('Protocol') { should eq('2') }
|
243
|
-
end
|
244
|
-
end
|
245
|
-
end
|
246
|
-
```
|
247
|
-
|
248
|
-
## Command Line Usage
|
249
|
-
|
250
|
-
### exec
|
251
|
-
|
252
|
-
Run tests against different targets:
|
253
|
-
|
254
|
-
```bash
|
255
|
-
# run test locally
|
256
|
-
inspec exec test.rb
|
257
|
-
|
258
|
-
# run test on remote host on SSH
|
259
|
-
inspec exec test.rb -t ssh://user@hostname
|
260
|
-
|
261
|
-
# run test on remote windows host on WinRM
|
262
|
-
inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-password'
|
263
|
-
|
264
|
-
# run test on docker container
|
265
|
-
inspec exec test.rb -t docker://container_id
|
266
|
-
|
267
|
-
# run with sudo
|
268
|
-
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...] [--sudo_command ...]
|
269
|
-
|
270
|
-
# run in a subshell
|
271
|
-
inspec exec test.rb --shell [--shell-options ...] [--shell-command ...]
|
272
|
-
|
273
|
-
# run a profile targeting AWS using env vars
|
274
|
-
inspec exec test.rb -t aws://
|
275
|
-
|
276
|
-
# or store your AWS credentials in your ~/.aws/credentials profiles file
|
277
|
-
inspec exec test.rb -t aws://us-east-2/my-profile
|
278
|
-
|
279
|
-
# run a profile targeting Azure using env vars
|
280
|
-
inspec exec test.rb -t azure://
|
281
|
-
|
282
|
-
# or store your Azure credentials in your ~/.azure/credentials profiles file
|
283
|
-
inspec exec test.rb -t azure://subscription_id
|
284
|
-
```
|
285
|
-
|
286
|
-
### detect
|
287
|
-
|
288
|
-
Verify your configuration and detect
|
289
|
-
|
290
|
-
```bash
|
291
|
-
id=$( docker run -dti ubuntu:14.04 /bin/bash )
|
292
|
-
inspec detect -t docker://$id
|
293
|
-
```
|
294
|
-
|
295
|
-
Which will provide you with:
|
296
|
-
|
297
|
-
```
|
298
|
-
{"family":"ubuntu","release":"14.04","arch":null}
|
299
|
-
```
|
300
|
-
|
301
|
-
## Supported OS
|
302
|
-
|
303
|
-
Remote Targets
|
304
|
-
|
305
|
-
| Platform | Versions | Architectures |
|
306
|
-
| ---------------------------- | ------------------------------------------------ | ------------- |
|
307
|
-
| AIX | 6.1, 7.1, 7.2 | ppc64 |
|
308
|
-
| CentOS | 5, 6, 7 | i386, x86_64 |
|
309
|
-
| Debian | 7, 8, 9 | i386, x86_64 |
|
310
|
-
| FreeBSD | 9, 10, 11 | i386, amd64 |
|
311
|
-
| Mac OS X | 10.9, 10.10, 10.11, 10.12, 10.13, 10.14 | x86_64 |
|
312
|
-
| Oracle Enterprise Linux | 5, 6, 7 | i386, x86_64 |
|
313
|
-
| Red Hat Enterprise Linux | 5, 6, 7 | i386, x86_64 |
|
314
|
-
| Solaris | 10, 11 | sparc, x86 |
|
315
|
-
| Windows\* | 7, 8, 8.1, 10, 2008, 2008R2 , 2012, 2012R2, 2016 | x86, x86_64 |
|
316
|
-
| Ubuntu Linux | | x86, x86_64 |
|
317
|
-
| SUSE Linux Enterprise Server | 11, 12 | x86_64 |
|
318
|
-
| Scientific Linux | 5.x, 6.x and 7.x | i386, x86_64 |
|
319
|
-
| Fedora | | x86_64 |
|
320
|
-
| OpenSUSE | 13, 42 | x86_64 |
|
321
|
-
| OmniOS | | x86_64 |
|
322
|
-
| Gentoo Linux | | x86_64 |
|
323
|
-
| Arch Linux | | x86_64 |
|
324
|
-
| HP-UX | 11.31 | ia64 |
|
325
|
-
|
326
|
-
\**For Windows, PowerShell 5.0 or above is required.*
|
327
|
-
|
328
|
-
In addition, runtime support is provided for:
|
329
|
-
|
330
|
-
| Platform | Versions | Arch |
|
331
|
-
| -------- | -------- | ------ |
|
332
|
-
| Debian | 8, 9 | x86_64 |
|
333
|
-
| RHEL | 6, 7 | x86_64 |
|
334
|
-
| Ubuntu | 12.04+ | x86_64 |
|
335
|
-
| Windows | 7+ | x86_64 |
|
336
|
-
| Windows | 2012+ | x86_64 |
|
337
|
-
|
338
|
-
## Documentation
|
339
|
-
|
340
|
-
Documentation
|
341
|
-
|
342
|
-
* https://www.inspec.io/docs/
|
343
|
-
* https://www.inspec.io/docs/reference/resources/
|
344
|
-
* https://github.com/chef/inspec/tree/master/docs
|
345
|
-
|
346
|
-
Tutorials/Blogs/Podcasts:
|
347
|
-
|
348
|
-
* https://www.inspec.io/tutorials/
|
349
|
-
|
350
|
-
Relationship to other tools (RSpec, Serverspec):
|
351
|
-
|
352
|
-
* https://www.inspec.io/docs/reference/inspec_and_friends/
|
353
|
-
|
354
|
-
## Share your Profiles
|
355
|
-
|
356
|
-
You may share your Chef InSpec Profiles in the [Tools & Plugins section](https://supermarket.chef.io/tools-directory) of the [Chef Supermarket](https://supermarket.chef.io/). [Sign in](https://supermarket.chef.io/sign-in) and [add the details of your profile](https://supermarket.chef.io/tools/new).
|
357
|
-
|
358
|
-
You may also [browse the Supermarket for shared Compliance Profiles](https://supermarket.chef.io/tools?type=compliance_profile).
|
359
|
-
|
360
|
-
## Kudos
|
361
|
-
|
362
|
-
Chef InSpec is inspired by the wonderful [Serverspec](http://serverspec.org) project. Kudos to [mizzy](https://github.com/mizzy) and [all contributors](https://github.com/mizzy/serverspec/graphs/contributors)!
|
363
|
-
|
364
|
-
The AWS resources were inspired by [inspec-aws](https://github.com/arothian/inspec-aws) from [arothian](https://github.com/arothian).
|
365
|
-
|
366
|
-
## Contribute
|
367
|
-
|
368
|
-
1. Fork it
|
369
|
-
1. Create your feature branch (git checkout -b my-new-feature)
|
370
|
-
1. Commit your changes (git commit -am 'Add some feature')
|
371
|
-
1. Push to the branch (git push origin my-new-feature)
|
372
|
-
1. Create new Pull Request
|
373
|
-
|
374
|
-
The Chef InSpec community and maintainers are very active and helpful. This project benefits greatly from this activity.
|
375
|
-
|
376
|
-
If you'd like to chat with the community and maintainers directly join us in the `#inspec` channel on the [Chef Community Slack](http://community-slack.chef.io/).
|
377
|
-
|
378
|
-
As a reminder, all participants are expected to follow the [Code of Conduct](https://github.com/inspec/inspec/blob/master/CODE_OF_CONDUCT.md).
|
379
|
-
|
380
|
-
[![Slack](https://community-slack.chef.io/badge.svg)](https://community-slack.chef.io/)
|
381
|
-
|
382
|
-
## Testing Chef InSpec
|
383
|
-
|
384
|
-
We offer `unit`, `integration`, and `aws` tests.
|
385
|
-
|
386
|
-
- `unit` tests ensure the intended behaviour of the implementation
|
387
|
-
- `integration` tests run against Docker-based VMs via test-kitchen and [kitchen-inspec](https://github.com/chef/kitchen-inspec)
|
388
|
-
- `aws` tests exercise the AWS resources against real AWS accounts
|
389
|
-
|
390
|
-
### Unit tests
|
391
|
-
|
392
|
-
```bash
|
393
|
-
bundle exec rake test
|
394
|
-
```
|
395
|
-
|
396
|
-
If you like to run only one test file:
|
397
|
-
|
398
|
-
```bash
|
399
|
-
bundle exec m test/unit/resources/user_test.rb
|
400
|
-
```
|
401
|
-
|
402
|
-
You may also run a single test within a file by line number:
|
403
|
-
|
404
|
-
```bash
|
405
|
-
bundle exec m test/unit/resources/user_test.rb -l 123
|
406
|
-
```
|
407
|
-
|
408
|
-
### Integration tests
|
409
|
-
|
410
|
-
These tests download various virtual machines, to ensure Chef InSpec is working as expected across different operating systems.
|
411
|
-
|
412
|
-
These tests require the following gems:
|
413
|
-
|
414
|
-
- test-kitchen
|
415
|
-
- kitchen-dokken
|
416
|
-
- kitchen-inspec
|
417
|
-
|
418
|
-
These gems are provided via the `integration` group in the project's Gemfile.
|
419
|
-
|
420
|
-
In addition, these test require Docker to be available on your machine or a remote Docker machine configured via the standard Docker environment variables.
|
421
|
-
|
422
|
-
#### Running Integration tests
|
423
|
-
|
424
|
-
List the various test instances available:
|
425
|
-
|
426
|
-
```bash
|
427
|
-
bundle exec kitchen list
|
428
|
-
```
|
429
|
-
|
430
|
-
The platforms and test suites are configured in the `.kitchen.yml` file. Once you know which instance you wish to test, test that instance:
|
431
|
-
|
432
|
-
```bash
|
433
|
-
bundle exec kitchen test <INSTANCE_NAME>
|
434
|
-
```
|
435
|
-
|
436
|
-
You may test all instances in parallel with:
|
437
|
-
|
438
|
-
```bash
|
439
|
-
bundle exec kitchen test -c
|
440
|
-
```
|
441
|
-
|
442
|
-
### AWS Tests
|
443
|
-
|
444
|
-
Use the rake task `bundle exec rake test:aws` to test the AWS resources against a pair of real AWS accounts.
|
445
|
-
|
446
|
-
Please see [TESTING_AGAINST_AWS.md](./test/integration/aws/TESTING_AGAINST_AWS.md) for details on how to setup the needed AWS accounts to perform testing.
|
447
|
-
|
448
|
-
### Azure Tests
|
449
|
-
|
450
|
-
Use the rake task `bundle exec rake test:azure` to test the Azure resources against an Azure account.
|
451
|
-
|
452
|
-
Please see [TESTING_AGAINST_AZURE.md](./test/integration/aws/TESTING_AGAINST_AZURE.md) for details on how to setup the needed Azure accounts to perform testing.
|
453
|
-
|
454
|
-
## License
|
455
|
-
|
456
|
-
| | |
|
457
|
-
| -------------- | ----------------------------------------- |
|
458
|
-
| **Author:** | Dominik Richter (<drichter@chef.io>) |
|
459
|
-
| **Author:** | Christoph Hartmann (<chartmann@chef.io>) |
|
460
|
-
| **Copyright:** | Copyright (c) 2015 Vulcano Security GmbH. |
|
461
|
-
| **Copyright:** | Copyright (c) 2017-2018 Chef Software Inc.|
|
462
|
-
| **License:** | Apache License, Version 2.0 |
|
463
|
-
|
464
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
465
|
-
you may not use this file except in compliance with the License.
|
466
|
-
You may obtain a copy of the License at
|
467
|
-
|
468
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
469
|
-
|
470
|
-
Unless required by applicable law or agreed to in writing, software
|
471
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
472
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
473
|
-
See the License for the specific language governing permissions and
|
474
|
-
limitations under the License.
|