Commit graph

3384 commits

Author SHA1 Message Date
Richard Nixon
f66f0b3a18 Initial support for x509_certificate and rsa_key
* Includes unit tests
* Includes 2 new resources
* Includes documentation

Signed-off-by: Richard Nixon <richard.nixon@btinternet.com>
2017-03-22 10:00:48 +01:00
Christoph Hartmann
2d9d7aa106 Merge pull request #1564 from chef/dr/schema
implement JSON schema for `inspec exec` json outputs
2017-03-22 09:52:47 +01:00
Dominik Richter
738bae0db8 add inspec json schema validation to functional tests
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2017-03-22 09:42:36 +01:00
Dominik Richter
c620cbf69e add inspec min json generator 2017-03-22 09:42:36 +01:00
Dominik Richter
55daa24cbc add json schema and generator 2017-03-22 09:42:36 +01:00
Christoph Hartmann
57c6b39612 Merge pull request #1587 from chef/adamleff/fix-nokogiri-for-habitat
Fix Habitat plan for nokogiri support
2017-03-22 09:40:59 +01:00
Adam Leff
4dae0bead8 Fix Habitat plan for nokogiri support
Nokogiri is failing to build in the habitat artifact due to the lack
of libxml2 and libxslt. This brings them in as dependencies and also
properly configures bundler to use them.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-21 17:51:59 -04:00
Adam Leff
12bd580199 Merge pull request #1585 from chef/adamleff/move-simulator-to-www-gemfile
Move simulator gems to www
2017-03-21 16:50:18 -04:00
Adam Leff
199cb160ea Move simulator gems to www
The simulator gems are not necessary for building InSpec, only the website.
This is currently causing issues in the Jenkins infrastructure due to
a downstream dependency of github-markup.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-21 16:11:56 -04:00
Adam Leff
ddc0036f40 Merge pull request #1583 from chef/adamleff/1.17.0
release 1.17.0
2017-03-21 15:11:34 -04:00
Adam Leff
66095722c8 release 1.17.0
Signed-off-by: Adam Leff <adam@leff.co>
2017-03-21 15:00:26 -04:00
Christoph Hartmann
b0702dd587 Merge pull request #1579 from chef/adamleff/fix-s3-cache
Fix omnibus configuration
2017-03-20 23:19:26 +01:00
Adam Leff
a49467e779 Fix omnibus configuration
The latest omnibus master expects certain settings to be enabled for
S3 caching to work, and our omnibus.rb wasn't set up properly. Also
aligning some of our settings to chef/chef's settings which we know
to work properly.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-20 17:50:16 -04:00
Christoph Hartmann
c11e4d2944 Merge pull request #1576 from jkerry/fixing_nokogiri
moving the nokogiri reference into the gemspec file
2017-03-20 13:39:32 +01:00
John Kerry
d4a0ae4549 removing an unnecessary require of the rspec junit formatter
Signed-off-by: John Kerry <john@kerryhouse.net>
2017-03-19 22:07:19 -04:00
John Kerry
dd9ec61199 moving the nokogiri reference into the gemspec file
Signed-off-by: John Kerry <john@kerryhouse.net>
2017-03-19 21:56:14 -04:00
Adam Leff
bf36c0a7a7 Merge pull request #1555 from nvtkaszpir/patch-1
Update file.md with example how to test symlinked files
2017-03-15 09:00:32 -05:00
Christoph Hartmann
56986d1bdb Merge pull request #1561 from chef/adamleff/fix-object-traverser-for-arrays
Fix ObjectTraverser when accessing array values
2017-03-15 11:41:27 +01:00
Adam Leff
4f2b66302d Fix ObjectTraverser when accessing array values
When attempting to access array values via the `json` resource:

```
describe json('/tmp/test.json') do
      its(['array',0]) { should eq "zero" }
end
```

... the resulting data would be an array of the size of the original array
with all the values replaced with nils:

```
     expected: "zero"
          got: [nil, nil, nil]
```

This was due to a bug in the ObjectTraverser mixin that mapped array values
back through `extract_value` rather than properly handling the passed-in
key(s). This worked fine for the specific data format created by the `csv`
resource but did not work `json` or any other resource that subclassed the
`JsonConfig` resource.

This change fixes the logic when dealing with an array when it's encountered,
and fixes up the `csv` resource with its own `value` method.

This change also adds tests for ObjectTraverser.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-15 11:35:55 +01:00
Michał Sochoń
7a935a204e Update file.md with example how to test symlinked files.
Added detailed example why and how.
Updated with suggestions from Adam Leff.

Signed-off-by: Michał Sochoń <kaszpir@gmail.com>
2017-03-15 07:53:14 +01:00
Adam Leff
3d551f977f Merge pull request #1559 from chef/adamleff/add-crontab-example
Add additional example for matching crontab commands
2017-03-14 23:39:07 -05:00
Adam Leff
8155357d0a Add additional example for matching crontab commands
As raised in #1526, adding an additional example showing how
a user can use the `where` accessor to find commands matching
a pattern and write a test using the results.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-14 22:16:39 +01:00
Adam Leff
ab9e258112 Merge pull request #1563 from chef/HM-HideCancelledEvent
Hide Event Feature on Homepage
2017-03-14 15:24:19 -05:00
hannah-radish
1f49a9c21e Hide Event Feature on Homepage
Darn that snowstorm. Event is cancelled!

Signed-off-by: hannah-radish <hmaddy@chef.io>
2017-03-14 13:22:24 -07:00
Adam Leff
546486ff6a Merge pull request #1550 from chef/chris-rock/upstart-fallback
try to use sysv fallback if is not producing proper output
2017-03-09 17:25:29 -05:00
Adam Leff
1c87db9e7a Merge pull request #1552 from chef/adamleff/better-inspec-yml-errors
Provide better error message when inspec.yml is invalid
2017-03-09 12:34:18 -05:00
Adam Leff
dfce561276 Provide better error message when inspec.yml is invalid
Currently, if the inspec.yml for a profile is invalid (such as including
an improperly-defined multi-line string), InSpec will throw an exception
from the YAML parser that does not given a clear indication that the
issue was encountered while parsing the inspec.yml file.

This change introduces a better exception message to clue the user into
where the problem actually lies.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-09 18:03:01 +01:00
Adam Leff
7667c9cb0a Merge pull request #1525 from spiffytech/patch-1
windows_task docs: Correct syntax error and misspelled word
2017-03-08 15:03:15 -07:00
Adam Leff
8d21366e41 Merge pull request #1536 from tescalada/patch-1
Fixing a typo
2017-03-08 15:02:28 -07:00
Christoph Hartmann
8b1619b60e try to use sysv fallback if is not producing proper output
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-03-08 21:52:52 +01:00
Adam Leff
71ee19ad3b Merge pull request #1548 from chef/chris-rock/installation
update readme for install scripts
2017-03-07 11:32:41 -07:00
Christoph Hartmann
7437a2b00f update readme for install scripts
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
2017-03-07 19:25:25 +01:00
Christoph Hartmann
6f2ec9b821 Merge pull request #1547 from chef/adamleff/fix-ipv4-address-as-tcp6-entries
Fixing port check with v4 IPs in a v6 netstat line
2017-03-07 10:08:43 +01:00
Adam Leff
037f08beb2 Fixing port check with v4 IPs in a v6 netstat line
On Linux, netstat may show a tcp6/udp6 protocol line but include a
v4 address. This happens with AF_INET6 sockets that can accept
both v4 and v6 traffic. The port check was not properly handling
this situation and trying to pass a v4 address to URI bracketed as
if it was a v6 address.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-06 22:03:41 -07:00
Christoph Hartmann
ff91244186 Merge pull request #1540 from chef/1.16.1
releasing 1.16.1 with a bug fix and omnibus fix
2017-03-06 19:58:12 +01:00
Adam Leff
45f242e122 releasing 1.16.1 with a bug fix and omnibus fix
Signed-off-by: Adam Leff <adam@leff.co>
2017-03-06 11:58:00 -07:00
Christoph Hartmann
ef775e61c4 Merge pull request #1539 from chef/adamleff/omnibus-build-fix
Fix omnibus build after new JUnit formatter
2017-03-06 19:32:43 +01:00
Adam Leff
9581fda2d8 Fix omnibus build after new JUnit formatter
The new JUnit formatter requires nokogiri, so we need
to build nokogiri via omnibus to ensure liblzma, etc.
is built as part of the omnibus package instead of
`gem` picking up a system liblzma, such as on Mac OS X.

Also bumping ruby to 2.3.1 to match ChefDK.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-06 11:25:20 -07:00
Makoto Nozaki
f913b56ffc Avoid connection timeout of "inspec version" (#1538)
* Add open_timeout to NET::HTTP.start call
Signed-off-by: Makoto Nozaki <makoto.nozaki@twosigma.com>

* Code cleanup based on the discussion at #1538
Signed-off-by: Makoto Nozaki <makoto.nozaki@twosigma.com>
2017-03-06 09:23:42 -07:00
Adam Leff
66dce387ee Merge pull request #1512 from chef/HM-BugFixesWeb-022317
Ready for review - inspec.io bug fixes, #1440, #1420, #1465, #1421, #1437,#1226, #1494, #1495
2017-03-05 18:27:02 -05:00
hannah-radish
74a2a37a5a Updated Tutorial URL in Docs
Signed-off-by: Hannah Maddy <hmaddy@chef.io>
2017-03-03 17:51:20 -08:00
hannah-radish
23434f3606 Bug fixes for Inspec.io
- Added banner for webinars (present and future)
- CSS support for IE10, IE11, Edge
- Fixed URL bug for demo
- Fixed Edge browser resize bug
- Changes to relative path, update event info

Signed-off-by: Hannah Maddy <hmaddy@chef.io>
2017-03-03 12:25:33 -08:00
Tristan Escalada
27d94c5037 Fixing a typo
changing paht to be path.
2017-03-03 14:03:54 -05:00
Adam Leff
408a5c956a Merge pull request #1531 from chef/adamleff/gitignore
Updating .gitignore for Habitat and direnv
2017-03-03 11:09:11 -05:00
Adam Leff
bf2998faf6 Merge pull request #1533 from chef/adamleff/write-output-to-habitat-var
Write Habitat-driven InSpec output to svc_var directory
2017-03-03 11:08:50 -05:00
Adam Leff
9550137605 Write Habitat-driven InSpec output to svc_var directory
When running a InSpec profile built with Habitat, we now
write the formatter/reporter data to a JSON file in the
pkg.svc_var_path rather than STDOUT. This will allow for
programmatic collection of this data and future enhancements
to allow this data to be passed around a Habitat ring.

This also corrects an issue creating a Habitat profile if the
profile had never been in the local InSpec cache. By setting a
mock Backend when creating the profile object, similarly to what
the archivers do, this issue is avoided.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-02 17:45:16 -05:00
Adam Leff
a98af30b45 Updating .gitignore for Habitat and direnv
For direnv users, excluding the .direnv and .envrc entries will
help avoid any unnecessary local environment settings from getting
committed.

Excluding the results directory will avoid any Habitat artifacts
from getting unnecessarily committed.

Signed-off-by: Adam Leff <adam@leff.co>
2017-03-02 16:45:37 -05:00
Adam Leff
7154b6b95f Merge pull request #1530 from chef/1.16.0
1.16.0
2017-03-02 15:39:34 -05:00
Adam Leff
14d6678c82 1.16.0
Signed-off-by: Adam Leff <adam@leff.co>
2017-03-02 15:17:55 -05:00
Adam Leff
6bd66df014 Merge pull request #1511 from carldjohnston/oracle-linux-service-resource
Added oracle linux to rhel platform section of 'service' resource.
2017-03-02 07:00:56 -05:00