Commit graph

3192 commits

Author SHA1 Message Date
Clinton Wolfe
731b0705f5 Templatize everything for InSpec plugins
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
5343c217b0 All templates work, but need to decide on hooks
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
f95476179c support for LICENSE
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
d553f4cbc3 Enough options to cover gemspec
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
f83ea2d7bb Add ability to remap filenames
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
4b9fd1df79 Basic template, not parameterized
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
677542de02 Split the CLI implementation file
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
e00582f0ec Adapt to new UI module
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
1ef8cc9916 Allow no args to plain_line
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
a349f91e52 Make UI not print emphasis by default
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Clinton Wolfe
81d07cd8d9 Move templates dir outside of lib
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-06 11:58:10 -05:00
Chef Expeditor
0c83750dc9
Bump version to 3.5.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-02-06 15:55:00 +00:00
Clinton Wolfe
a5fbeccf68 Add deprecation hook for --json-config
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:29:34 -05:00
Clinton Wolfe
cb3e0aca60 Test for piped config, and fix to make it work
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:27:49 -05:00
Clinton Wolfe
2186179061 Allow passing opts to mock Config; and use mock config in one more place in test helper
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
4507af4c29 More things
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
42420d9ecc Use new config file system to read config
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
7d1fd5a085 Add comment about missing values
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
e0951e9ad0 Add bang to validate_reporters
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
605eea72a5 Refactor resolve_cfg_io, add duck check
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
6ed046bb23 More things
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
102505a937 Use new config file system to read config
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:24:26 -05:00
Clinton Wolfe
f1f5b27237 Create config object and units tests
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-02-01 14:23:55 -05:00
Chef Expeditor
aa51327c25
Bump version to 3.5.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-02-01 04:18:52 +00:00
Clinton Wolfe
5d2934cc5a Passing help message functional tests for disabling plugins
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-31 22:52:19 -05:00
Clinton Wolfe
4203c02836 Crude implementation to watch for plugin disable options
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-31 22:52:19 -05:00
Chef Expeditor
167ada963e
Bump version to 3.4.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-02-01 03:50:38 +00:00
Chef Expeditor
4def2ea993
Bump version to 3.4.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-31 21:14:56 +00:00
Clinton Wolfe
761944b3ce
Merge pull request #3770 from inspec/ja/fix-bad-name-check
More meaningful error when including controls from a missing dependency
2019-01-31 16:14:35 -05:00
Chef Expeditor
3559ebd4c8
Bump version to 3.4.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-31 20:56:51 +00:00
Clinton Wolfe
253f7f8c72
Merge pull request #3757 from inspec/ja/fix-plugin-load-on-help
Add `--help` to CLI plugin activation criteria
2019-01-31 15:54:04 -05:00
Chef Expeditor
86b0ab6f26
Bump version to 3.4.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-31 20:53:41 +00:00
Clinton Wolfe
2be3063e22
Merge pull request #3758 from inspec/ja/fix-profile-context-test
tests: Fix profile_context_test NameError
2019-01-31 15:53:23 -05:00
Chef Expeditor
fe26709df6
Bump version to 3.4.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-31 04:03:25 +00:00
Clinton Wolfe
18011ccfec Also issue default: option for backwards compatibility
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-30 14:05:11 -05:00
James Stocks
5868eb52e7 Fix Inspec::Attribute.to_ruby and add unit test
Signed-off-by: James Stocks <jstocks@chef.io>
2019-01-30 17:15:22 +00:00
Jerry Aldrich
f0c207dad9 Fix undefined method error from inspec check
This changes the error message from using a bad reference in
`include_controls` from:

```
NoMethodError: undefined method `profile' for nil:NilClass
```

To one detailing that the profile cannot be loaded since it isn't listed
as a dependency.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-29 22:36:27 -08:00
Jerry Aldrich
72c57c67f1 Move require and fix load order issue
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-29 22:08:17 -08:00
Chef Expeditor
ec966a1de9
Bump version to 3.4.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-29 20:46:02 +00:00
Chef Expeditor
47befc8a55
Bump version to 3.4.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-28 22:41:06 +00:00
Clinton Wolfe
4d7cbc624c Test and fix case in which both :default and :value are provided
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-28 00:42:27 -05:00
Clinton Wolfe
7ac2f6433a Add deprecation hook for attribute 'default' option
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-28 00:42:27 -05:00
Jerry Aldrich
852085969f Add missing require to Inspec::DSL#missing_method
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-26 14:10:14 -08:00
Jerry Aldrich
7f4560ea7c Add --help to CLI plugin activation criteria
This ensures that all the following result in the same CLI output:
  - `inspec`
  - `inspec help`
  - `inspec --help`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-26 12:47:27 -08:00
Chef Expeditor
8ccd2debaf
Bump version to 3.3.14 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-25 21:03:18 +00:00
Chef Expeditor
aef0cdd939
Bump version to 3.3.13 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-25 18:15:58 +00:00
Chef Expeditor
033d534b47
Bump version to 3.3.12 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-25 16:56:25 +00:00
Clinton Wolfe
ee76c5bb54
Merge pull request #3740 from inspec/ja/adopt-3419
iis_app_pool:  Fixes error with 'should not exist'
2019-01-25 11:56:10 -05:00
Chef Expeditor
e1fdffe550
Bump version to 3.3.11 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-25 16:46:04 +00:00
Chef Expeditor
723b5ec898
Bump version to 3.3.10 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-25 04:38:02 +00:00
Chef Expeditor
a6495f7301
Bump version to 3.3.9 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-23 17:24:54 +00:00
David Alexander
d5dbae2efd Updates stub for IIS App Pool unit test
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
David Alexander
abd234dca6 Removes Rubocop disable rule (not needed anymore)
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
David Alexander
7c29bd81a1 Cleans up human-readable strings
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
David Alexander
396b05b020 Takes advantage of inspec 2.x supports resource framework
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
David Alexander
ddf024d250 Fixes #3418 ('iis_app_pool should not exist' error)
Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2019-01-22 15:08:25 -08:00
Chef Expeditor
471396832e
Bump version to 3.3.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-22 20:54:19 +00:00
Chef Expeditor
64ce9dc841
Bump version to 3.3.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-22 20:50:56 +00:00
Clinton Wolfe
2f42803a90
inspec check: Allow 'Proprietary' as a valid license term.
Signed-off-by: James Stocks <jstocks@chef.io>
2019-01-22 15:50:38 -05:00
Chef Expeditor
10ef5df028
Bump version to 3.3.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-22 20:01:07 +00:00
Chef Expeditor
ef0ca0e915
Bump version to 3.3.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-22 18:29:43 +00:00
Chef Expeditor
e6abd1b23e
Bump version to 3.3.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-17 20:08:31 +00:00
Clinton Wolfe
0a131e4945
Centralized Deprecation Facility #3690
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-17 15:08:16 -05:00
Clinton Wolfe
b1140ecd10 Place backticks around cli exit codes for exec
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-17 14:22:20 -05:00
James Stocks
ad4df90912 Allow 'Proprietary' as a valid license term.
Currently our supported profiles output a warning for every instance of `inspec check` because our license metadata `Proprietary, All rights reserved` is not considered valid.
This commit allows for a string beginning with `Proprietary` to be considered valid, as well as any valid SPDX value.

Signed-off-by: James Stocks <jstocks@chef.io>
2019-01-16 11:19:55 +00:00
Clinton Wolfe
4601740140 Linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-16 00:42:01 -05:00
Clinton Wolfe
45c1a11ad6 Create a real GroupEntry when the group is unrecognized, simplifying logic
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-16 00:41:21 -05:00
Clinton Wolfe
b89681350e Correct comment reference exit code
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-16 00:26:29 -05:00
Clinton Wolfe
48e2188047 Remove class var for testing, replace with tramp data
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-16 00:24:19 -05:00
Clinton Wolfe
212fe36b76 Add debug output to ignore actions
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 23:49:20 -05:00
Clinton Wolfe
c6e22ddb16 Refine stack heuristics to reject RSpec and the deprecation system itself
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 23:36:03 -05:00
Clinton Wolfe
c63f6e28a3 Clarify error message when unknown_group_action is invalid
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 23:22:16 -05:00
Clinton Wolfe
6fc5bd8b83 Add comment field to group entries
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 23:17:52 -05:00
Clinton Wolfe
fe0236cb64 Remove spurious 'ocurrences' field from GroupEntry
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 15:40:14 -05:00
Clinton Wolfe
267786bf81 Doc updates per PR feedback
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-15 15:37:08 -05:00
Jerry Aldrich
f5ec7c9c65 Fix style/RuboCop on cw/deprecation-facility
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2019-01-14 13:57:59 -08:00
Chef Expeditor
feefdcf9af
Bump version to 3.3.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-14 18:50:05 +00:00
Clinton Wolfe
b5e91e7dbf
Support cran packages for non-utf8 locales (#3613)
Signed-off-by: Adam Ward <adamw@subdesigns.net>
2019-01-14 10:49:50 -08:00
Clinton Wolfe
c169119895 linting
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
c43e401dda Fix default exit code logic to properly use value in Inspec::UI
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
b2bb8c062b Last polish on the unit tests, all pass
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
642d8d61b6 Funcitonal tests pass; some unit tests fail
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
f5ab0d9125 Config file validation in place
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Clinton Wolfe
2121667e31 Starting implementation, global method is wired up
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-10 23:54:50 -08:00
Chef Expeditor
c44726ca95
Bump version to 3.3.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-11 07:52:38 +00:00
Chef Expeditor
97614ac8d4
Bump version to 3.3.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-10 01:23:23 +00:00
T. Miller
203195e545 postgres_session: Fix postgres directory searching (#3708)
Signed-off-by: Timothy Miller <timothy.miller.27.ctr@us.af.mil>
2019-01-09 17:23:08 -08:00
Chef Expeditor
e7e147513d
Bump version to 3.3.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2019-01-10 00:07:06 +00:00
Miah Johnson
15162bf920 Add resources for aws_billing_report and aws_billing_reports. (#2838)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2019-01-09 16:06:48 -08:00
Chef Expeditor
da4051837d
Bump version to 3.2.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-21 03:17:22 +00:00
Tim Smith
b5ff949059 Update Ruby versions used for testing; fix Travis CI issues (#3678)
Signed-off-by: Tim Smith <tsmith@chef.io>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-12-20 22:17:07 -05:00
Chef Expeditor
bb3b0059d8
Bump version to 3.2.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 22:15:32 +00:00
Chef Expeditor
6e14626233
Bump version to 3.2.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 21:33:41 +00:00
Chef Expeditor
d79b6c18d6
Bump version to 3.2.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 19:41:50 +00:00
Tim Smith
a1aef8fe17 Update list of SPDX licenses (#3677)
Signed-off-by: Tim Smith <tsmith@chef.io>
2018-12-20 14:41:11 -05:00
Chef Expeditor
c103ba550f
Bump version to 3.2.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 19:33:38 +00:00
Amit Saha
bbc07f5f11 aws_sqs_queue - new resource (#3674)
Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
2018-12-20 14:33:21 -05:00
Chef Expeditor
93223f5f2f
Bump version to 3.2.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 18:30:07 +00:00
Chef Expeditor
e760c68c16
Bump version to 3.2.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 17:31:27 +00:00
Jerry Aldrich
91fe4ad03b Fix labels on Docker containers (#3673)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-12-20 12:31:13 -05:00
Chef Expeditor
3984990a55
Bump version to 3.2.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-20 16:58:08 +00:00
Noel Georgi
f1fbd518e5 Expose additional WinRM options for transport, basic auth, and SSPI (#3669)
Signed-off-by: Noel Georgi <git@frezbo.com>
2018-12-20 11:57:53 -05:00
Chef Expeditor
e6311c4410
Bump version to 3.1.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-14 18:58:51 +00:00
Chef Expeditor
c5108b2a90
Bump version to 3.1.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-12 19:09:02 +00:00
Noel Georgi
5d87b8f94b Fix git fetcher error detection logic (#3665)
Signed-off-by: Noel Georgi <git@frezbo.com>
2018-12-12 14:08:48 -05:00
Chef Expeditor
f873e60309
Bump version to 3.1.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-12 18:32:52 +00:00
Wiebe Verweij
233cb900ba Fix incorrect warning about connection from mysql_session (#3659) (#3660)
Signed-off-by: Wiebe Verweij <wiebe@wiebelt.nl>
2018-12-12 13:32:01 -05:00
Chef Expeditor
0aa47f4459
Bump version to 3.1.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-12 18:06:06 +00:00
Jerry Aldrich
8019b2c487 Modify URL fetcher to accept URI (#3633)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-12-12 13:05:51 -05:00
Chef Expeditor
671e315d93
Bump version to 3.1.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-12 16:44:28 +00:00
Clinton Wolfe
c0a46cf841
UI Object for for CLI work (#3618)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-12-12 11:44:16 -05:00
Chef Expeditor
6fbde40bb6
Bump version to 3.0.66 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-12 16:23:32 +00:00
Chef Expeditor
fa53ae73cd
Bump version to 3.0.65 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-11 14:00:36 +00:00
Chef Expeditor
ae0019c33b
Bump version to 3.0.64 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-06 15:19:48 +00:00
Jerry Aldrich
ffe0bd4761 Update Habitat plugin (#3646)
This updates the Habitat plugin by doing the following:
  - Removing `settings.sh` in favor of Habitat config TOMLs
  - Changing deprecated `--format` to `--reporter`
  - Cleaning up plan.sh in several ways
  - Adding handling for different exit codes
  - Removing unnecessary runtime deps
  - Vendoring the InSpec archive during build
  - Using shebangs that reference Habitat's bash
  - Adding error handling for `hab studio enter`/`build` from `habitat/`
  - Making `pkg_svc_user` use default `hab` and not `root`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-12-06 10:17:39 -05:00
Chef Expeditor
3e585d3717
Bump version to 3.0.63 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-06 15:17:14 +00:00
Chef Expeditor
99c9ba2429
Bump version to 3.0.62 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-12-04 15:54:33 +00:00
Chef Expeditor
a4362e7a07
Bump version to 3.0.61 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-29 19:14:29 +00:00
Clinton Wolfe
fefa6c2ecd
Plugin Type: DSLs (#3557)
This PR adds 5 closely related plugin types, which allow a plugin to implement new DSL methods / keywords. The mechanism to activate the plugins are all very similar - basically, in a particular location in the code, `method_missing` is implemented, and is used to activate the particular type of DSL being requested.

4 of the DSL plugin types relate to code that could appear in a profile control file.

* outer_profile_dsl plugins allow you to extend the code in profile Ruby files that appear outside `control` or `describe` blocks.
* control_dsl plugins allow you to extend the code within `control` blocks.
* describe_dsl plugins allow you to extend the code within `describe` blocks.
* test_dsl plugins allow you to extend the code within `it`/`its` blocks.

Finally, the `resource_dsl` plugin allows you to extend the code used within custom resources.

Basic unit tests are provided to prove that the plugin types are properly defined.

A simple plugin fixture defining DSL hooks (based on favorite foods) is included, and is exercised through a set of functional tests.

The plugin developer docs are updated to describe the 5 DSLs.

*Note*: Implementing a plugin using any of the DSL plugin types is experimental.  The contexts that are exposed to the DSL methods are private and poorly documented. The InSpec project does not claim the APIs used by these plugin types are covered by SemVer.  Plugin authors are encouraged to pin tightly to the `inspec` gem in their gemspecs.

Motivation for this plugin comes from the desire to allow passionate community members to implement things like "2 out of 3" tests, example groups, improved serverspec compatibility, "they/their" and other "fluency" changes, as well as make it possible for future work by the InSpec team to be implemented as a core plugin, rather than a direct change to the main codebase.
2018-11-29 14:14:06 -05:00
Chef Expeditor
0f1a30cb06
Bump version to 3.0.60 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-27 22:00:20 +00:00
Chef Expeditor
893e234df4
Bump version to 3.0.59 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-27 21:55:14 +00:00
Caprowni
af4253c755 Adding an AWS platform template so that it can be specified to create a template when using 'inspec init --platform' (#3622)
Signed-off-by: Liam Caproni <liamcaproni@gmail.com>
2018-11-27 16:55:03 -05:00
Clinton Wolfe
b3fafab1e6 Add aws_eks_cluster resource (#3582)
* add aws_eks_cluster

Signed-off-by: Timothy van Zadelhoff
timothy.inspec@theothersolution.nl

* disable ABC check on fetch_from_api

Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl>

* add status predicates

* Change docs for status attribute

Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl>

*     Add integration tests

    Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl>

* Adjust EKS build code to almost work

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* EKS only uses private subnets - integration tests pass

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Correct AWS Exception class for resource search miss in unit test

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>

* Update unit test to reflect AWS resource-standard miss behavior, returning nil for most properties

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-11-27 16:54:47 -05:00
Chef Expeditor
1c742e6eff
Bump version to 3.0.58 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-27 18:21:36 +00:00
mhackethal
b67236e485 package: fix package detection on windows (#3607)
* Update package.rb to solve issue #3361

Update the windows package search regex.
According to issue #3361

* Update package.rb
Fix trailing spaces
* Update helper.rb

update sha for get-item-package. To fix the issue #3361
Signed-off-by: markus hackethal <mh@it31.de>
2018-11-27 13:21:25 -05:00
Chef Expeditor
a419ce3aff
Bump version to 3.0.57 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-26 14:12:37 +00:00
Chef Expeditor
32ad4b9fbf
Bump version to 3.0.56 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-19 18:33:11 +00:00
mhackethal
86cf55382b filesystem: improve Windows support (#3606)
* Improve filesystem.rb to support windows

improve filesystem.rb to support windows.
Split into 2 classes LinuxFileSystemResource / WindowsFileSystemResource
Add filesystem to verify a FS-type ( currently not for linux because missing test server )
Size on Windows is converted to GB - discussion about this welcome

update to reflect also windows os

* Create get-wmiobject-filesystem
* Delete get-wmiobject-filesystem

* Fix the testing code for filesystem.
Change its 'filesystem' to 'type' according to recommendation from @miah
Signed-off-by: Markus Hackethal <mh@it31.de>
2018-11-19 13:32:59 -05:00
Chef Expeditor
3c557eac3f
Bump version to 3.0.55 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-16 22:09:59 +00:00
Chef Expeditor
8e88bc3eb5
Bump version to 3.0.54 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-16 22:06:50 +00:00
Clinton Wolfe
e4afadfc3f Revert setting RSpec expectation syntax to 'should' mode (#3620)
* Revert "Silence RSpec 'should' Warning (#3560)"

This reverts commit 7c611a4c24.

* Add comment with link to reverted fix

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-11-16 17:04:04 -05:00
Chef Expeditor
82af39e25a
Bump version to 3.0.53 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-16 22:03:23 +00:00
Clinton Wolfe
3c8697e5e2 Create a class to handle the plugins.json file (#3575)
* unit tests for plugin conf file class, all skip
* File path stuff works
* Validation works
* Add works
* Added remove_entry
* Save works - ready to refactor others
* Rework Loader to use ConfigFile
* Modify loader and installer to use the config file class
* linting

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-11-16 17:03:09 -05:00
Chef Expeditor
ae5986f7b9
Bump version to 3.0.52 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-15 20:15:03 +00:00
Jerry Aldrich
4a03e54b4c Load the compliance plugin when the fetcher is needed (#3609)
* Add Compliance fetcher pending 4.0 plugin

When migrating `inspec-compliance` to a V2 plugin only the CLI functions
were migrated. This caused the fetcher portions of `inspec-compliance`
to fail.

Currently, there isn't a fetcher plugin type so this loads the fetcher
explicitly until a fetcher plugin type and corresponding Compliance
fetcher is created in InSpec 4.0.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-11-15 15:14:49 -05:00
Adam Ward
efccf1770e Support cran packages for non-utf8 locales
Signed-off-by: Adam Ward <adamw@subdesigns.net>
2018-11-15 11:04:08 +11:00
Chef Expeditor
cbd2384dd7
Bump version to 3.0.51 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-13 19:36:49 +00:00
Harold Dost
202bec7641 Adds protection against zipslip vulnerability (#3604)
- Adds associated tests to validate paths can't be used.

Relates to: #3599
Signed-off-by: Harold Dost <h.dost@criteo.com>
2018-11-13 14:33:34 -05:00
Chef Expeditor
a0fd25ba3a
Bump version to 3.0.50 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-13 19:33:22 +00:00
Fernando Alexandre
8b089ea1e1 Fixes #3546 (#3592)
* When pty is used not having --no-pager makes inspec hang during the test
* Updated tests

Signed-off-by: Jose Alexandre <jose.alexandre@worldfirst.com>
2018-11-13 14:33:08 -05:00
Chef Expeditor
1f38c1436a
Bump version to 3.0.49 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-13 18:25:45 +00:00
Timothy van Zadelhoff
5739cb2d6b aws_security_group: Query against other security group ids in allow_* matchers (#3576)
* add security-group to security-group rules
* update docs
* Add integration tests for security-group to security-group rules
* rubocop fix
*     Add one security group rule, with position.
* make control fit description

Signed-off-by: Timothy van Zadelhoff <timothy.inspec@theothersolution.nl
2018-11-13 13:25:33 -05:00
Chef Expeditor
3ee216b3c2
Bump version to 3.0.48 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 21:03:24 +00:00
Chef Expeditor
a05183cf1c
Bump version to 3.0.47 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 21:00:14 +00:00
Chef Expeditor
f632882a9e
Bump version to 3.0.46 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 20:55:29 +00:00
Jerry Aldrich
6ba4aaf630 Add Git SSH and HTTP basic auth support to inspec exec (#3562)
* Add support for `git@` and HTTP basic auth

This adds support for the following:

```
inspec exec git@github.com:private/example_profile
inspec exec https://username:token@github.com/private/example_profile
inspec exec https://username:password@webserver/private/example_profile
```

This also uses the Git fetcher when the URL ends in `.git`. Example:

```
git config credential.helper cache
git ls-remote https://github.com/private/example_profile.git
inspec exec https://github.com/private/example_profile.git
```

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add documentation for `inspec exec` usage

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add tests for Git fetcher and `inspec exec`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add `opts` to branch of Git fetcher resolve logic

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Modify Git example comments

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Force `parse_uri` to attempt a parse

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-11-08 15:55:15 -05:00
Chef Expeditor
167a876705
Bump version to 3.0.45 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:58:37 +00:00
Chef Expeditor
b5c8aa1d47
Bump version to 3.0.44 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:55:42 +00:00
Chef Expeditor
529cdbafc3
Bump version to 3.0.43 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:52:47 +00:00
Clinton Wolfe
b12aa82361 port: Correctly detect FreeBSD (#3579)
* Fixing #3563; freebsd is not a substring of 'bsd'
* Actually, this is better.
* Change coditional for FreeBSD from a string match to a call to os.bsd?

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-11-08 13:51:45 -05:00
Chef Expeditor
9d4510451e
Bump version to 3.0.42 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:49:29 +00:00
Chef Expeditor
a04f017f11
Bump version to 3.0.41 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:46:36 +00:00
Chef Expeditor
53dce69a15
Bump version to 3.0.40 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:43:41 +00:00
mrshanahan
cebe044a68 Update iis_site bindingInformation construction and add tests. (#3490) (#3492)
Signed-off-by: Matt Shanahan <mrshanahan11235@gmail.com>
2018-11-08 13:42:59 -05:00
Chef Expeditor
23b40887b4
Bump version to 3.0.39 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:09:57 +00:00
Chef Expeditor
80dcde835e
Bump version to 3.0.38 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:07:02 +00:00
Chef Expeditor
9d5b4a3c95
Bump version to 3.0.37 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:04:06 +00:00
Chef Expeditor
9c61517bb8
Bump version to 3.0.36 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 18:01:05 +00:00
Chef Expeditor
1fa6d6375d
Bump version to 3.0.35 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 17:58:08 +00:00
Chef Expeditor
624cb1ac07
Bump version to 3.0.34 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 17:55:14 +00:00
Chef Expeditor
678fff677a
Bump version to 3.0.33 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 17:52:22 +00:00
Chef Expeditor
c6d5a3e10c
Bump version to 3.0.32 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 17:49:27 +00:00
Rachel Rice
de5b332feb Allow add_test to accept negation (#3586)
* Allow add_test to accept negation
This will allow for negated tests to be generated with add_tests.
* Fix rubocop violation
* Add optional options hash

Signed-off-by: Rachel Rice <rrice@chef.io>
2018-11-08 12:48:12 -05:00
Mark Hughes
45926ef63a Added xml resource support for ints, bools, and string responses (#3583)
Methods like…

* `count()` return `Integer` values
* `boolean()` return `TrueClass`/`FalseClass` values
* `concat()` return `String` values

…but threw exceptions because those types weren't supported.

This adds support to the `xml` resource, and adds tests to verify some of those examples.

Signed-off-by: Mark Hughes <greenantdotcom@users.noreply.github.com>
2018-11-08 12:47:18 -05:00
Chef Expeditor
061c29519e
Bump version to 3.0.31 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-08 17:46:31 +00:00
James Stocks
5da1180780 Add only_if to Inspec objects (#3577)
* Add only_if attr to Inspec::test
* Add only_if attr to Inspec::Control

Signed-off-by: James Stocks <jstocks@chef.io>
2018-11-08 12:46:19 -05:00
Jared Quick
d33d189d93
Create appvayor workers for Windows functional tests. (#3397)
* Add more windows functional tests and create some appvayor workers.
* Fix uuid test for automate

Signed-off-by: Jared Quick <jquick@chef.io>
2018-11-08 12:00:14 -05:00
Chef Expeditor
399ee938f3
Bump version to 3.0.30 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-07 20:40:18 +00:00
Chef Expeditor
c6701832e7
Bump version to 3.0.29 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-07 19:00:01 +00:00
Clinton Wolfe
7c611a4c24 Silence RSpec 'should' Warning (#3560)
* Failing functional test for RSpec should deprecation
* Configure RSpec to allow .should calls
* Remove cruft from test files where we needed to filter deprecation warning

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-11-07 13:59:48 -05:00
Chef Expeditor
6f8c0245c8
Bump version to 3.0.28 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-05 15:03:51 +00:00
Ksenia
c07ec59070 Add 17 hexadecimal characters support aws_vpc (#3518) (#3564)
aws_vpc: accept 17 hexadecimal characters for vpc_id 

Signed-off-by kchistova <kchistova@gmail.com>
2018-11-05 10:01:16 -05:00
Chef Expeditor
f976796ba9
Bump version to 3.0.27 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-05 14:59:14 +00:00
David Alexander
83d382c965 Fixes (some) ruby warnings related to functional tests (#3561)
* Fixes (some) ruby warnings related to functional tests
* Removes unneeded `Dir.tmpdir` from test

Signed-off-by: David Alexander <opensource@thelonelyghost.com>
2018-11-05 09:59:01 -05:00
Chef Expeditor
640dadfd7a
Bump version to 3.0.26 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-02 16:53:09 +00:00
Chef Expeditor
aaed2487ac
Bump version to 3.0.25 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 22:06:19 +00:00
Chef Expeditor
8c0f15dfb2
Bump version to 3.0.24 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 21:06:58 +00:00
Chef Expeditor
f9e530dc67
Bump version to 3.0.23 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 21:04:56 +00:00
Chef Expeditor
52a431c19e
Bump version to 3.0.22 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 20:55:22 +00:00
Chef Expeditor
970680dac7
Bump version to 3.0.21 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 20:52:23 +00:00
Chef Expeditor
d51168ab97
Bump version to 3.0.20 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 20:50:46 +00:00
Chef Expeditor
89e716c265
Bump version to 3.0.19 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 20:32:57 +00:00
Jerry Aldrich
701dd9fb0b Change usage of Dir.home to Inspec.config_dir (#3567)
This prevents errors on systems without `ENV['HOME']` (e.g. Habitat
services) by allowing the specification of the location of `.inspec` via
`ENV['INSPEC_CONFIG_DIR']`.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-11-01 16:32:45 -04:00
Chef Expeditor
10e5292e27
Bump version to 3.0.18 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 20:23:49 +00:00
Chef Expeditor
bbda0f9371
Bump version to 3.0.17 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-11-01 17:05:16 +00:00
Jared Quick
d9767884ff
Allow help args after Thor commands (#3553)
* Allow help args after thor commands.
* Add more testing and clarification.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-11-01 13:04:59 -04:00
Chef Expeditor
d622f46967
Bump version to 3.0.16 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-30 10:32:28 +00:00
Jared Quick
0f42b31016
Allow end of options during Thor array parsing (#3547)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-30 06:32:16 -04:00
Chef Expeditor
b7b9581202
Bump version to 3.0.15 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-29 20:01:55 +00:00
Chef Expeditor
41b19003de
Bump version to 3.0.14 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-25 18:44:42 +00:00
Christoph Hartmann
27b80e0998 ✓ adds additional checks for vendored profiles (#3362)
* ✓ adds additional checks for vendored profiles

This PR adds additional checks to verify if:
- inspec.yml and inspec.lock dependencies are out-of-sync
- complains about a missing lock file if we have dependencies defined

* skip if legacy profile path is used
* Fix unit tests.
* Force static sha256 for lock files and protect from unnamed depends.
* Add vendor profiles for checks. Windows downloads with different sha256.
2018-10-25 14:44:29 -04:00
Chef Expeditor
c672d7a8d1
Bump version to 3.0.13 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-25 18:16:44 +00:00
Stuart Paterson
f64da78edb Adding inspec init profile for GCP. (#3484)
* Adding inspec init profile for GCP.
* Adding final newline, thanks rubocop.
* Ensure README headings are at the same level.
* Move OS-specific default profile to new location
* Enforce os-platform restriction on default profile template
* Use profile templates in subdirs.
* Updates to address PR feedback after rebasing from #3491.
* Alter test setup to properly use YAML

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-25 14:16:31 -04:00
Chef Expeditor
0360ae2c2b
Bump version to 3.0.12 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-24 19:08:31 +00:00
Jared Quick
d40dc7c41f
Update to safe navigation exit code skip search. (#3541)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-24 15:08:07 -04:00
Chef Expeditor
6a39158aa7
Bump version to 3.0.11 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-23 13:16:48 +00:00
Andrey Klyachkin
f835c24e89 ksh support (#3533)
Add ksh (Korn Shell) resource
2018-10-23 09:16:24 -04:00
Chef Expeditor
c5996d8cf2
Bump version to 3.0.10 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-19 13:01:13 +00:00
James Stocks
7c58285eb6 New resource to work with Windows security identifiers (SIDs) (#3405)
* Resource for a Windows Security Identifier (SID)
* Integration tests for security_identifier resource
* Address rubocop violations
* Improve security_identifier from PR feedback
* Update security_identifier tests
* Improve security_identifier unit tests
* Fix unit tests fpr security_identifier resource
* More security_identifier unit tests
* Add docs page for security_identifier resource
* Fix issues with documentation
* Improve docs
Link to Microsoft reference page, and use their term 'trustee' instead of 'entity' where applicable.

* Change exists to exist
* Test appveyor file changes.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-19 09:01:00 -04:00
Chef Expeditor
133fecb412
Bump version to 3.0.9 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 20:48:44 +00:00
Miah Johnson
7a6119e7a6 Add missing tests for groups resource, document members property, and assorted fixes. (#3467)
* Add missing tests for groups resource, document members propery, and assorted fixes.

Update existing documentation for group resource.
Add documentation for groups resource.
Update group resource tests to test members property.
Change groups resource members property to have simple style. (this
ensures members is a single array)
remove deprecated have_gid propery.
change `if !` to `unless`
Remove early return from members method. This prevented members from
working correctly on any OS other than Windows.
Add missing tests for the groups resource.
remove tests for has_gid

Signed-off-by: Miah Johnson <miah@chia-pet.org>

* Fix comments

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-18 16:48:30 -04:00
Chef Expeditor
aaddd9ba1e
Bump version to 3.0.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 20:38:03 +00:00
Chef Expeditor
9df5a17213
Bump version to 3.0.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 20:07:40 +00:00
Clinton Wolfe
be2101af9f Simple fix to the plugin development support suite (#3526)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-18 16:05:06 -04:00
Chef Expeditor
bbf048d89e
Bump version to 3.0.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 20:02:33 +00:00
Jared Quick
970d2ec32b
Add debug and sort options for plugins (#3530)
* Add log options to plugin cli base.
* Sort search results to always show the latest.
* Add testing for debug logs
* Fix lint.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-18 16:01:02 -04:00
Chef Expeditor
dd8917d18a
Bump version to 3.0.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 19:56:23 +00:00
Chef Expeditor
d0506d34fa
Bump version to 3.0.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-18 03:44:58 +00:00
Chef Expeditor
ff611a5c45
Bump version to 3.0.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-17 19:49:50 +00:00
Chef Expeditor
bd64a8e7c7
Bump version to 3.0.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-17 13:30:11 +00:00
Clinton Wolfe
ff2be7be56 FilterTable: allow Strings or Symbols as fields (#3481)
* Allow strings or symbols to be used interchangeably in filtertable criteria; improve error message
* rubocop
* Update test count

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-17 09:29:58 -04:00
Chef Expeditor
86c25c9624
Bump version to 3.0.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-17 13:14:31 +00:00
Jerry Aldrich
7313eb7819 style: Fix quotes/style on the docker resource (#3516)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-17 09:14:19 -04:00
Chef Expeditor
9300dae797
Bump version to 3.0.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-15 22:25:38 +00:00
Jared Quick
2bbcdbde9b
Inspec 3.0 (#3512)
* Remove deprecated yumrepo. (#3435)

* Remove deprecations for cli `--format` and metadata.rb (#3452)

* Remove deprecated database_helpers stderr/stdout methods.
Update deprecation text for processes/apache.

* Remove deprecations for `--format` and metadata.rb
Remove deprecated `format` code.
Remove deprecated code test and change json-config format test to use
reporter.
Remove deprecated metadata.rb code
Remove deprecation notice for old supports syntax.
Deprecate metadata.rb from source_reader
Remove rubocop disables as they are no longer required for this code block.
Remove deprecated legacy metadata.rb mock profiles.
Remove deprecated metadata.rb profile tests.
Remove deprecated yumrepo test.

* Allow inspec-3.0 branch to be tested.
* Allow appveyor to test inspec-3.0 branch
* Change runner tests to use reporter rather than format.
Remove deprecated `supports: linux` tests.

* Remove skip from inherited profiles from showing up in reporting (breaking change) (#3332)

* Skip loading dependency profiles if they are unsupported on the current
platform.

Skip loading dependencies if they are unsupported on the current
platform.

Wrap our log and next in a conditional checking if the platform is
supported.

Change a `if !` into a `unless`

Check if the backend is a Train Mock Connection and if so say that the
profile does support the platform.

While iterating through tests being loaded skip when the platform is
unsupported.

We now log a WARN when a profile is skipped due to unsupported platform,
so lets check that.

Modified existing test to log that there are 0 skipped tests, instead of
2.

Add functional test that loads profile-support-skip with a json reporter
to check that our controls are not loaded and that stderr contains our
warning.

* Rather than iterating through each test return before recursion if the platform is
unsupported.

* Resolve tests using a supported platform different from testing platform

Add a control to `test/unit/mock/profiles/complete-profile` that would
work on any OS with a Internet connection. This allows the profile
to execute on any OS with success. `filesystem_spec.rb` was a control
that would only work on Linux and some BSD's.

We want profile tests to consistently work across development and testing
platforms, and not get 'skipped' in some cases.  Travis-CI tests on Linux,
Inspec Dev team uses Linux and MacOS, Appveyor tests on Windows

Also Updated `file_provider_test.rb` for `complete-profile` content changes.

If you `MockLoader.load_profile` on a unsupported platform you might not
hit the usual skip. Lets handle situations where the tests array in
Profile#load_checks_params could be nil.

* Use safe navigation rather than checking if tests is nil.
Update tests to point to unsupported_inspec and account for WARN changes.
Make unsupported_inspec profile support os-family 'unsupported_inspec'

* Fix skip bug when using include/require controls. (#3487)

* Fix skip bug when using include/require controls.
* fix test and feedback.

* Remove need for UUID detection for Automate report (#3507)
* Add json metadata for skipped profiles (#3495)

* Add skip metadata to json reports
* Unify skip messages.
* Update with status field.
* Add testing.
* Fix tests.
* lint
* Add skip exit codes for profile skips.
* Update website for 3.0 launch

Add `plugins` to sidebar.
Change 2.0 -> 3.0 in slim files.
Update 3.0 features list.
* Fix comments
* Update float to numeric.
* Change Float to numeric.
* updated feature list and impact doc
* Change "What's new in InSpec 3.0" -> "Announcing InSpec 3.0"
* Bump VERSION to 3.0.0 (#3511)

* Remove 3.0 testing checks.

* Fix azure link.
2018-10-15 18:25:27 -04:00
Chef Expeditor
10f110b763
Bump version to 2.3.26 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-15 16:15:27 +00:00
Jared Quick
cccad057c2 Update the text on the generic default attribute (#3508)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-15 12:15:17 -04:00
Chef Expeditor
90d93c2ca1
Bump version to 2.3.25 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-15 16:09:59 +00:00
Jerry Aldrich
0b0a0a4d48 Change Inspec to InSpec where appropriate (#3494)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-15 12:09:46 -04:00
Chef Expeditor
23a5a8d864
Bump version to 2.3.24 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-12 19:44:56 +00:00
Jared Quick
00a54239d3
Fix plugin install issues in different ruby envs (#3505)
* Fix the install set for inspec plugins.
* Fix directory addition.
* Add comments.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-12 15:44:46 -04:00
Chef Expeditor
c2891ad278
Bump version to 2.3.23 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-12 03:25:11 +00:00
Jared Quick
f7551b3de3
Fix plugin issues on omni builds (#3499)
* Fix plugin issues on omni builds
* Fix gemspec to include etc dir.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-11 23:25:01 -04:00
Chef Expeditor
6a671324a1
Bump version to 2.3.22 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-12 01:14:41 +00:00
Chef Expeditor
8c9c1e0cc3
Bump version to 2.3.21 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-11 18:11:35 +00:00
Jared Quick
7c38080e6f
Backport compliance namespace and add testing for A2 audit report. (#3493)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-11 14:07:37 -04:00
Chef Expeditor
7f0618a37c
Bump version to 2.3.20 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-11 18:06:08 +00:00
Clinton Wolfe
de5403d352 Plugins: Filter Plugins During Search and Install (#3458)
* Unit and functional tests for a reject list facility
* Implementation of plugin reject facility
* Initial draft of reject list
* Add option to search to hide test fixture by default
* Fix test
* PR feedback

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-11 14:05:57 -04:00
Chef Expeditor
c740d567b7
Bump version to 2.3.19 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-11 13:42:15 +00:00
Jared Quick
ba37ca1875
Fix error on empty attributes yaml (#3485)
* Allow empty attributes param.
* Add warning if invalid attributes.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-11 09:41:36 -04:00
Chef Expeditor
3780298111
Bump version to 2.3.18 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 20:17:17 +00:00
Chef Expeditor
1ae95a1a95
Bump version to 2.3.17 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 17:27:19 +00:00
Chef Expeditor
89492f1a22
Bump version to 2.3.16 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 13:20:44 +00:00
Aaron Lippold
933387e739 Fixes #3480 (#3483)
* updates the AlpinePkg class `info` method to use the `delete_if` method as the `reject!` method was returning nil.

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2018-10-10 09:20:33 -04:00
Chef Expeditor
74f82ed477
Bump version to 2.3.15 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 12:21:59 +00:00
Chef Expeditor
8bffeeece8
Bump version to 2.3.14 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-10 12:17:27 +00:00
Chef Expeditor
d6b1f3c32a
Bump version to 2.3.13 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-08 13:38:30 +00:00
Chef Expeditor
df3f909705
Bump version to 2.3.12 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-08 13:34:14 +00:00
Chef Expeditor
5acf586831
Bump version to 2.3.11 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-05 20:24:38 +00:00
Jared Quick
cbb3b600d9
Fix archive with required attributes (#3468)
* Skip require check unless we are in a exec call.
* Add testing
* Update comment.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-05 16:24:26 -04:00
Chef Expeditor
31d4699fc4
Bump version to 2.3.10 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-04 18:31:51 +00:00
Jared Quick
cb12ada2fe
Move compliance to v2 plugin (#3423)
* Move compliance pluging to v2 system.
* Update kitchen-inspec to test.
* Add legacy require patsh.
* Fix unit test

Signed-off-by: Jared Quick <jquick@chef.io>
2018-10-04 14:31:39 -04:00
Chef Expeditor
92249898d9
Bump version to 2.3.9 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-04 18:06:30 +00:00
Jonathan Hartman
7451917223 Support finding larger processes on Busybox (#3446)
For larger processes, Busybox's ps displays the vsz and rss columns in
megabytes or gigabytes, with no option I've found to override the behavior.

This change updates the process regex to account for that and converts
the values to kilobytes so they can still be cast as integers.

Signed-off-by: Jonathan Hartman <j@hartman.io>
2018-10-04 14:06:17 -04:00
Chef Expeditor
3248af1fe3
Bump version to 2.3.8 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-04 13:04:03 +00:00
Will Fisher
f23bfc05ce Fix distinct_exit cli desc to reflect reality (#3463)
The description for `distinct_exit` had the exit codes backwards.

From the long desc
> If some tests skipped but none failed, exit code 101 is returned. If at least one test failed, exit code 100 is returned.

Signed-off-by: Will Fisher <wfisher@chef.io>
2018-10-04 09:03:54 -04:00
Chef Expeditor
3de23f65af
Bump version to 2.3.7 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-03 05:57:37 +00:00
Jerry Aldrich
d5bb1e5fe9 Fix attribute with empty hash regression (#3454)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-02 22:57:25 -07:00
Chef Expeditor
f3b835b43d
Bump version to 2.3.6 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-10-02 19:28:01 +00:00
Jerry Aldrich
6381dd1b1d Modify cmp matcher output to use .inspect (#3450)
This modifies the output of failed test when using the `cmp` matcher by
calling `.inspect` on the actual value passed.

This makes it easier to diagnose failed matches due to characters such
as `\n` not being visible.

Current behavior:
```
inspec> describe command('echo demo') do
inspec>   its('stdout') { should cmp 'demo' }
inspec> end

Profile: inspec-shell
Version: (not specified)

  Command: `echo demo`
     ×  stdout should cmp == "demo"

     expected: "demo"
          got: demo

     (compared using `cmp` matcher)

Test Summary: 0 successful, 1 failure, 0 skipped
```

New behavior:
```
inspec> describe command('echo demo') do
inspec>   its('stdout') { should cmp 'demo' }
inspec> end

Profile: inspec-shell
Version: (not specified)

  Command: `echo demo`
     ×  stdout should cmp == "demo"

     expected: "demo"
          got: "demo\n"

     (compared using `cmp` matcher)

Test Summary: 0 successful, 1 failure, 0 skipped
```

Many thanks to @jazaval for discovering this!

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-10-02 15:27:48 -04:00
Clinton Wolfe
a0d8f305c1 Revert "Only show test-fixture gem s in search if a speacial flag is passed."
This reverts commit 66e3b578af.
2018-10-01 15:12:54 -04:00
Clinton Wolfe
66e3b578af Only show test-fixture gem s in search if a speacial flag is passed.
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-10-01 15:11:55 -04:00
Chef Expeditor
ccb50da4b6
Bump version to 2.3.5 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-28 21:53:02 +00:00
Jared Quick
2490a72c39 Fix plugin gem install code when deps cannot be resolved (#3453)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-28 17:52:51 -04:00
Chef Expeditor
2b42e32a57
Bump version to 2.3.4 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-27 22:46:46 +00:00
Clinton Wolfe
857b9bb11c Plugins: Support for Train Plugins in InSpec (#3444)
* Unit tests passing for loading Train plugins
* detect works with a train test fixture
* Update fixture install of train-fixture-plugin
* Add functional tests for detect and shell when talking to a train plugin backend
* Update docs to reflect availability of Train plugins
* Functional test for install train plugin from path
* Working install train plugin from path, more tests for installing from odd locations
* PR Feedback

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-27 18:46:35 -04:00
Chef Expeditor
5693d16f7e
Bump version to 2.3.3 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-27 20:57:27 +00:00
Clinton Wolfe
da0ae7bac9 Plugins: Example CLI Plugin, a Resource Lister (#3421)
* Plugin example, CLI resource lister
* Move example plugin into a directory to look like a regular project
* Skeleton of testing for example plugin
* Example plugin unit tests work
* Functional tests added, using core helper
* Add a global method to determine InSpec install root
* Add linter support to the example
* Adjust inspec project rubocop to run linter on example plugins
* Linter autocorrections
* Update readme

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-27 16:57:18 -04:00
Chef Expeditor
ed444b742b
Bump version to 2.3.2 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-27 20:04:53 +00:00
Chef Expeditor
3a19bf3b9d
Bump version to 2.3.1 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-27 16:12:47 +00:00
Chef Expeditor
a5a6179590
Bump version to 2.3.0 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-26 20:34:16 +00:00
Chef Expeditor
9346482354
Bump version to 2.2.120 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-26 17:29:12 +00:00
Jerry Aldrich
20776b363d Add support for multiple descriptions for controls (#3424)
* Add support for multiple descriptions for controls

This adds the ability to specify multiple descriptions in controls.

Example:

```ruby
control 'my-control' do
  impact 1.0
  title 'My control'
  desc 'A default description'
  desc 'rational', 'I need an example'
  describe file('/tmp') do
    it { should be_directory }
  end
end
```

Many thanks to @jquick for helping me with the unit tests.
* Remove unused `descriptions` method
* Remove unused profile from test mocks
* Respond to feedback

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-09-26 13:28:57 -04:00
Chef Expeditor
3b6bd808e9
Bump version to 2.2.119 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-26 02:40:16 +00:00
Jonathan Hartman
08e3b90f2b Support the Busybox variant of netstat in the port resource (#3425)
Signed-off-by: Jonathan Hartman <j@hartman.io>
2018-09-25 22:40:05 -04:00
Chef Expeditor
454bd4a5f8
Bump version to 2.2.118 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-25 22:51:45 +00:00
Clinton Wolfe
c24b65d98a Plugins: Load all CLI commands on usage on empty invocation (#3428)
* Functional test for usage messaging
* Activate v2 commands on empty CLI invocation for usage messaging

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-25 18:51:38 -04:00
Chef Expeditor
dcd65fcd83
Bump version to 2.2.117 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-25 15:14:06 +00:00
Alex Pop
574b04dd4f Grammar correction in error message: use "an" with attribute and unknown (#3439)
Signed-off-by: Alex Pop <apop@chef.io>
2018-09-25 11:13:56 -04:00
Clinton Wolfe
0ced18841f
CLI Plugin Manager SubCommand (#3414)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-25 10:29:18 -04:00
Chef Expeditor
76a688a747
Bump version to 2.2.116 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-24 21:58:38 +00:00
Chef Expeditor
d920f1d24a Bump version to 2.2.115 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-21 15:49:43 +00:00
James Massardo
2af1535f7c Add new resource: aws_ebs_volume (#3381)
* Added support for basic AWS EBS volume testing
* Fix error in exists matcher
* Added EBS resource documentation and requested changes

Signed-off-by: James Massardo <jmassardo@chef.io>
2018-09-21 11:49:28 -04:00
Chef Expeditor
a91892af51 Bump version to 2.2.114 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-20 18:44:09 +00:00
Jared Quick
13e244a880
Remove load locks for cloud resources. (#3420)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-20 14:43:52 -04:00
Chef Expeditor
b16a24b615 Bump version to 2.2.113 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-19 21:38:25 +00:00
Clinton Wolfe
7963131670 Plugins Installer API (#3352)
* Sketch out in comments the unit and functional tests for the installer
* Make a test fixture gem, v0.1.0
* Add a 0.2.0 version of the test fixture gem, this one with a dependency
* Add a fixture with a pre-installed gem
* Correct test-fixture 0.1.0 gem
* Moockup of installed inspec-test-fixture gems
* Uggh add gemspec files to mock installs
* Update gem fixtures, and add a script that does it for me
* Able to load from and list privately managed gems
# Conflicts:
#	lib/inspec/plugin/v2/loader.rb

* Expanded tests, starting on implementation of installer

# Conflicts:
#	test/unit/plugin/v2/loader_test.rb

* Install plugin from local gem file works
* Writes the plugins.json file; needs refactor
* Gem install works; no version pinning
* Install with pinned version works
* Install from path works
* update works
* Validation for uninstall
* Uninstall from path works
* Uninstaller works on gems
* Add search to installer API.


Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-09-19 17:38:13 -04:00
Chef Expeditor
64d7d58d9a Bump version to 2.2.112 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-19 00:20:08 +00:00
Jared Quick
15481e2320
Move artifact to v2 plugin (#3406)
* Move inspec artifact to plugins v2.
* Fix freezing statics
* Update artifact test changes.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-18 20:19:56 -04:00
Chef Expeditor
3786219bf1 Bump version to 2.2.111 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 20:21:52 +00:00
Martin Logan
242bee9ce6 Update AWS Security Group to work with IPV6 rules. (#3394)
Add inbound_rules_count and outbound_rules_count for total variants

Signed-off-by: Martin Logan <martinloganzz@gmail.com>
2018-09-18 16:21:41 -04:00
Chef Expeditor
e2adb68cfe Bump version to 2.2.110 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 19:54:43 +00:00
Jared Quick
544204a44c
Move inspec init to v2 plugins (#3407)
* Move inspec init to v2 plugins.
* Revert inspec run command env change.
* Allow prefix and env for run_inspec_process.
* Update unit tests to use new functionality.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-18 15:54:33 -04:00
Chef Expeditor
4c3b03da19 Bump version to 2.2.109 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 19:00:39 +00:00
Chef Expeditor
83382bb95c Bump version to 2.2.108 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 18:20:58 +00:00
Jared Quick
44c4146a92
Fix json automate render and make the unit tests work. (#3408)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-18 14:20:48 -04:00
Chef Expeditor
3e77734645 Bump version to 2.2.107 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 17:17:19 +00:00
Ben Abrams
0b33644819 adding versions to the gem resource (#3398)
This is useful when you have multiple versions of the same gem installed. It can be leveraged like so:
```
describe gem('rest-client') do
  its('versions') { should include /1.8\.\d+/ }
  its('versions') { should include /2.0\.\d+/ }
  its('versions.count') { should_be eq 2 }
end
```

Signed-off-by: Ben Abrams <me@benabrams.it>
2018-09-18 13:17:10 -04:00
Chef Expeditor
df6350f6a0 Bump version to 2.2.106 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 17:10:15 +00:00
Jared Quick
40e024fa97
Move habitat to v2 plugin. (#3404)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-18 13:10:07 -04:00
Chef Expeditor
b8adedeb3a Bump version to 2.2.105 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 04:01:03 +00:00
Clinton Wolfe
50ff9f6a24
Plugins: Add support for 'bundles' migration (#3384)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-18 00:00:54 -04:00
Chef Expeditor
7aa2283943 Bump version to 2.2.104 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-18 00:59:41 +00:00
Kayleigh Doores
9c1b7eb6a2 Added db_name flag (#3383)
* Added db_name flag
* removed trailing whitespace
* Added comment to disable metrics

Signed-off-by: Kayleigh <kayleigh.doores@gmail.com>
2018-09-17 20:59:31 -04:00
Chef Expeditor
3c93de9a3a Bump version to 2.2.103 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-17 21:41:55 +00:00
Chef Expeditor
6a61b6455d Bump version to 2.2.102 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-17 20:20:44 +00:00
Jared Quick
8caca9be43
Add json-automate to the report structure (#3401)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-17 16:20:32 -04:00
Chef Expeditor
e898cd3585 Bump version to 2.2.101 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-14 00:19:13 +00:00
Jerry Aldrich
bbc4002b53 Fix profile vendoring on Windows (#3378)
* Fix profile vendoring on Windows

This fixes vendoring on Windows by doing the following:
  - Expanding relative paths (handles `\\`)
  - Ensuring archives after closed after reading (prevents locking)

This also does the following:
  - Removes extra file from testing tar archive
  - Ensures fetching dirs/archives in the local fetcher behaves the same

* Fix profile vendoring on Windows

This fixes vendoring on Windows by doing the following:
  - Expanding relative paths (handles `\\`)
  - Ensuring archives after closed after reading (prevents locking)

This also does the following:
  - Removes extra file from testing tar archive
  - Ensures fetching dirs/archives in the local fetcher behaves the same

* Add vendoring to fuctional testing and fix the tmp path for windows

* Add tests for relative paths and backslashes

* Remove backslashes support in filenames on Linux

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-09-13 20:19:02 -04:00
Chef Expeditor
ec7f0f5a4e Bump version to 2.2.100 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 23:09:45 +00:00
Chef Expeditor
b4290fb0c7 Bump version to 2.2.99 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 19:47:55 +00:00
Chef Expeditor
94a560b85b Bump version to 2.2.98 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 19:45:09 +00:00
Chef Expeditor
8fa56fae2f Bump version to 2.2.97 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 19:36:26 +00:00
Jared Quick
927720998c
Add platforms schema command (#3346)
* Add platforms schema command.
* Add functional test.
* Update tests with sorted export.
* Bump train version.
* Fix syntax in tests.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-13 15:36:17 -04:00
Chef Expeditor
4e9bae7d57 Bump version to 2.2.96 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 18:14:20 +00:00
Jared Quick
1c12a544c7
Add string impact options for controls (#3359)
* Add impact class which contains all cvss scores.
* Add testing for impact changes.
* Change symbols to strings for impact.
* Update error messages to be more clear.
* Fix test with new sha

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-13 14:14:05 -04:00
Chef Expeditor
a79b3cf08f Bump version to 2.2.95 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 17:28:11 +00:00
Chef Expeditor
bb3c882a2b Bump version to 2.2.94 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 17:08:32 +00:00
Jared Quick
3da7511d36
Fix the compliance target error checks. (#3392)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-13 13:06:02 -04:00
Chef Expeditor
80c1c07771 Bump version to 2.2.93 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-13 17:05:19 +00:00
Jared Quick
527571750d
Prevent logs from showing up when running inspec json (#3391)
* Prevent logs from showing up when running inspec json.
* Update it test text.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-13 13:05:10 -04:00
Chef Expeditor
9cb3b1e7dd Bump version to 2.2.92 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-12 22:05:54 +00:00
Jared Quick
6445e2c6d5
Add windows functional tests (#3385)
* Add windows functional tests.
* Fix tests for 2012 server.
* Fix windows build script
* Add more functional tests for windows.
* Update comment with TODO.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-12 18:04:16 -04:00
Chef Expeditor
6b3ee3b52f Bump version to 2.2.91 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-12 22:02:35 +00:00
Jared Quick
4eaf2fc540
Populate code for inspec json inheritance (#3386)
* Add a code fallback for inherited profiles.
* Add functional testing.
* Push lint fixes
* Fix inspec.lock file
* Fix lint and break from loop

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-12 18:02:24 -04:00
Chef Expeditor
f644f3fb91 Bump version to 2.2.90 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-12 21:06:00 +00:00
Jared Quick
475eafb46e
Revert uuid change from A2 report. (#3387)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-12 17:05:48 -04:00
Chef Expeditor
6cce7fa1ef Bump version to 2.2.89 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-12 20:45:04 +00:00
Jared Quick
ac106a090e
Implement InSpec global attributes (#3318)
* Add yml attribute option.
* Add type matching.
* Add testing profile for global attributes testing all types.
* Allow attributes to be called within a control block.
* Fix attribut test issues and allow value to be set at runtime.
* Allow setting attr value after creation.
* Move attributes to global namespace.
* Move attributes to a singleton object.
* Add unit and updated functional testing.
* Rename attributes to attributes_test so the testhelper picks it up.
* Add attribute object tests and error types.
* Update with feedback changes.
* Remove extra line.
* Move attribute registry class file.
* Add documentation for attributes
* Rename rspec_extensions.
* Add some failing functional tests.
* Update docs and fix typos.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-12 16:42:58 -04:00
Chef Expeditor
7351b61f4b Bump version to 2.2.88 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-12 20:41:28 +00:00
Chef Expeditor
7bce297cd9 Bump version to 2.2.87 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-10 18:41:30 +00:00
Chef Expeditor
4a4ea333af Bump version to 2.2.86 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-10 18:37:57 +00:00
Christoph Hartmann
0e0b808e9b enforce utf encoding for cli output (#3376)
* enforce utf encoding for cli output
* add profile with wrong character set

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2018-09-10 14:37:43 -04:00
Chef Expeditor
2afe1bc937 Bump version to 2.2.85 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-10 14:15:29 +00:00
Chef Expeditor
f6ecb4c842 Bump version to 2.2.84 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-07 21:03:36 +00:00
Chef Expeditor
aa9dc7ba2c Bump version to 2.2.83 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-07 21:00:12 +00:00
Christoph Hartmann
df9036f6e4 inspec compliance: use multipart upload to support upload on windows (#3369)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2018-09-07 14:25:31 -04:00
Christoph Hartmann
d6110ed162 inspec compliance: ensure we use the mock backend when we upload profiles (#3370)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2018-09-07 14:19:06 -04:00
Chef Expeditor
541b20599d Bump version to 2.2.82 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-07 18:08:09 +00:00
Christoph Hartmann
0c0ad2e5b2 inspec-compliance - do not show success message on failure (#3366)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2018-09-07 14:07:48 -04:00
Chef Expeditor
9d175279ca Bump version to 2.2.81 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-07 03:28:21 +00:00
Jerry Aldrich
9d031053ea Various improvements to vendor command (#3286)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-09-06 23:28:08 -04:00
Chef Expeditor
7976ea4333 Bump version to 2.2.80 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-06 14:56:36 +00:00
Christoph Hartmann
0cd1c21ade handle errors from automate report and display them to the user (#3360)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2018-09-06 10:56:26 -04:00
Chef Expeditor
75719fd933 Bump version to 2.2.79 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-09-05 19:07:42 +00:00
Jared Quick
76b453eee9
Allow target-id passthrough (#3320)
* Allow uuid passthrough
* Update flag to be target-id.
* Updated to use proper formatting for header.
* Fix empty line after cli banner.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-09-05 15:07:34 -04:00
Chef Expeditor
4158c0fec9 Bump version to 2.2.78 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-30 21:10:24 +00:00
Chef Expeditor
2f1567284c Bump version to 2.2.77 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-30 17:04:30 +00:00
Noel Georgi
34ae5aac40 Add HTTP basic auth for URL based inspec deps (#3341)
* Add HTTP basic auth for URL based inspec deps
* Add tests

Signed-off-by: Noel Georgi <git@frezbo.com>
2018-08-30 12:57:50 -04:00
Chef Expeditor
d37f6a22f4 Bump version to 2.2.76 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-30 16:56:21 +00:00
Noel Georgi
9b5aaa4f87 Support erb rendering (#3338)
* Support erb rendering

Fixes: https://github.com/inspec/inspec/issues/3337

* Add UT's and docs

Signed-off-by: Noel Georgi <git@frezbo.com>
2018-08-30 12:56:06 -04:00
Chef Expeditor
86ca580d76 Bump version to 2.2.75 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-30 13:16:36 +00:00
Chef Expeditor
ef5878ebe2 Bump version to 2.2.74 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-30 13:12:07 +00:00
Jared Quick
6120497db1
Convert legacy supports to their platform counterparts (#3333)
* Convert legacy supports to their platform counterparts.
* Fix rubocop lint.
* Update json schema for platform supports.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-30 09:11:55 -04:00
Chef Expeditor
6e48478701 Bump version to 2.2.73 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-29 17:32:31 +00:00
Noel Georgi
0d951e1fd1 fix skip message not being passed for merge (#3329)
* fix skip message not being passed for merge
* Fix calling method twice

Signed-off-by: Noel Georgi <git@frezbo.com>
2018-08-29 13:32:22 -04:00
Chef Expeditor
4e60ecb0f0 Bump version to 2.2.72 by Chef Expeditor
Obvious fix; these changes are the result of automation not creative thinking.
2018-08-28 19:53:27 +00:00
Chef Expeditor
39d60b1d0c Bump version to 2.2.71 by Chef Expeditor 2018-08-28 13:11:51 +00:00
Josh Hudson
2d44b6e5e0 Cached profiles with Compliance Fetcher (#3221)
* Leverage existance check in Compliance::Fetcher.resolve to not re-download locally cached profiles
* Move logic from Compliance::API.exist? to Compliance::API.profiles to reuse code in cases where we need to access profiles' metadata directly.
* Declare @upstream_sha256 if target is a string
* Handle other fetchers that don't support upstream_sha256 within Inspec::CachedFetcher.initialize
* Add initialize for Compliance::Fetcher to not pollute Fetchers::Url with its logic
* Add Compliance::Fetcher.sha256 to leverage upstream_sha256 instead of relying on inherited method from Fetchers::Url
* Revert changes to cached fetcher that are unnecessary after refactor
* Pacify the god of ruby syntax
* Move Compliance::API.profiles filtering logic to end of method to leverage normalization of mapped_profiles
* Add and update unit tests to support caching with Compliance::Fetcher.upstream_sha256

Signed-off-by: Josh Hudson <jhudson@chef.io>
2018-08-28 09:11:38 -04:00
Chef Expeditor
36319d0f04 Bump version to 2.2.70 by Chef Expeditor 2018-08-23 21:04:21 +00:00