Commit graph

558 commits

Author SHA1 Message Date
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
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
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
Miah Johnson
006b4c7e6f Fix documentation link for azure integration tests. (#3336)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-08-30 10:30:22 -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
Kimberly Garmoe
02aba82b38 Fixes docs images (#3288)
Signed-off-by: kagarmoe <kgarmoe@chef.io>
2018-08-14 14:24:11 -04:00
Christoph Hartmann
28df22bdbe update docs to use new platform attributes in supports (#3279)
* update docs to use new platform attributes in supports
* Updated supports docs.

Signed-off-by: Jared Quick <jquick@chef.io>
2018-08-09 14:07:18 -04:00
James Stocks
29d82a0460 Correct docs for Windows registry_key resource (#3248)
Last update was mistaken about the workaround that should be used.
This commit corrects that mistake and provides some example output from `inspec shell`.

Signed-off-by: James Stocks <jstocks@chef.io>
2018-08-09 09:17:05 -04:00
Clinton Wolfe
2de06bdeb5 Clean injection of Availability section (#3206)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-09 08:34:49 -04: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
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
James Stocks
3b56223a52 Update docs for registry keys with period characters (#3216)
Signed-off-by: James Stocks <jstocks@chef.io>
2018-07-19 15:00:39 -04:00
Kimberly Garmoe
eb87fd384d Markdown and code fence fixes (#3230)
Signed-off-by: kgarmoe <kgarmoe@chef.io>
2018-07-19 14:31:38 -04:00
Jerry Aldrich
67405bca66 docs: Fix first xinetd_conf example (#3229)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-18 11:29:39 -04: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
Jerry Aldrich
3ea6780407 docs: Fix formatting/style on InSpec DSL page (#3201)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-13 15:54:13 -04: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
Clinton Wolfe
d0e2608ec3 Overhaul shadow docs (#3156)
* Overhaul shadow docs
* Feedback from stocksy
* Edits to shadow resource
* PR feedback correction
* Attempt to clarify grammar for expiry_date criterion

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-07-05 16:15:03 -04: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
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
Clinton Wolfe
81d0423ee0 Overhaul Glossary (#3152)
* Move text glossary into main glossary file, and adjust headings
* Rewrite simple visual glossary example with more concrete example and add internal hyperlinks
* Add plural visual glossary
* Progress on the text glossary
* More Progress on the text glossary
* Remove skeletal advanced usage section for
* Edits for markdown, copy, passives

Signed-off-by: kgarmoe <kgarmoe@chef.io>
2018-06-20 21:26:36 -04: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
Jerry Aldrich
01d31efde3 docs: Remove extra backticks from windows_task (#3149)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-06-15 08:08:03 -04: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
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
Andrey Artemov
47bb4aa2fe Fix code examples for http resource (#3134)
Signed-off-by: Andrey Artemov <andrey.artemov@gmail.com>
2018-06-14 09:29:10 -04: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
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
Miah Johnson
5416f523a9 correct docs for shadow (#3042)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-06-06 14:13:34 -04:00
Miah Johnson
71ca82fd74 Documentation fixes (#3058)
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-06-06 14:10:48 -04: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
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
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
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
Jerry Aldrich
49118a90b9 Spellcheck FilterTable Developer Documentation (#3111)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-06-04 18:52:44 -04:00
Clinton Wolfe
b334eb65d9
FilterTable Developer Documentation (#3048)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-06-02 22:34:05 -04: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
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
Jared Quick
03e87cd89d
Bup the release to test new gem builds (#3071)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-05-17 20:05:04 -04:00
Miah Johnson
e2fe18028d true should not be a string. (#3043)
Fixes https://github.com/chef/inspec/issues/2786

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-05-16 08:53:37 -04:00
Miah Johnson
988eb9749b AWS resource permission docs (#3036)
* Add documentation about required IAM permissions to AWS Resources.
* Change phrasing.

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2018-05-10 14:57:53 -04:00
Clinton Wolfe
af72574b34 Skeletal aws_ec2_instances resource (#3023)
* Add integration and unit tests for aws_ec2_instances
* Basic docs for aws_ec2_instances
* Add basic aws_ec2_instances resource

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-05-10 14:54:33 -04:00
Jeremy
1407e681fc #2810 - Add check if aws s3 bucket is encrypted. (#2937)
* Add check if aws s3 bucket is encrypted.
Required terraform aws provider >= 1.6
Fix indentation issue in aws_s3_bucket.rb

* Implement most changes recommended by @TrevorBramble, and refactored other methods to align with recommendations (except Terraform nitpick; preference is to keep coding style consistent until full refactor).

Signed-off-by: Jeremy Phillips <github@uranusbytes.com>
2018-05-03 09:55:29 -04:00
Noel Georgi
ffbd6cbfb2 Fixing wrong filesystem size type (#3013)
Signed-off-by: Noel Georgi <noel.georgi@reancloud.com>
2018-05-03 09:16:07 -04:00
Clinton Wolfe
1a00853cd8
Catch exceptions in control blocks and fail the control (#2987)
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-04-26 15:44:16 -04:00
Omar J. Irizarry
2495fd8196 extend os_env resource to select between Machine and User vars on Windows (#2945)
Signed-off-by: Omar J Irizarry <irizarry_omar_j@network.lilly.com>
2018-04-26 15:10:14 -04:00
Clinton Wolfe
8934352935 Make names for AWS Config service objects optional (#2928)
* Update tests and docs to assume one recorder per region
* Config recorder supports singleton fetch
* Docs and tests for singleton mode delivery_channel
* Implementation for singleton delivery channel, and some other code cleanup
* Implement some feedback, and fix a bug in traversing the struct in looking for empty results

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-04-19 13:08:16 -04:00
Axel Kummer
923f5a9e56 Update Resource documentation for Users Resource (#2954)
The `shell` matcher have to be `shells` and expects an array.
Wrong:
`its('shell') { should eq "/sbin/nologin" }`

Got error:
```
     ×  Users with username =~ /stockservice-.*/ shell
     undefined method 'shell' for Users with username =~ /stockservice-.*/:#<Class:0x000055c2471fa900>
     Did you mean?  shells
```

Correct:
its('shells') { should eq ["/sbin/nologin"] }

I think it's an documentation mistake.
-----------------------------------------
$ inspec --version
2.1.43

Signed-off-by: Axel Kummer <axel.kummer@netresearch.de>
2018-04-19 13:06:20 -04:00
Andrii Melekhovskiy
180482d0a7 Fix docs: 404 in URLs for docker resourse (#2974)
Signed-off-by: morkot <melekhovskiy@gmail.com>
2018-04-19 11:02:22 -04:00