Commit graph

78 commits

Author SHA1 Message Date
Dominik Richter
f6bd7ed3b8 unify exec options 2016-03-06 15:07:12 +01:00
Dominik Richter
e4c3c9370b fix detection with new profile/runner scheme 2016-02-22 11:24:36 +01:00
Dominik Richter
1e1e473cb0 replace target-helper with fetcher+reader 2016-02-22 11:24:35 +01:00
Stephan Renatus
caa0c8ce81 respect logging configuration for inspec shell
Makes it a lot easier to figure out why something fails if it fails...
2016-02-12 10:16:10 +01:00
Stephan Renatus
4c61ed3878 respect json config in inspec archive
Although I am not aware of this causing trouble anywhere right now, it
seems better to do it homogeneous.
2016-02-12 10:15:05 +01:00
Dominik Richter
e56321f6c7 semantics: rename CLI plugins registry -> subcommands
Basically make sure everyone understands these are only subcommands. we might consider adding plugins for options or existing commands instead of new subcommands. this just ensures everyone knows what registry is for
2016-02-09 01:20:38 +01:00
Dominik Richter
7ccf0fa364 avoid automatic plugin loading throughout the library
only load plugins through the binary, never through the library. This avoids issue we have in accidentally loading plugins in tests and integration work. They should only be loaded when users request them.
2016-02-09 00:55:02 +01:00
Christoph Hartmann
a55a4869d9 extract base cli class 2016-02-05 14:20:32 +01:00
Christoph Hartmann
30aabc4f42 remove def newline :-) 2016-02-05 14:18:05 +01:00
Christoph Hartmann
7494854c60 implement profile upload 2016-02-05 14:18:05 +01:00
Christoph Hartmann
841701d9e1 deactivate logger for check 2016-02-05 14:18:05 +01:00
Christoph Hartmann
368f6ed56a refactor compliance plugin 2016-02-05 14:18:05 +01:00
Christoph Hartmann
7f57b12258 refactor cli 2016-02-05 14:15:57 +01:00
Christoph Hartmann
823e30e9cf re-introduce compliance exec 2016-02-05 14:14:34 +01:00
Christoph Hartmann
6cf8ecf304 add target helper for compliance plugin, extract API methods from CLI 2016-02-05 14:14:34 +01:00
Christoph Hartmann
0b59dab9ea initial version of compliance plugin 2016-02-05 14:13:22 +01:00
Christoph Hartmann
bab7eb1986 improve styling 2016-02-05 14:06:55 +01:00
Christoph Hartmann
589db0bcd0 add registry for cli plugins 2016-02-05 14:06:55 +01:00
Christoph Hartmann
3850075609 fix rubocop 2016-02-04 17:46:28 +01:00
Christoph Hartmann
14a3100e41 simplify result value from profile check 2016-02-04 16:47:33 +01:00
Christoph Hartmann
1796c3271b generate hash output for check and use it in inspec cli 2016-02-04 16:41:14 +01:00
Christoph Hartmann
826d059b19 optimize json logger for line delimited JSON 2016-02-04 16:38:57 +01:00
Christoph Hartmann
907a4e1f33 add json stream logger for inspec check 2016-02-04 16:38:57 +01:00
Christoph Hartmann
aeefb31ca7 enable to configure the logger via cli 2016-02-01 14:47:34 +01:00
Stephan Renatus
e1d5b2be92 basic logging setup for inspec exec
This change tries hard to stay backward compatible: if you ask for JSON
output, you will NOT get any logging.

Fixes #349.
2016-01-27 17:26:42 +01:00
Stephan Renatus
ee62499fc0 bugfix: ignore supports when generating a profile's json representation
without this, `inspec json PATH` does never contain rules != {}, because
of the usage of the mock backend
2016-01-11 09:16:06 +01:00
Christoph Hartmann
a1ddbe4cf2 explicitly ignore supports for inspec check 2016-01-10 23:59:57 -05:00
Christoph Hartmann
27150e5341 feature: generate profile archive 2015-12-28 12:53:42 +01:00
Blake Hitchcock
10fb57f6a5 Set exit status to return value of Inspec Runner
When invoking inspec using ```inspec exec PATH```, the script always
exits with a 0 status code. This pull request proposes to exit with the
same status code as the Inspec Runner. This behavior is consistent with
how testing platforms of this type typically work.
2015-12-22 09:44:09 -05:00
Stephan Renatus
ac6d5b817c remove commandline defaults, they break json config 2015-12-18 15:57:07 +01:00
Stephan Renatus
aa80a65ffd remove format default for inspec exec
behaviour is unchanged. (this caused trouble in chef-compliance)
2015-12-17 17:56:07 +01:00
Dominik Richter
ef487e3753 handle json parser errors 2015-12-07 16:11:53 +01:00
Stephan Renatus
ae4420a736 add --json-config= and --diagnose flags to inspect configurations
Because of the way per-command arguments are handled, this is a little
different from the way e.g. kitchen handles it: any inspec command can
take the flag `--diagnose` to have it dump configuration first.

This add support for a JSON configuration file, where both

  inspec detect --json-config=config.json

and

  inspec detect --json-config=- <config.json

allow for reading the JSON config. There is no validation of its keys
in place.
2015-12-07 16:10:15 +01:00
Stephan Renatus
33f2fe3dde hide summary output when running interactively (inspec shell) 2015-12-07 11:12:41 +01:00
Christoph Hartmann
cca75c5e8c align cli documentation with cli 2015-12-01 11:19:04 +01:00
alexmanly
c114d2bcd2 Add -p alias for --port like ssh 2015-11-25 14:55:06 +01:00
Jason Reed
79eba9b4fa Add -i alias for --key_files like ssh 2015-11-25 07:10:11 -05:00
Christoph Hartmann
d8b4b1d7b4 update cli description of --path 2015-11-02 02:06:14 +01:00
Dominik Richter
2b7f4040e7 api: change --disable_sudo -> --sudo
Align with options in train. This also prevents unexpected behavior where sudo is used, without being requested. Example:

```
command('uname -a')
```

This command will not run if no sudo information is given and e.g. a sudo password is configured on the node. The user can activate sudo usage with `--sudo` now.
2015-11-02 01:05:00 +01:00
Dominik Richter
b58a4b3f43 rename vulcanosec -> inspec 2015-10-26 12:34:15 +01:00
Dominik Richter
83082b2e7b feature: bring back profile check 2015-10-26 11:58:41 +01:00
Dominik Richter
a62ce0e14b create json from profile metadata 2015-10-26 00:35:18 +01:00
Christoph Hartmann
f38b278b50 setup test-kitchen workflow 2015-10-23 12:14:00 +02:00
jamescott
de4fec4c0b edit to fix typo 2015-10-22 22:05:33 -07:00
jamescott
e4689f6eb3 encryptiong => encryption 2015-10-22 21:54:12 -07:00
Christoph Hartmann
9e9cb98438 restore detect command 2015-10-17 19:33:35 +02:00
Dominik Richter
28fb05ad97 reduce exposure of context, use backend for os detect
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-10 23:15:05 +02:00
Dominik Richter
8e9da450f2 add shell to cli
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2015-10-08 23:24:52 +02:00
Christoph Hartmann
8fff2ee989 add author header 2015-10-06 18:55:44 +02:00
Dominik Richter
5815dda5d0 api: simplify ssl configuration
* rename `--winrm-ssl` => `--ssl`, to be used by other transports as well
* rename `--winrm-self-signed` => `--self-signed`, to be used by other transports
2015-10-05 12:52:04 +02:00