diff --git a/.vscode/launch.json b/.vscode/launch.json index a1d2834..469f01d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -24,6 +24,19 @@ "--app_endpoint=https:", "--apikey=key" ] + }, + { + "name": "benchmarks", + "type": "go", + "request": "launch", + "mode": "auto", + "program": "${workspaceFolder}/main.go", + "args": [ + "get", + "benchmarks", + "--page-size=1", + "--page-number=1" + ] } ] } \ No newline at end of file diff --git a/README.md b/README.md index 1277ddd..f0cd75d 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,62 @@ CLI for opengovernance +![Root Command GIF](./tapes/gif/root.gif) + ## List of Commands -- configure -- get benchmarks -- get compliance-summary-for-benchmark -- get compliance-summary-for-integration -- get controls -- get jobs -- get job-details +- [configure](#configure) +- [get]() + - [benchmarks](#benchmarks) + - compliance-summary-for-benchmark + - compliance-summary-for-integration + - controls + - jobs + - job-details - run compliance - run discovery +## Configure + +Configuration for checkctl + +![Configure Command GIF](./tapes/gif/configure.gif) + +Interactive mode: +``` +checkctl configure +``` +Non-interactive mode: +``` +checktl configure --api-key <> --app-endpoint https://path.to.app.endpoint --output json +``` + +## get + +### benchmarks + +Get a list of benchmarks + +![Get Benchmarks Command GIF](./tapes/gif/getbenchmarks.gif) + +Available flags: + +| Flag | Description | Default +|----- | ----------- | ------- +|`--page-size` | Defines page size of response | 25 +|`--page-number` | Defines page number of response| 1 +|`--show-only-root` | Show only root benchmarks | true +|`--include-findings-summary` | Include findings summary in response | false + +### controls + +Get a list of controls + +![Get Controls Command GIF](./tapes/gif/getcontrols.gif) + +Available flags: + +| Flag | Description | Default +|----- | ----------- | ------- +|`--page-size` | Defines page size of response | 25 +|`--page-number` | Defines page number of response| 1 diff --git a/tapes/configure.tape b/tapes/configure.tape new file mode 100644 index 0000000..9cbfb52 --- /dev/null +++ b/tapes/configure.tape @@ -0,0 +1,19 @@ +Set Shell zsh +Sleep 1.5s +Type "checkctl configure" +Enter +Escape +Sleep 1.5s +Type "<>" +Sleep 500ms +Enter +Sleep 1s +Type "<>" +Enter +Sleep 1s +Type "<>" +Sleep 500ms +Enter +Sleep 500ms +Enter + diff --git a/tapes/getbenchmark.tape b/tapes/getbenchmark.tape new file mode 100644 index 0000000..b4cb62c --- /dev/null +++ b/tapes/getbenchmark.tape @@ -0,0 +1,18 @@ +Set Shell zsh +Sleep 1.5s +Type "checkctl get " +Sleep 1s +Type "benchmarks " +Sleep 500ms +Type "--page-size " +Sleep 500ms +Type "1 --page" +Sleep 500ms +Type "-number " +Sleep 1s +Type "1" +Sleep 500ms +Enter +Sleep 28s +Ctrl+D + diff --git a/tapes/getcontrols.tape b/tapes/getcontrols.tape new file mode 100644 index 0000000..955cd76 --- /dev/null +++ b/tapes/getcontrols.tape @@ -0,0 +1,10 @@ +Set Shell zsh +Sleep 500ms +Type "checkctl get controls --page-number 1 " +Sleep 500ms +Type "--page-size 1" +Sleep 2s +Enter +Sleep 3.5s +Ctrl+D + diff --git a/tapes/gif/configure.gif b/tapes/gif/configure.gif new file mode 100644 index 0000000..8fba1a3 Binary files /dev/null and b/tapes/gif/configure.gif differ diff --git a/tapes/gif/getbenchmarks.gif b/tapes/gif/getbenchmarks.gif new file mode 100644 index 0000000..a35f022 Binary files /dev/null and b/tapes/gif/getbenchmarks.gif differ diff --git a/tapes/gif/getcontrols.gif b/tapes/gif/getcontrols.gif new file mode 100644 index 0000000..ba5b0ef Binary files /dev/null and b/tapes/gif/getcontrols.gif differ diff --git a/tapes/gif/root.gif b/tapes/gif/root.gif new file mode 100644 index 0000000..48e2262 Binary files /dev/null and b/tapes/gif/root.gif differ diff --git a/tapes/root.tape b/tapes/root.tape new file mode 100644 index 0000000..fd46f54 --- /dev/null +++ b/tapes/root.tape @@ -0,0 +1,16 @@ +Set Shell zsh +Sleep 1s +Type "checkctl " +Sleep 500ms +Type "| less" +Sleep 500ms +Enter +Sleep 3s +Enter +Sleep 2s +Enter 34 +Sleep 1.5s +Type "q" +Sleep 1.5s +Ctrl+D +