Commit graph

3863 commits

Author SHA1 Message Date
Adam Leff
e2fa0b5e73 port resource: support ss instead of netstat (#2110)
* port resource: support ss instead of netstat

`netstat` is officially deprecated and is replaced with `ss`. This PR
changes the port resource to use `ss` if it's available on the target
system.

Signed-off-by: Adam Leff <adam@leff.co>

* Disable Metrics/ClassLength cop on the LinuxPorts class

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-31 09:53:08 +02:00
Chef Expeditor
0f19e40d3b Bump version to 1.34.7 by Chef Expeditor 2017-08-30 20:04:28 +00:00
Anthony Shaw
d5f33f0b99 pip resource: support non-default pip locations, such as virtualenvs (#2097)
* Update pip resource for #516 allow user to set path to pip executable

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* support virtualenv path, pip file exec and better logic

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* add tests for the change to the pip path and resource

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* tests are case sensitive, although command line is not

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* use a path verification method instead of a class method

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* use guard clauses instead of conditionals

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* change the control flow to return nil when commands are not available

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* fix the return values when custom pip path is not valid

Signed-off-by: Anthony Shaw <anthonyshaw@apache.org>

* Refactor pip path detection to fix unit tests

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-30 22:04:22 +02:00
Chef Expeditor
d93f623934 Bump version to 1.34.6 by Chef Expeditor 2017-08-30 20:02:50 +00:00
Adam Leff
c383175417 Support mixed-case group entries (#2101)
* Support mixed-case group entries

The `group` resource downcased the input parameter unless the target
was a Windows node. However, it's completely legitimate for a Unix-y
node to have mixed case group and passwd entries.

This change does have the potential to break people that did not carefully
match their case when searching for a group, but we're currently blocking
people from using the group resource properly if they have mixed-case
entries.

Signed-off-by: Adam Leff <adam@leff.co>

* Fix unit tests

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-30 22:02:45 +02:00
Chef Expeditor
151199b5fc Bump version to 1.34.5 by Chef Expeditor 2017-08-30 18:22:05 +00:00
Mark Harrison
ef42e2efd0 Use stored http resource response (if any) (#2108)
Currently, if you check two properties of a http resource, such as
status and body, two different http requests are made to the server.
However, the response is already stored in an instance variable, so this
change just checks to see if a response is already available and uses it
rather than making another http request.

Signed-off-by: Mark Harrison <mark@mivok.net>
2017-08-30 20:21:59 +02:00
Chef Expeditor
75b9ee8c39 Bump version to 1.34.4 by Chef Expeditor 2017-08-29 05:11:57 +00:00
Jennifer Burns
3b2bf52b1d auditd_rules resource: fix get_keys error on lines that have no keys (#2103)
* Added line to fix bug when no key in file rule and updated test to validate bug fix

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Updated to consider corner case

Signed-off-by: Jennifer Burns <jburns@mitre.org>
2017-08-29 07:11:14 +02:00
Chef Expeditor
7a41cec73f Bump version to 1.34.3 by Chef Expeditor 2017-08-25 20:21:54 +00:00
Kevin Formsma
94c2e8181c Add sensitive flag to resources to restrict logging output (#2017)
* Filter check output based on sensitive flag
-Updated check in formatters to filter check output during failures based on
sensitive metadata flag
-Added functional test of output filtering
-Updated documentation with blerb on usage
* Update output format for sensitive resources

Signed-off-by: Kevin Formsma <kevin.formsma@gmail.com>

* Update color output on new test

Update the color output to match the newly-expected non-color format if there are no tests that match.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-25 16:21:49 -04:00
Chef Expeditor
3c07341ea0 Bump version to 1.34.2 by Chef Expeditor 2017-08-25 20:13:48 +00:00
Jennifer Burns
2cef15aec3 aide_conf resource: test configuration of the AIDE file integrity tool (#2063)
* Added aide_conf resource and subsequent files

* Updated to match on all selection lines

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Changed to use CommentParser and fixed typo

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Fix typo in test file

Signed-off-by: Jennifer Burns <jburns@mitre.org>

* Updated to address PR feedback

Signed-off-by: Jennifer Burns <jburns@mitre.org>
2017-08-25 22:13:43 +02:00
Chef Expeditor
f89ddcc832 Update CHANGELOG.md to reflect the promotion of 1.34.1 to stable 2017-08-24 18:58:14 +00:00
Adam Leff
c328336b01 Remove unnecessary entries from changelog (#2099)
Signed-off-by: Adam Leff <adam@leff.co>
2017-08-24 14:57:26 -04:00
Chef Expeditor
5440bb782e Bump version to 1.34.1 by Chef Expeditor 2017-08-23 14:32:42 +00:00
Adam Leff
4a89bf437e Bump minor version (#2096)
PR #2094 warrants a minor version bump

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-23 10:32:37 -04:00
Chef Expeditor
f0711066e7 Bump version to 1.33.15 by Chef Expeditor 2017-08-23 14:30:19 +00:00
Adam Leff
6029a4b43d Refine the profile/test summary output of the CLI formatter (#2094)
* Refine the profile/test summary output of the CLI formatter

* The "Profile Summary" is misleading as it's not a summary of profile
  success/failure but rather the controls within the profile(s). Altered
  the output to be clear. I still like calling it the "profile summary"
  but wanted to add clarity that the numbers are about the controls.

* Made the colorized output dynamic. The success/failure will only be
  green/red if there are controls/tests that fall into that category.
  That way we are not printing red failure text when there are no
  actual failures. Fixes #1752.

* Cleaned up some grammar issues. ("1 failure" vs "1 failures")

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-23 10:29:09 -04:00
Chef Expeditor
e9fecc027d Bump version to 1.33.14 by Chef Expeditor 2017-08-21 21:40:40 +00:00
Adam Leff
a8bc555214 Add slack notifications for Travis CI builds to master (#2092)
Signed-off-by: Adam Leff <adam@leff.co>
2017-08-21 23:40:36 +02:00
Chef Expeditor
d8da929ffe Bump version to 1.33.13 by Chef Expeditor 2017-08-21 13:36:27 +00:00
Nicolas
89d002e1ab Update CHANGELOG (add fix author) (#2091) 2017-08-21 09:36:22 -04:00
Adam Leff
37e68d437d Add expeditor configuration for rubygems (#2090)
This config section was missed and is required in order to properly
push gems during an artifact action.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-18 13:21:32 -04:00
Chef Expeditor
ebf946256d Update CHANGELOG.md to reflect the promotion of 1.33.12 to stable 2017-08-18 16:23:55 +00:00
Chef Expeditor
6e806110e0 Bump version to 1.33.12 by Chef Expeditor 2017-08-18 15:35:36 +00:00
Adam Leff
2cffa750ec Move bug fixes in CHANGELOG to correct header (#2089)
Due to a case-sensitivity issue on our bug GitHub label, bug fixes were not
going into the right changelog category.  Manually fixing.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-18 11:35:31 -04:00
Chef Expeditor
4c2d85674b Bump version to 1.33.11 by Chef Expeditor 2017-08-18 15:29:28 +00:00
Adam Leff
367d42fb3a Properly handle held packages on dpkg-flavored OS (#2087)
* check the proper field for dpkg installation state fixes #2006

Signed-off-by: Mathieu Sauve-Frankel <msf@kisoku.net>

* Properly handle held packages on dpkg-flavored OS

InSpec was looking at the wrong field in `dpkg -s` output to determine
whether a package was installed or not. An installed, held package was
incorrectly reported as uninstalled.

This adds the proper unit tests and also adds a `be_held` matcher.

Thanks to @kisoku for the initial work in #2007.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-18 17:29:23 +02:00
Kimberly Garmoe
88ee548551 Fixes typo. (#2047)
Signed-off-by: kgarmoe <kgarmoe@chef.io>
2017-08-17 15:13:44 -04:00
Seth Chisamore
3650515a0e Add a CODEOWNERS file (#2086)
Signed-off-by: Seth Chisamore <schisamo@chef.io>
2017-08-17 13:57:54 -04:00
Adam Leff
b09d572624 Publish rubygem via expeditor (#2084)
* Publish rubygem via expeditor

When InSpec is promoted to the `stable` channel, Expeditor will take care of the gem publishing!

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-17 10:53:39 -04:00
Chef Expeditor
443f1bf106 Bump version to 1.33.10 by Chef Expeditor 2017-08-17 14:48:51 +00:00
Stephan Renatus
bd165471e8 [docker_container] fix repo property (#2083)
With last weeks tag fix, `ourorg/container` ended up having its `repo` reported as `container`.
With this it'll be `ourorg/container` again.

Signed-off-by: Stephan Renatus <srenatus@chef.io>
2017-08-17 16:48:46 +02:00
Adam Leff
c92a7d5e58 Revamp profile inheritance/dependency documentation (#2081)
Reuse blog post content on profile inheritance for web site
based on feedback from colleagues and community members.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-17 16:11:11 +02:00
Chef Expeditor
4ce6e91544 Bump version to 1.33.9 by Chef Expeditor 2017-08-17 14:08:59 +00:00
Adam Leff
185786b49a Remove www Gemfile.lock (#2082)
No reason to keep the Gemfile.lock in the www directory under source
control. It adds extra steps to the www release process after an InSpec
release because the release process will fail of the git working tree
is not clean (and since the www Rake tasks rely on InSpec stuff, the
Gemfile.lock will be perpetually out of date).

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-17 16:08:55 +02:00
Adam Leff
a60071b920 Add changelog categories to expeditor configuration (#2079)
This will allow for four different changelog categories (in addition to the default)
that will be used based on PR label.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-15 17:32:14 -04:00
Chef Expeditor
b28cc5ab35 Bump version to 1.33.8 by Chef Expeditor 2017-08-15 19:39:12 +00:00
Christoph Hartmann
4a3511b6ce fix case where skip is called for os_env (#2078)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-08-15 21:32:21 +02:00
Chef Expeditor
48e20dbd1a Bump version to 1.33.7 by Chef Expeditor 2017-08-15 18:43:03 +00:00
Christoph Hartmann
47eabbb221 add functional tests for inspec check (#2077)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-08-15 20:41:24 +02:00
Adam Leff
61514c38a7 Remove github fetcher from docs (#2075)
The github fetcher does not exist. The git fetcher or URL fetcher is what users should use.

Signed-off-by: Adam Leff <adam@leff.co>
2017-08-15 13:47:28 -04:00
Chef Expeditor
45e7a85ebb Bump version to 1.33.6 by Chef Expeditor 2017-08-15 17:46:20 +00:00
Christoph Hartmann
1a904ea7a5 Moves logic from os_env from initialize phase to runtime phase (#2072)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-08-15 13:46:13 -04:00
Kimberly Garmoe
baa0951b06 Kg/resource names (#2060)
* Changes resources/filename to match resource name

Signed-off-by: kgarmoe <kgarmoe@chef.io>

* Deletes original resource files.

Signed-off-by: kgarmoe <kgarmoe@chef.io>
2017-08-15 13:41:04 -04:00
Chef Expeditor
e6f89664bb Bump version to 1.33.5 by Chef Expeditor 2017-08-15 03:37:23 +00:00
Christoph Hartmann
b1aba69661 add mock support for os_env resource (#2070)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-08-15 05:37:19 +02:00
Chef Expeditor
d60d95cec3 Bump version to 1.33.4 by Chef Expeditor 2017-08-14 18:57:56 +00:00
Christoph Hartmann
427f3e9ac7 Set the default cli tool for oracle db to sqlplus, during execution we will catch this missing cli but it prevents inspec check from failing if sqlplus is not available (#2057)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-08-14 14:57:51 -04:00