Commit graph

3865 commits

Author SHA1 Message Date
Dominik Richter
1c6fa01190 Merge pull request #1758 from aaronlippold/al/postgres-version-fix
funtion to get pgsql version, exposed version, cluster and fixed session
2017-06-06 15:38:27 +02:00
Dominik Richter
12951eecd3 Merge pull request #1893 from chef/jcastillocano/cron_special_cases
Support special cases for crontab resource
2017-06-06 15:25:21 +02:00
Juan Carlos Castillo Cano
1c98ff13f6 Support special cases for crontab resource
Signed-off-by: Juan Carlos Castillo Cano <jccastillocano@gmail.com>
2017-06-06 15:12:12 +02:00
Dominik Richter
ff4e65cab3 Merge pull request #1849 from chef/adamleff/fix-compliance-upload
Fix compliance uploads when version is not present
2017-06-06 14:58:54 +02:00
Adam Leff
dda24b9f98 Fix compliance uploads when version is not present
The Compliance::API.version method could potentially return
a hash containing no "version" key but would return an empty
hash upon any expected failure. Downstream callers of the
Compliance::API.version method were looking for a "version"
key to always be present when, in some cases, it would not be.

This change ensures that if a version is not available, there
is no "version" key in the hash, and downstream callers of this
method have been changed to check for nil instead of empty.

Signed-off-by: Adam Leff <adam@leff.co>
2017-06-06 14:49:25 +02:00
Dominik Richter
5fd558f247 Merge pull request #1850 from username-is-already-taken2/gb/fix_1839
Fix command exists check on Windows with full paths
2017-06-06 14:46:41 +02:00
Dominik Richter
871c6266c9 Merge pull request #1878 from username-is-already-taken2/gb/update_processes
Add windows support to the `processes` resource
2017-06-06 14:42:14 +02:00
Adam Leff
587cdf5bee Merge pull request #1860 from chef/ap/contain_duplicates_deprecation
Commenting the `contain_duplicates` deprecation until we have a good alternative
2017-06-06 08:05:09 -04:00
Adam Leff
5f58450ccd
Remove commented-out deprecation warning
We can add it back in when we have a better solution and we actually
want to deprecate it.

Signed-off-by: Adam Leff <adam@leff.co>
2017-06-06 07:25:04 -04:00
username-is-already-taken2
9d9baeb09f Added windows support to the processes resource
Signed-off-by: username-is-already-taken2 <digitalgaz@hotmail.com>
2017-06-05 23:41:02 +01:00
stubblyhead
ba0a1ea7a7 add bitbucket repo url handling (#1866)
* add bitbucket repo url handling

Signed-off-by: Mike Stevenson <Mike.Stevenson@us.logicalis.com>

* backout changes to .gitignore

* adding unit tests for bitbucket url transformers

Signed-off-by: Mike Stevenson <Mike.Stevenson@us.logicalis.com>

* fixing some indents

Signed-off-by: Mike Stevenson <Mike.Stevenson@us.logicalis.com>

* fix some indents

Signed-off-by: Mike Stevenson <Mike.Stevenson@us.logicalis.com>
2017-06-05 16:02:56 +02:00
Dominik Richter
87b3c1ad40 Merge pull request #1888 from chef/dr/nginx_parser
add the Nginx parser
2017-06-05 15:51:38 +02:00
Aaron Lippold
3c02de9e46 funtion to get pgsql version, exposed version, cluster and fixed session
included requested /var/lib/postgresql/data to cover #1673 as well

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-06-03 18:27:52 -04:00
Dominik Richter
562f6ad732 add the Nginx parser
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-06-03 17:25:00 +02:00
Christoph Hartmann
75728f786c Merge pull request #1887 from chef/dr/fips
support FIPS 140-2 compliant digest calls
2017-06-03 16:28:19 +02:00
Dominik Richter
7d1f16d9bf support FIPS 140-2 compliant digest calls
Calling the `digest` library directly unfortunately causes issues in FIPS 140-2 mode:

    sha512.c(81): OpenSSL internal error, assertion failed: Low level API call to digest SHA512 forbidden in FIPS mode!

Switching to `OpenSSL` as the caller resolve these issues

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-06-03 02:17:24 +02:00
Adam Leff
6d735c3235 Merge pull request #1883 from chef/nls/fix-hab
Use RubyGems version for habitat plan
2017-06-01 18:09:23 -04:00
Nathan L Smith
8ede5556ba Use RubyGems version for habitat plan
In #1820 we made it so inspec would install the checked out source
version rather than the version from RubyGems.

This actually didn't work (though it wasn't apparent in a development
environment) because it used a relative path to bin/inspec that pointed
at /src/bin/inspec, which only exists if you're in a Habitat studio
started from the InSpec repo.

Revert back to getting the gem from RubyGems to avoid this problem and
have a working package.

Signed-off-by: Nathan L Smith <smith@chef.io>
2017-06-01 16:26:26 -05:00
Christoph Hartmann
be2453def6 Merge pull request #1875 from ndobson/fixrefreshtoken
Fix version method call for refresh token
2017-05-31 22:05:20 -05:00
Christoph Hartmann
99474c4b85 Merge pull request #1879 from chef/adamleff/fix-habitat-build-step
Fix release_habitat rake task
2017-05-31 17:06:22 -05:00
Adam Leff
bb66bb2193
Fix release_habitat rake task
A change made to how we generate the Gemfile during the Habitat build process
means we cannot have the PLAN_CONTEXT be the "habitat" directory but instead
need it to be the repo root itself.

Also changed to the preferred `hab pkg build` command instead of the original
`hab studio build` command.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-31 17:50:19 -04:00
Adam Leff
b7cc6c31b7 Merge pull request #1869 from seththoenen/fix-host-windows
Add warningaction to test-netconnection
2017-05-31 15:42:38 -04:00
Adam Leff
5d3abb0289 Merge pull request #1864 from chef/nls/http-option-docs
Add docs for http resource options
2017-05-31 14:56:26 -04:00
Adam Leff
f14ed844a9 Merge pull request #1856 from chef/chris-rock/1828
Fix parameters to `find` commands
2017-05-31 14:35:32 -04:00
Adam Leff
e254f79392 Merge pull request #1858 from chef/chris-rock/spdx
verifies that inspec.yml uses licenses in SPDX format
2017-05-31 14:28:18 -04:00
Nick Dobson
7a4ff97863 Fix version method call
Signed-off-by: Nick Dobson <nick.dobson@me.com>
2017-05-31 10:44:14 -05:00
Dominik Richter
199ad03318 Merge pull request #1874 from chef/adamleff/remove-chefconf-banner
Removing ChefConf banner from website
2017-05-31 08:39:21 -04:00
Adam Leff
efc6623168
Removing ChefConf banner from website
ChefConf 2017 has come and gone... time to remove
the banner.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-31 07:38:23 -04:00
Christoph Hartmann
687f1a5827 update unit tests
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-31 00:21:05 -05:00
Christoph Hartmann
a6ef98c896 verifies that inspec.yml uses licenses in SPDX format
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-31 00:21:05 -05:00
Christoph Hartmann
57097ea2a9 fix #1828
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-31 00:20:42 -05:00
Aaron Lippold
eacae80649 small syntax fix to interface resource.
addresses #1828

Signed-off-by: Aaron Lippold <lippold@gmail.com>
2017-05-31 00:20:42 -05:00
Dominik Richter
3f7b049981 Merge pull request #1871 from chef/1.26.0
1.26.0
2017-05-31 01:06:12 -04:00
Christoph Hartmann
7498a74a82 1.26.0
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-30 23:38:38 -05:00
Dominik Richter
72f4d4be89 Merge pull request #1873 from chef/dr/fix-sudo-test
bugfix: adjust localhost+sudo test output to train update
2017-05-31 00:27:20 -04:00
Christoph Hartmann
91d95c878b update chef version for openssl cookbook
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-05-30 23:09:21 -05:00
Dominik Richter
84fe398e49 bugfix: adjust localhost+sudo test output to train update
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-30 22:40:05 -05:00
Christoph Hartmann
2dd05857cf Merge pull request #1870 from chef/dr/sudo-fx
bugfix: sudo-detection for target execution
2017-05-30 18:24:49 -05:00
Dominik Richter
e0e5aee6a4 bugfix: sudo-detection for target execution
When running `inspec exec` without the `target` option but against remote endpoints OR when executing it with the `localhost://` target AND having `--sudo` active it would abort the execution. `--target` is a helper to set the Train parameters for `backend`, `host`, `user`, `port`, and potentially `password`. The detection would fail on providing any of these separately without specifying `--target`. The same holds true for the `localhost` train backend or just `localhost://` target.

This type of detection has since moved to Train. The driving reason was to have this very useful check for localhost vs sudo run for any type of inspec (or for that matter: train) execution.

This PR depends on https://github.com/chef/train/pull/179 and the next release of train.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-30 18:15:44 -05:00
Christoph Hartmann
1f647e1100 Merge pull request #1865 from chef/dr/unsupported-os-powershell
bugfix: do not send nil to command on unsupported OS
2017-05-30 18:14:44 -05:00
Christoph Hartmann
58ec231868 Merge pull request #1861 from chef/dr/uri-fix
bugfix: non-url servers with compliance login
2017-05-30 18:13:28 -05:00
Seth Thoenen
868f4872fe Add warningaction to test-netconnection
Signed-off-by: Seth Thoenen <seththoenen@gmail.com>
2017-05-30 15:28:04 -05:00
Dominik Richter
ba149a9e1a bugfix: do not send nil to command on unsupported OS
Unsupported operating systems AND the mockloader when using inspec analysis tools may lead to powershell being called with the command being `nil`, because the resource skips during the initialize phase. Instead, propagate an empty string so that `command` has a valid input and then skip the resource.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-30 12:36:32 -04:00
Nathan L Smith
0f96c88d88 Add docs for http resource options
Signed-off-by: Nathan L Smith <smith@chef.io>
2017-05-30 11:33:59 -05:00
Dominik Richter
a0e8be2568 bugfix: non-url servers with compliance login
Non-url URIs may have lead to broader crashes than initially fixed. Overwrite all URL resolvers in the plugin to work with these non-schema URLs.

Fixes #1473

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-05-30 12:04:21 -04:00
username-is-already-taken2
b423e300ef Amended command.rb to resolve issue 1839
Signed-off-by: username-is-already-taken2 <gary.bright@niu-solutions.com>
2017-05-30 14:56:31 +01:00
Alex Pop
3171f46c7d Commenting out the contain_duplicates deprecation until we have a good alternative.
Signed-off-by: Alex Pop <apop@chef.io>
2017-05-30 13:41:44 +01:00
Christoph Hartmann
58baf5f378 Merge pull request #1838 from chef/adamleff/fix-docs-task
Allow docs Rake task to be run from outside www dir
2017-05-29 16:14:25 -04:00
Adam Leff
24e2ffb7e0 Allow docs Rake task to be run from outside www dir
The docs Rake task requires classes defined in the "shared"
Rake tasks file. However, only the www Rakefile includes the
"shared" tasks file.

Since the "docs" Rake task is what needs it, I'm adding a require
there to ensure it works from outside the www directory.

Signed-off-by: Adam Leff <adam@leff.co>
2017-05-29 16:00:19 -04:00
Christoph Hartmann
e87350da88 Merge pull request #1820 from chef/nls/hab-updates
Improvements to Habitat plan
2017-05-29 15:57:43 -04:00