Commit graph

2553 commits

Author SHA1 Message Date
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
Chef Expeditor
43570ad409 Bump version to 2.2.69 by Chef Expeditor 2018-08-23 17:54:40 +00:00
Chef Expeditor
19f8ffc0f0 Bump version to 2.2.68 by Chef Expeditor 2018-08-23 17:51:11 +00:00
Chef Expeditor
ac1484ca0d Bump version to 2.2.67 by Chef Expeditor 2018-08-23 17:47:40 +00:00
Jerry Aldrich
7098631d3e Infer --sudo when --sudo-password is used (#3313)
This does the following:
  - Adds `--sudo` if using `--sudo-password`
  - Warns the user if using `--sudo-password` without `--sudo`
  - Adds unit tests for `Inspec::BaseCLI#opts`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-08-23 13:47:26 -04:00
Noel Georgi
741ad8a2fb Fix skip hash being passed instead of boolean value (#3323)
Fixes: https://github.com/inspec/inspec/issues/3322

Signed-off-by: Noel Georgi <git@frezbo.com>
2018-08-23 13:47:10 -04:00
Chef Expeditor
74525d82bc Bump version to 2.2.66 by Chef Expeditor 2018-08-23 17:44:00 +00:00
Jared Quick
9f3e1c33a8
Suppress logs for json-automate reporter (#3324)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-23 13:43:48 -04:00
Chef Expeditor
0767ffc6f5 Bump version to 2.2.65 by Chef Expeditor 2018-08-22 19:58:47 +00:00
Vern Burton
a7ab4b8b5f Add cloudlinux under redhat family (#2935)
* adding cloudlinux into the mocker under the redhat family as it is found inside of train, and creating tests for cloudlinux that mirror the centos/redhat tests.
* adding cloudlinux under the select_service_mgmt method so that it can be matched.

Signed-off-by: Vern Burton <me@vernburton.com>
2018-08-22 15:58:38 -04:00
Chef Expeditor
a88f929e27 Bump version to 2.2.64 by Chef Expeditor 2018-08-17 15:08:31 +00:00
Kris Shannon
53e5814f74 Allow apache_conf include files to be empty (#3294)
In the `read_file` method we can call `read_file_content` with the second
argument `true` to avoid skipping on an empty file.

We will still skip the control if the main configuration file is empty
as there is still an explicit call to `read_file_content` without this
argument in the `read_content` method.

Signed-off-by: Kris Shannon <k.shannon@amaze.com.au>
2018-08-16 20:22:55 -04:00
Clinton Wolfe
d24e0f0ec9 Plugins V2 API: CLI Command Plugin Type, Again (#3296)
Plugins V2 API: CLI Command Plugin Type

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-16 20:22:28 -04:00
Clinton Wolfe
811318f2f8 Plugins API v2: Loader, Base API, and Test Harness (#3278)
* Functional tests for userdir option
* Accepts --config-dir CLI option
* Actually loads a config file from the config dir, more cases to test
* Able to load config and verify contents from config-dir
* Functional tests to ensure precedence for config options
* Enable setting config dir via env var
* .inspec, not .inspec.d
* Begin converting PluginCtl to PluginLoader/Registry
* Able to load and partially validate the plugins.json file
* More work on the plugin loader
* Break the world, move next gen stuff to plugin/
* Be sure to require base cli in bundled plugins
* Move test file
* Revert changes to v1 plugin, so we can have a separate one
* Checkpoint commit
* Move v2 plugin work to v2 area
* Move plugins v1 code into an isolated directory
* rubocop fixes
* Rip out the stuff about a user-dir config file, just use a plugin file
* Two psuedocode test file
* Working base API, moock plugin type, and loader.
* Adjust load path to be more welcoming
* Silence circular depencency warning, which was breaking a unit test
* Linting
* Fix plugin type registry, add tests to cover
* Feedback from Jerry

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-16 18:16:32 -04:00
Chef Expeditor
1bd6ab08e5 Bump version to 2.2.63 by Chef Expeditor 2018-08-15 00:08:09 +00:00
Jared Quick
34ac059972
Allow the jsonAutomate report to be executed from cli (#3285)
* Allow the jsonMerged report to be executed from cli.
* Renamed reporter to json-automate and added in comments.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-14 20:07:59 -04:00
Chef Expeditor
f18bcc34ee Bump version to 2.2.62 by Chef Expeditor 2018-08-10 16:39:10 +00:00
Miah Johnson
3a9ed68c72
Merge pull request #3267 from inspec/miah/3158-3
Update `only_if` to allow user specified messages.
2018-08-10 09:38:55 -07:00
Miah Johnson
6823d7287d Create a new variable 'msg' to store the message string returned when
skipped.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-08-09 13:00:57 -07:00
Miah Johnson
e710b5b633 Remove conditional checks for true and reverse if conditional on
Inline if_false_message into test.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-08-09 12:12:47 -07:00
Chef Expeditor
a83ae6ac5d Bump version to 2.2.61 by Chef Expeditor 2018-08-09 13:24:46 +00:00
Chef Expeditor
6c30858ff1 Bump version to 2.2.60 by Chef Expeditor 2018-08-09 13:21:34 +00:00
Robert Van Kleeck
5264cb5fdf add iis_app_pool resource (#2400)
* add iis_app_pool resource
* add sign off
* remove training whitespace
* code cleanup and simplify timeout checks
* add mock tests

Signed-off-by: Rob Van Kleeck <rvankleeck@salesforce.com>
2018-08-09 09:19:49 -04:00
Henry Muru Paenga
f605051f53 Add new resource: aws_ecs_cluster (#3213)
Signed-off-by: Henry Muru Paenga <meringu@gmail.com>
2018-08-09 09:19:27 -04:00
Chef Expeditor
447732f43c Bump version to 2.2.59 by Chef Expeditor 2018-08-09 13:18:23 +00:00
Jared Quick
71003cd564
Error cleanly if a reporter errors while rendering (#3280)
* Error cleanly if a reporter error while rendering.
* Add functional test for automate reporter.
* Remove authors.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-09 09:18:10 -04:00
Chef Expeditor
ac596dc015 Bump version to 2.2.58 by Chef Expeditor 2018-08-09 12:20:39 +00:00
Noel Georgi
9d3beb8d41 Adding docker plugin support (#3074)
* Fixing tests and squashing
* Updating as per some PR comments
* PR comments

Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
2018-08-09 08:20:32 -04:00
Chef Expeditor
b872e9135a Bump version to 2.2.57 by Chef Expeditor 2018-08-09 12:16:11 +00:00
Ksenia
d2ae5c0d68 Fix issue#3269. Add 17 hexadecimal characters support aws_route_table (#3277)
Add support in aws_route_table to allow 17 hexadecimal characters
2018-08-09 08:16:03 -04:00
Miah Johnson
782be81807 Allow passing a message to set_skip_rule. Previously, the value passed
to set_skip_rule could be a boolean, or a message. Now value should
always be a boolean, and if a message is needed one can be passed and
will be set.
Allow only_if to take a message during control_eval DSL.
Add test for only_if(message).

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-08-07 11:37:59 -07:00
Chef Expeditor
5ce44b4d4b Bump version to 2.2.56 by Chef Expeditor 2018-08-07 16:12:51 +00:00
pete higgins
4ed7362f0c Enable inspec archive, check, and json to run as unpriveleged user (#3263)
* Add --vendor-cache flag for archive, check, and json commands.
* Remove unused ignore_supports flag for Inspec::Runner.

This flag was only set in two code paths that did not call
Inspec::Runner so setting it did not have any effect.

Signed-off-by: Pete Higgins <pete@peterhiggins.org>
2018-08-07 12:12:41 -04:00
Miah Johnson
2057ccbe5a Correct rubocop issue
Set {:result} on skip_rule instance variable.
check for msg[:result]

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-08-06 14:03:34 -07:00
Chef Expeditor
66bd4942f9 Bump version to 2.2.55 by Chef Expeditor 2018-08-03 14:07:26 +00:00
Jared Quick
73a40139a6 Add a merged json report for A2 (#3261)
* Provide a json_merge report used by A2 that merges all child profiles.

Signed-off-by: Jared Quick <jquick@chef.io>

* Merge profile controls from child up until we find something usable.

Signed-off-by: Jared Quick <jquick@chef.io>

* Add testng for json_merged report.

Signed-off-by: Jared Quick <jquick@chef.io>

* Push the profile population to be later in the report.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-03 16:07:01 +02:00
Chef Expeditor
94428711ec Bump version to 2.2.54 by Chef Expeditor 2018-08-02 18:42:23 +00:00
Noel Georgi
b93da53237 Escaping package names for windows packages (#3259)
* Escaping package names for windows packages
* Fixing missed package_name ref
* Updating Mock SHA
* Removing unwanted file
* Linting fix

Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
2018-08-02 14:40:14 -04:00
Chef Expeditor
1c1b967d48 Bump version to 2.2.53 by Chef Expeditor 2018-08-02 18:39:23 +00:00
Jared Quick
6e59ef176b
Populate report code for merged controls (#3264)
* Populate the code section for all profiles where we merge controls.
* Fix rubocop issues.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-02 14:39:11 -04:00