Commit graph

5082 commits

Author SHA1 Message Date
Clinton Wolfe
fa0a6c9794 Ability to render contrib resource pack docs on main website (#3184)
* Sketch out contrib doc fetcher
* Read contrib config file
* Fetch contrib resource packs from git
* Copy in resource pack docs from contrib
* Task to cleanup copied-in files
* Attach contrib resource pack docs fetching to main website doc generation
* Refactor - rename vars in resource overview task for clarity
* Generate resource overview page using info from contrib
* Fix issue in which AWS and Azure resources were ending up under OS
* Trigger contrib doc cleanup after doc build
* Comment out the contrib.yaml for now
* Disable contrib tasks if git is not available
* Rubocop issues
* Allow .md as doc file ending
* Fix for files ending in md having a relative link
* Omit 'resources' from section labels to save width
* Rubocoooooooooooppppp

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-02 11:43:46 -04:00
Chef Expeditor
7de898a4f9 Update CHANGELOG.md to reflect the promotion of 2.2.50 2018-07-26 20:42:38 +00:00
Chef Expeditor
fa45c7d12c Bump version to 2.2.50 by Chef Expeditor 2018-07-26 18:13:45 +00:00
Bill (William) O'Neill
b349e7ae1d Since /proc/xen is an empty dir in Amazon Linux, inspec falsely detects docker instances as platform='xen' (#3243)
* Since /proc/xen is an empty dir in Amazon Linux, inspec falsely detects docker instances as platform='xen'
* Remove unnecessary rubocop comment

Signed-off-by: Bill ONeill <woneill@pobox.com>
2018-07-26 14:13:33 -04:00
Qasim Sarfraz
b3536fa6a0 Add openssh-client pkg to Dockerfile (#3254)
Signed-off-by: Qasim Sarfraz <Qasim.Sarfraz@esailors.de>
2018-07-26 14:13:11 -04:00
Chef Expeditor
cc2acc1524 Bump version to 2.2.49 by Chef Expeditor 2018-07-26 17:49:34 +00:00
devoptimist
05da909ba1 Fix for profile version not being included in the compliance upload cli exist check (#3252)
Signed-off-by: devoptimist <sbrown@chef.io>
2018-07-26 13:49:23 -04:00
Jerry Aldrich
b8c4e0928e Correct whom usage in README.md (#3256)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-26 13:43:35 -04:00
Chef Expeditor
aadc7fe97a Bump version to 2.2.48 by Chef Expeditor 2018-07-25 20:14:26 +00:00
Chef Expeditor
4c8d2a168e Bump version to 2.2.47 by Chef Expeditor 2018-07-25 20:10:54 +00:00
Jerry Aldrich
3a4d9fca1b Satisfy RuboCop by adding x bit to bin/inspec (#3249)
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-25 16:08:00 -04:00
Chef Expeditor
2cdf3c61d4 Bump version to 2.2.46 by Chef Expeditor 2018-07-25 20:05:30 +00:00
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
Christian Nunciato
331d4545ce Add link to cookie policy (#3240)
This change adds a link to the Chef cookie policy, and updates a Chef URL to use https.

Signed-off-by: Christian Nunciato <chris@nunciato.org>
2018-07-25 15:56:01 -04:00
Chef Expeditor
3c0abf7774 Bump version to 2.2.43 by Chef Expeditor 2018-07-25 17:08:23 +00:00
Jared Quick
faf3d1588e
Fix the unit tests by pining to a older openssl cookbook. (#3251)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-25 13:08:12 -04:00
Chef Expeditor
b8928aca74 Bump version to 2.2.42 by Chef Expeditor 2018-07-23 08:45:31 +00:00
Masayoshi Takahashi
5dffe9273e update README.md to fix travis and appveyor's badges. (#3244)
Obvious fix.
2018-07-23 10:45:22 +02:00
Jared Quick
b8b9a379a3
Update hab plan for hab 0.56+ (#3241)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-20 12:59:15 -04:00
Chef Expeditor
fa385c0b33 Update CHANGELOG.md to reflect the promotion of 2.2.41 2018-07-20 00:34:39 +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
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
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
Kimberly Garmoe
eb87fd384d Markdown and code fence fixes (#3230)
Signed-off-by: kgarmoe <kgarmoe@chef.io>
2018-07-19 14:31:38 -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
Jared Quick
c01ec12947
Update hab to use psql client. (#3234)
Signed-off-by: Jared Quick <jquick@chef.io>
2018-07-18 16:55:19 -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
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
Jerry Aldrich
82f2340fb0 Add a CODE_OF_CONDUCT.md (#3212)
* Add a CODE_OF_CONDUCT.md
* Add links to the CODE_OF_CONDUCT.md
Also, remove some newlines/line endings.
* Replace broken waffle.io link
* Add Christoph/Dominik to Deciders role
* Add Jared Quick to Advocates
Adding his keybase since he doesn't have Twitter.

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-07-17 10:11:58 -04:00
David Schmitt
8f096ec667 Fix shell quoting in docker example (#3225)
This changes the use of `$@` to have double quotes, which avoids double
shell expansion of arguments to the function.

Example:
```
$ function tx { ls $@; }
$ tx a b
ls: cannot access 'a': No such file or directory
ls: cannot access 'b': No such file or directory
$ tx 'a b'
ls: cannot access 'a': No such file or directory
ls: cannot access 'b': No such file or directory
$ function tx { ls "$@"; }
$ tx a b
ls: cannot access 'a': No such file or directory
ls: cannot access 'b': No such file or directory
$ tx 'a b'
ls: cannot access 'a b': No such file or directory
$
```

Observe how in the corrected version the `'a b'` test case (a single
argument with a space inside) is handled correctly, while with the
original version the space is exposed to the shell, and the string
is broken up.

Signed-off-by: David Schmitt <david.schmitt@puppet.com>
2018-07-17 10:10:40 -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
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
Chef Expeditor
186a8cefac Update CHANGELOG.md to reflect the promotion of 2.2.35 2018-07-12 20:50:17 +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
5cb3caf4dc Update CHANGELOG.md to reflect the promotion of 2.2.34 2018-07-05 21:27:22 +00: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
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