Commit graph

2543 commits

Author SHA1 Message Date
Chef Expeditor
f2edb7a285 Bump version to 2.2.45 by Chef Expeditor 2018-07-25 20:01:53 +00:00
Jerry Aldrich
f2d64938b7 windows_feature resource: Add DISM support (#3224)
* windows_feature resource: Add DISM support

This modifies the `windows_feature` resource to fallback to DISM when
the `Get-WindowsFeature` command is not available.

* Allow specifying `:dism` or `:powershell`
* Replace stacktrace with smaller error message
* Add notes/todo about raise behavior
* Remove duplicated platform check

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-25 16:00:06 -04:00
Jerry Aldrich
2245bba021 cli: Downcase supermarket tool name to match URL (#3242)
* cli: Downcase supermarket tool name to match URL

This downcases the user provided tool name. Without this fetching the
profile will fail because the Supermarket API downcases in the URL.

* Add another downcase
* Add handling for `supermarket://owner_but_no_name`

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-25 15:59:19 -04:00
Jerry Aldrich
c1d7b2cfa3 alpine resource: Fix small style issues (#3238)
* Constrain RuboCop disables to single method
* Add comment to Alpine package command
* Use single quotes for Alpine package command
* Change `it` statement to be readable

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-25 15:57:51 -04:00
Chef Expeditor
c647ac9469 Bump version to 2.2.44 by Chef Expeditor 2018-07-25 19:57:27 +00:00
James Stocks
fb0a8989db Add extra fault checking to git fetcher (#3239)
Raise with the stderr from `git ls-remote` if stderr is not empty.
This is useful when inspec runs in CI and you do not have direct control/troublshooting options.

Signed-off-by: James Stocks <jstocks@chef.io>
2018-07-25 15:57:03 -04:00
Chef Expeditor
3c0abf7774 Bump version to 2.2.43 by Chef Expeditor 2018-07-25 17:08:23 +00:00
Chef Expeditor
b8928aca74 Bump version to 2.2.42 by Chef Expeditor 2018-07-23 08:45:31 +00:00
Chef Expeditor
9d36e1b61a Bump version to 2.2.41 by Chef Expeditor 2018-07-19 19:07:50 +00:00
Dan Webb
a0fffa5286 Add Alpine package provider (#3215)
- Add Alpine tests
- Stub apk grep command for alpine
- Resolve (disable for now) rubocop ABC/CyclomaticComplexity/PerceivedComplexity

Signed-off-by: Dan Webb <dan.webb@damacus.io>
2018-07-19 15:07:36 -04:00
James Stocks
ca833afacf Generate describe code for an array of strings (#3227)
Context:
When testing a Windows registry key with a period character in it e.g. `explorer.exe` it is not possible to use `its("explorer.exe")` because the period would be interpreted as method chaining.
In this case, you must instead use `its(["explorer", "exe"])`
See https://github.com/inspec/inspec/issues/1281

This commit fixes `to_ruby`in `Inspec::Describe` so that it produces an array in the generated Inspec code instead of a string.

Signed-off-by: James Stocks <jstocks@chef.io>
2018-07-19 15:00:21 -04:00
Chef Expeditor
9581176633 Bump version to 2.2.40 by Chef Expeditor 2018-07-19 12:17:08 +00:00
Miah Johnson
bfd569fe99 Ensure resources fail that target something that isn't supported (#3231)
* Use fail_resource rather than skip_resource when the platform is not
supported by the resource.

* Update tests to handle failing on unsupported platforms.
Update functional tests.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-07-19 08:16:54 -04:00
Chef Expeditor
60177faa24 Bump version to 2.2.39 by Chef Expeditor 2018-07-18 20:55:41 +00:00
Chef Expeditor
d95ccadac7 Bump version to 2.2.38 by Chef Expeditor 2018-07-17 15:42:47 +00:00
Clinton Wolfe
02cb93ec23 Refactor 'inspec init profile' into a reusable component. (#3214)
* Refactor 'inspec init profile' into a reusable component.

base_cli.rb had several methods used internally, these are exposed so
lib/bundles/inspec-init/profile.rb can act as a library for anything
that needs to create new Inspec profiles programatically

* Move output methods to be public instance methods; and make Init::Profile into a working renderer.  Functional tests pass but could use some refactoring to be easier to use.
* Refactor, renaming vars to be clearer
* Move puts and exit calls into basecli
* Add comment about simplified ERB rendering in ruby 2.5.0+

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-07-17 11:42:36 -04:00
Chef Expeditor
fee139bafb Bump version to 2.2.37 by Chef Expeditor 2018-07-16 12:21:12 +00:00
Jerry Aldrich
706493f2f3 command resource: Allow redacting #to_s (#3207)
* command resource: Allow redacting `#to_s`
* Respond to feedback

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-16 08:20:57 -04:00
Chef Expeditor
409a71b28e Bump version to 2.2.36 by Chef Expeditor 2018-07-13 19:54:25 +00:00
Chef Expeditor
54a9b7a97e Bump version to 2.2.35 by Chef Expeditor 2018-07-09 17:57:56 +00:00
Stanislav Voroniy
a16877f427 A number of bug fixes and new features for oracledb_session resource (#3170)
Signed-off-by: Stanislav Voroniy <stas@voroniy.com>
2018-07-09 13:57:45 -04:00
Chef Expeditor
1eb31e1c31 Bump version to 2.2.34 by Chef Expeditor 2018-07-05 20:39:09 +00:00
Stanislav Voroniy
4112085ff7 fix for apache_conf to handle quoted Includes (#3193)
Signed-off-by: Stanislav Voroniy <stas@voroniy.com>
2018-07-05 16:38:58 -04:00
Chef Expeditor
eb40d23fb0 Bump version to 2.2.33 by Chef Expeditor 2018-07-05 19:44:41 +00:00
Clinton Wolfe
92e96ebedb Accept regexes for --controls option to inspec exec (#3179)
* Functional tests for regex control selection
* Implementation for regex-based control filtering

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-07-05 15:44:30 -04:00
Chef Expeditor
dc0c8b7cc0 Bump version to 2.2.32 by Chef Expeditor 2018-07-05 19:37:28 +00:00
Miah Johnson
a084187b21 When a profile is created with init, the last item after a / is the (#3175)
profile name. eg "with/slash" would result in a profile created in the
"with" directory named "slash"

Add test for inspec init, and updated other for new output.

Clean up profiles created during testing and place them in temporary
directories.

Describe our test a bit better.
Check that the profile was created in the right location.
Check that the profile is named correctly.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-07-05 15:37:18 -04:00
Noel Georgi
6fe13ce1eb Updating inspec with bastion options (#3180)
* Updating inspec with bastion options as per https://github.com/inspec/train/pull/310
* Updating train pin
* Adding --password to pass the test
* Revert "Updating train pin"
* PR changes

Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
2018-07-05 15:37:04 -04:00
Chef Expeditor
b94eec74fe Bump version to 2.2.31 by Chef Expeditor 2018-07-05 18:54:11 +00:00
Jerry Aldrich
b4c5475f26 cli: Add --insecure option for exec and shell (#3195)
* cli: Add `--insecure` option to `exec` and `shell`
* Move `--insecure` to target options

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-05 14:53:58 -04:00
Chef Expeditor
3fb1108c4d Bump version to 2.2.30 by Chef Expeditor 2018-07-05 18:20:25 +00:00
Chef Expeditor
30acc75ea5 Bump version to 2.2.29 by Chef Expeditor 2018-07-05 17:55:05 +00:00
Chef Expeditor
58bc7b78a5 Bump version to 2.2.28 by Chef Expeditor 2018-07-05 13:12:30 +00:00
Jared Quick
b31427673c
Update the node platform info to warn if we cannot find something. (#3186)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-05 09:12:18 -04:00
Chef Expeditor
311b906227 Bump version to 2.2.27 by Chef Expeditor 2018-06-29 12:43:45 +00:00
Clinton Wolfe
2ac5581d32 Document exit codes for 'inspec exec' and add --no-distinct-exit option (#3178)
* Add long description to inspec exec command, mentioning exit codes
* Modify website doc builder code to use long description if available
* Functional test for --distinct-exit flag
* Implement --distinct-exit option
* Inspec shell also needs the option

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-29 08:43:34 -04:00
Chef Expeditor
f09d115296 Bump version to 2.2.26 by Chef Expeditor 2018-06-26 19:14:36 +00:00
Clinton Wolfe
8683c54510 Update core resources with filtertable API changes (#3117)
* Search and replace filtertable methods to use new names, and rely on automatic methods
* Remove spurious exists? matchers - see https://relishapp.com/rspec/rspec-expectations/docs/built-in-matchers/exist-matcher
* Revert removing exists? - we'll do it on a separate PR
* Gah, didn't save before resolving conflict
* Add back name column on aws cloudtrail trails

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-26 15:14:21 -04:00
Chef Expeditor
d59f432986 Bump version to 2.2.25 by Chef Expeditor 2018-06-26 17:04:45 +00:00
Jared Quick
52694d4031 Add parent_profile field in json output (#3164)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-06-26 13:04:31 -04:00
Chef Expeditor
f9017b8467 Bump version to 2.2.24 by Chef Expeditor 2018-06-26 11:57:21 +00:00
Chef Expeditor
b85da4fb27 Bump version to 2.2.23 by Chef Expeditor 2018-06-26 11:54:00 +00:00
Chef Expeditor
639267adab Bump version to 2.2.22 by Chef Expeditor 2018-06-26 11:50:32 +00:00
Jerry Aldrich
737df411ef apache_conf resource: Strip quotes from values (#3142)
* apache_conf resource: Strip quotes from values
* Update regex to capture all vars between quotes
* Change `x` and `y` to proper variable names

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-06-26 07:48:48 -04:00
Clinton Wolfe
1d976921e3 Detect inspec-core mode and do not attempt to load cloud resources (#3163)
* Do not load AWS resources if SDK version mismatches
* Detect if we are running ins inspec-core mode, and do not attempt loading AWS or Azure if so.

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-26 07:47:33 -04:00
Chef Expeditor
e680896f19 Bump version to 2.2.21 by Chef Expeditor 2018-06-26 11:47:11 +00:00
Colin Hebert
7deed13425 Add support for shallow link paths (#3168)
* Add support for shallow link paths
* Improve documentation of the

Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
2018-06-26 07:47:00 -04:00
Chef Expeditor
0a0a7b7fe9 Bump version to 2.2.20 by Chef Expeditor 2018-06-21 18:20:07 +00:00
Clinton Wolfe
44c0fd2e4f
Accept symbols and downcased criteria in aws_iam_policy have_statement matcher (#3129)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-21 14:19:56 -04:00
Chef Expeditor
03b6dd8324 Bump version to 2.2.19 by Chef Expeditor 2018-06-21 17:38:00 +00:00
Jared Quick
12890408bb
Fix control merging when overriding child controls (#3155)
* Fix the control merging issues when overriding child controls.
* Fix rubocop issue and vendor compression.
* Add in lock file for vendor profile

Signed-off-by: Jared Quick <jquick@chef.io>
2018-06-21 13:37:47 -04:00
Chef Expeditor
8f7c118d6b Bump version to 2.2.18 by Chef Expeditor 2018-06-21 01:28:08 +00:00
Jerry Aldrich
cf9ce1bfdc auditd resource: Add handling for sudo/no command (#3151)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-06-20 21:27:53 -04:00
Chef Expeditor
4d3113c47e Bump version to 2.2.17 by Chef Expeditor 2018-06-19 12:54:26 +00:00
Jeremy Miller
6a0bf8b24d updated skip message to reflect accurate version of audit support (#3153)
Signed-off-by: Jeremy J. Miller <jm@chef.io>
2018-06-19 08:54:15 -04:00
Chef Expeditor
8eb559b293 Bump version to 2.2.16 by Chef Expeditor 2018-06-15 12:44:29 +00:00
Christoph Hartmann
b2e0bccea8 deprecate azure_generic_resource (#3132)
* deprecate azure_generic_resource

Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2018-06-15 08:44:19 -04:00
Chef Expeditor
7fa616a2ed Bump version to 2.2.15 by Chef Expeditor 2018-06-14 19:26:14 +00:00
Chef Expeditor
6fc288ebb7 Bump version to 2.2.14 by Chef Expeditor 2018-06-14 18:05:35 +00:00
Jared Quick
7db83446ba
Add insecure option to the automate report json (#3124)
* Add insecure option to the automate report json.
* Add in automate and compliance json documentation.
* Fix typo.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-06-14 14:05:21 -04:00
Chef Expeditor
a4ad7dd809 Bump version to 2.2.13 by Chef Expeditor 2018-06-14 17:42:13 +00:00
Clinton Wolfe
7aa60852e6 Add list properties back to shadow (#3140)
* Un-deprecate plural properties on shadow; deprecate the singular versions
* Update filtertable interface to current
* A weak attempt at making the docs coherent
* Doc feedback per Jerry

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-14 13:42:00 -04:00
Chef Expeditor
b329b08aa6 Bump version to 2.2.12 by Chef Expeditor 2018-06-11 15:26:05 +00:00
Chef Expeditor
28fae56501 Bump version to 2.2.11 by Chef Expeditor 2018-06-11 12:12:59 +00:00
Jerry Aldrich
0b46fe1ac6 Translate auditd -s RHEL output to match CentOS (#3114)
This translates the output of `auditctl -s` on RHEL to match CentOS.

This is based on the details from issue #3113. I could not find a test
box that would give me the output to match what was reported.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-06-11 08:12:44 -04:00
Chef Expeditor
b354be0342 Bump version to 2.2.10 by Chef Expeditor 2018-06-08 01:32:24 +00:00
Chef Expeditor
630d83a5c2 Bump version to 2.2.9 by Chef Expeditor 2018-06-07 22:48:19 +00:00
Chef Expeditor
728dd4098c Bump version to 2.2.8 by Chef Expeditor 2018-06-07 19:06:27 +00:00
Clinton Wolfe
6f46d52242
Add aws_elb and aws_elbs resources (#3079)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-07 15:06:05 -04:00
Chef Expeditor
500688ae24 Bump version to 2.2.7 by Chef Expeditor 2018-06-07 18:42:00 +00:00
Miah Johnson
ab32446213 Adds a aws_flow_log resource with unit and integration testing. (#2906)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-07 14:41:46 -04:00
Chef Expeditor
e834d91d19 Bump version to 2.2.6 by Chef Expeditor 2018-06-06 18:15:32 +00:00
Chef Expeditor
e48de7cb79 Bump version to 2.2.5 by Chef Expeditor 2018-06-06 18:11:02 +00:00
Chef Expeditor
ce37657cce Bump version to 2.2.4 by Chef Expeditor 2018-06-06 16:14:38 +00:00
Samuel Boucher
27995f37e8 Update junit reporter to add failures attribute (#3086)
Signed-off-by: Samuel Boucher <boucher.samuel.c@gmail.com>
2018-06-06 12:14:24 -04:00
Chef Expeditor
cd44ce6775 Bump version to 2.2.3 by Chef Expeditor 2018-06-06 15:57:02 +00:00
Jared Quick
06e1aa5379 Allow custom resources to access all other resources (#3108)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-06-06 11:56:51 -04:00
Chef Expeditor
b1fa538521 Bump version to 2.2.2 by Chef Expeditor 2018-06-06 02:35:24 +00:00
Clinton Wolfe
f9dd82f2f6
Add common methods to FilterTable automatically (#3104)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-05 22:35:09 -04:00
Chef Expeditor
f19352c211 Bump version to 2.2.1 by Chef Expeditor 2018-06-05 21:33:07 +00:00
Clinton Wolfe
ca6556e0fe
Add lazy-loading to FilterTable (#3093)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-05 17:32:52 -04:00
Chef Expeditor
10183aca1a Bump version to 2.2.0 by Chef Expeditor 2018-06-05 04:46:47 +00:00
Clinton Wolfe
4cd6cc07cc
Two fixes to FilterTable where criteria handling (#3045)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-05 00:46:32 -04:00
Chef Expeditor
87ce26f50b Bump version to 2.1.88 by Chef Expeditor 2018-06-05 00:21:12 +00:00
Clinton Wolfe
8c274daaa9
Refactor: Perform internal rename and add comments to FilterTable (#3047)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-04 20:20:59 -04:00
Chef Expeditor
8f57ec7824 Bump version to 2.1.87 by Chef Expeditor 2018-06-04 22:52:57 +00:00
Chef Expeditor
9f5614e041 Bump version to 2.1.86 by Chef Expeditor 2018-06-01 14:39:41 +00:00
Jared Quick
06ff747cfc
Detect windows packages with trailing spaces. (#3106)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-06-01 10:39:26 -04:00
Chef Expeditor
d187f0d010 Bump version to 2.1.85 by Chef Expeditor 2018-06-01 08:52:57 +00:00
Dominik Richter
ebd1d36600 support local npm package searches (#3105)
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2018-06-01 10:52:46 +02:00
Chef Expeditor
b70910255f Bump version to 2.1.84 by Chef Expeditor 2018-05-31 21:12:05 +00:00
Jared Quick
924349b88b Fix the git fetcher to vendor correctly (#3097)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-05-31 13:53:14 -04:00
Noel Georgi
4888f4216a Fixing wrong attribute reference for rspec output (#3080)
Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
2018-05-31 13:47:59 -04:00
Tor Magnus Rakvåg
34b393ed3c mssql_session default port and local_mode (#3031)
* set port default to nil, introduce local_mode
* raise instead of warning
* restore default port, allow explicit nil

Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
2018-05-31 13:47:28 -04:00
Noel Georgi
317a6d1953 Adding YAML reporter (#3081)
* Adding YAML reporter
* Updating yaml o/p
* Removing comment
* Adding UT for YAML reporter, adding missing reporters
* This PR takes care of the following:
 - Fixes the YAML reporter UT
 - Adds the report method to YAML reporter to support code example as in #3085
 - Disables the cyclomatic complexity Metric for reporter

Signed-off-by: Noel Georgi <18496730+frezbo@users.noreply.github.com>
2018-05-31 13:42:09 -04:00
Tor Magnus Rakvåg
71ba5018d2 Enhance groups resource with members property (#3029)
* implement members property
* flatten groups entry, extract flatten helper
* lints
* more idiomatic spec, add example of members testing

Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
2018-05-31 13:37:44 -04:00
Tor Magnus Rakvåg
367f91ea31 handle nil properties in iis_site (#3040)
* return nil instead of trying to index into nil
* fix typo
* add spec for deleted site

Signed-off-by: Tor Magnus Rakvåg <tm@intility.no>
2018-05-31 13:36:15 -04:00
Julian C. Dunn
1046a77027 Remove unneeded "-a" from the RPM query for performance improvement (#3077)
Signed-off-by: Julian C. Dunn <jdunn@chef.io>
2018-05-31 12:11:41 -04:00
Chef Expeditor
82e7eba197 Bump version to 2.1.83 by Chef Expeditor 2018-05-18 00:05:16 +00:00
Chef Expeditor
e77d96c957 Bump version to 2.1.82 by Chef Expeditor 2018-05-17 21:58:43 +00:00