We run apt_update once with chef and we already update the cache directly on the container at start. We don't need to try to do the same thing 3 other times.
Signed-off-by: Tim Smith <tsmith@chef.io>
* Plugin example, CLI resource lister
* Move example plugin into a directory to look like a regular project
* Skeleton of testing for example plugin
* Example plugin unit tests work
* Functional tests added, using core helper
* Add a global method to determine InSpec install root
* Add linter support to the example
* Adjust inspec project rubocop to run linter on example plugins
* Linter autocorrections
* Update readme
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
* Add support for multiple descriptions for controls
This adds the ability to specify multiple descriptions in controls.
Example:
```ruby
control 'my-control' do
impact 1.0
title 'My control'
desc 'A default description'
desc 'rational', 'I need an example'
describe file('/tmp') do
it { should be_directory }
end
end
```
Many thanks to @jquick for helping me with the unit tests.
* Remove unused `descriptions` method
* Remove unused profile from test mocks
* Respond to feedback
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add impact class which contains all cvss scores.
* Add testing for impact changes.
* Change symbols to strings for impact.
* Update error messages to be more clear.
* Fix test with new sha
Signed-off-by: Jared Quick <jquick@chef.io>
* Add windows functional tests.
* Fix tests for 2012 server.
* Fix windows build script
* Add more functional tests for windows.
* Update comment with TODO.
Signed-off-by: Jared Quick <jquick@chef.io>
* Change `skip_resource` to use raise
* Add `supports` lines to example resource
* Change to rescue `StandardError` vs `Exception`
* Change raise to use `e.message` vs `$!`
* Remove redundant returns
* Change `File.exists?` to `File.exist?`
* Update shasum in tests
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add example AWS profile
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
* Add example Azure profile
Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
The pinned version of Rubocop in some of the TK examples' Gemfiles
was a very old version with known vulnerabilities. Since these are just
examples and have no Rake tasks that rely on them, I removed rubocop
outright from the example Gemfiles.
Signed-off-by: Adam Leff <adam@leff.co>
* 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>
* Remove any "All Rights Reserved" references
InSpec is licensed and released under the Apache 2.0 license. This
change removes all reference to legacy code files that still had
any Copyright or License lines referring to "All Rights Reserved".
Signed-off-by: Adam Leff <adam@leff.co>
* fix functional tests
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This won't work until the git fetcher is merged. It likely also
exhibits other problems related to platform support handling.
Signed-off-by: Steven Danna <steve@chef.io>
This commit is the foundation of the dependency resolution as described in https://github.com/chef/inspec/issues/888 .
It currently only works with local dependencies, as seen in the example inheritance profile.
Tests and full resolution are coming next on the path to an MVP implementation.