inspec/lib/bundles/inspec-supermarket
Clinton Wolfe 811318f2f8 Plugins API v2: Loader, Base API, and Test Harness (#3278)
* Functional tests for userdir option
* Accepts --config-dir CLI option
* Actually loads a config file from the config dir, more cases to test
* Able to load config and verify contents from config-dir
* Functional tests to ensure precedence for config options
* Enable setting config dir via env var
* .inspec, not .inspec.d
* Begin converting PluginCtl to PluginLoader/Registry
* Able to load and partially validate the plugins.json file
* More work on the plugin loader
* Break the world, move next gen stuff to plugin/
* Be sure to require base cli in bundled plugins
* Move test file
* Revert changes to v1 plugin, so we can have a separate one
* Checkpoint commit
* Move v2 plugin work to v2 area
* Move plugins v1 code into an isolated directory
* rubocop fixes
* Rip out the stuff about a user-dir config file, just use a plugin file
* Two psuedocode test file
* Working base API, moock plugin type, and loader.
* Adjust load path to be more welcoming
* Silence circular depencency warning, which was breaking a unit test
* Linting
* Fix plugin type registry, add tests to cover
* Feedback from Jerry

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2018-08-16 18:16:32 -04:00
..
api.rb cli: Downcase supermarket tool name to match URL (#3242) 2018-07-25 15:59:19 -04:00
cli.rb Plugins API v2: Loader, Base API, and Test Harness (#3278) 2018-08-16 18:16:32 -04:00
README.md Fix typo in some docs (#2841) 2018-03-20 08:43:30 -04:00
target.rb Allow supermarket:// and compliance:// in inspec.yml 2016-09-09 14:14:37 +01:00

InSpec Extension for Chef Supermarket

To use the CLI, this InSpec add-on adds the following commands:

  • $ inspec supermarket configure - configures the supermarket server
  • $ inspec supermarket search - searches for a compliance profile on supermarket
  • $ inspec supermarket exec nathenharvey/tmp-compliance-profile - extends execute to load the profile

Compliance profiles from Supermarket can be executed in two ways:

  • via supermarket exec: inspec supermarket exec nathenharvey/tmp-compliance-profile
  • via supermarket scheme: inspec exec supermarket://nathenharvey/tmp-compliance-profile

Usage

$ inspec supermarket
Commands:
  inspec supermarket exec PROFILE    # execute a Supermarket profile
  inspec supermarket help [COMMAND]  # Describe subcommands or one specific subcommand
  inspec supermarket info PROFILE    # display Supermarket profile details
  inspec supermarket profiles        # list all available profiles in Chef Supermarket

$ inspec supermarket profiles
Available profiles:
-------------------
 * nathenharvey/tmp-compliance-profile
 * hardening/os-hardening
 * hardening/ssh-hardening

$ inspec supermarket info hardening/os-hardening
name:   os-hardening
owner:  hardening
url:    https://github.com/dev-sec/tests-os-hardening

description:   Base Linux Compliance profile, used for Security + DevOps. More Information is available at http://dev-sec.io/

$ inspec exec supermarket://hardening/os-hardening
........F.F.................F......FFF.....FFFF.F........FF....FFFFFFF...FF.FFFFFF.FFFFFFFFFFF.F...

...

Finished in 3.81 seconds (files took 5.69 seconds to load)
99 examples, 40 failures