From 1133423bcbefd09eaff55a910d422a6e4bde3791 Mon Sep 17 00:00:00 2001 From: Sebastien Blot Date: Thu, 10 Jul 2025 00:00:09 +0200 Subject: [PATCH 1/3] update cscli doc for 1.6.10 --- crowdsec-docs/docs/cscli/cscli_alerts.md | 2 +- .../docs/cscli/cscli_alerts_delete.md | 2 +- .../docs/cscli/cscli_alerts_flush.md | 6 +-- crowdsec-docs/docs/cscli/cscli_alerts_list.md | 4 +- crowdsec-docs/docs/cscli/cscli_allowlists.md | 1 + .../docs/cscli/cscli_allowlists_add.md | 6 +-- .../docs/cscli/cscli_allowlists_check.md | 41 +++++++++++++++++++ .../cscli/cscli_appsec-configs_inspect.md | 5 ++- .../docs/cscli/cscli_appsec-rules_inspect.md | 5 ++- .../docs/cscli/cscli_collections_inspect.md | 5 ++- .../docs/cscli/cscli_console_enroll.md | 10 ++--- .../docs/cscli/cscli_decisions_list.md | 4 +- crowdsec-docs/docs/cscli/cscli_hub.md | 1 + crowdsec-docs/docs/cscli/cscli_hub_branch.md | 40 ++++++++++++++++++ crowdsec-docs/docs/cscli/cscli_hubtest_run.md | 2 +- crowdsec-docs/docs/cscli/cscli_metrics.md | 2 +- .../docs/cscli/cscli_parsers_inspect.md | 5 ++- .../docs/cscli/cscli_scenarios_inspect.md | 5 ++- crowdsec-docs/sidebars.ts | 3 +- 19 files changed, 119 insertions(+), 30 deletions(-) create mode 100644 crowdsec-docs/docs/cscli/cscli_allowlists_check.md create mode 100644 crowdsec-docs/docs/cscli/cscli_hub_branch.md diff --git a/crowdsec-docs/docs/cscli/cscli_alerts.md b/crowdsec-docs/docs/cscli/cscli_alerts.md index 2216873aa..d5fcd81a0 100644 --- a/crowdsec-docs/docs/cscli/cscli_alerts.md +++ b/crowdsec-docs/docs/cscli/cscli_alerts.md @@ -29,7 +29,7 @@ Manage alerts * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec * [cscli alerts delete](/cscli/cscli_alerts_delete.md) - Delete alerts -/!\ This command can be use only on the same machine than the local API. +/!\ This command can be used only on the same machine than the local API. * [cscli alerts flush](/cscli/cscli_alerts_flush.md) - Flush alerts /!\ This command can be used only on the same machine than the local API * [cscli alerts inspect](/cscli/cscli_alerts_inspect.md) - Show info about an alert diff --git a/crowdsec-docs/docs/cscli/cscli_alerts_delete.md b/crowdsec-docs/docs/cscli/cscli_alerts_delete.md index feada36ad..3516c1dbe 100644 --- a/crowdsec-docs/docs/cscli/cscli_alerts_delete.md +++ b/crowdsec-docs/docs/cscli/cscli_alerts_delete.md @@ -5,7 +5,7 @@ title: cscli alerts delete ## cscli alerts delete Delete alerts -/!\ This command can be use only on the same machine than the local API. +/!\ This command can be used only on the same machine than the local API. ``` cscli alerts delete [filters] [--all] [flags] diff --git a/crowdsec-docs/docs/cscli/cscli_alerts_flush.md b/crowdsec-docs/docs/cscli/cscli_alerts_flush.md index 5d8df8e4e..2dfb06707 100644 --- a/crowdsec-docs/docs/cscli/cscli_alerts_flush.md +++ b/crowdsec-docs/docs/cscli/cscli_alerts_flush.md @@ -20,9 +20,9 @@ cscli alerts flush --max-items 1000 --max-age 7d ### Options ``` - --max-items int Maximum number of alert items to keep in the database (default 5000) - --max-age string Maximum age of alert items to keep in the database (default "7d") - -h, --help help for flush + --max-items int Maximum number of alert items to keep in the database (default 5000) + --max-age duration Maximum age of alert items to keep in the database (default 168h0m0s) + -h, --help help for flush ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_alerts_list.md b/crowdsec-docs/docs/cscli/cscli_alerts_list.md index 58b310a6b..bc3b4656f 100644 --- a/crowdsec-docs/docs/cscli/cscli_alerts_list.md +++ b/crowdsec-docs/docs/cscli/cscli_alerts_list.md @@ -29,8 +29,8 @@ cscli alerts list --type ban ``` -a, --all Include decisions from Central API - --until string restrict to alerts older than until (ie. 4h, 30d) - --since string restrict to alerts newer than since (ie. 4h, 30d) + --until duration restrict to alerts older than until (ie. 4h, 30d) (default 0s) + --since duration restrict to alerts newer than since (ie. 4h, 30d) (default 0s) -i, --ip string restrict to alerts from this source ip (shorthand for --scope ip --value ) -s, --scenario string the scenario (ie. crowdsecurity/ssh-bf) -r, --range string restrict to alerts from this range (shorthand for --scope range --value ) diff --git a/crowdsec-docs/docs/cscli/cscli_allowlists.md b/crowdsec-docs/docs/cscli/cscli_allowlists.md index 723e59a56..a0bf6ff01 100644 --- a/crowdsec-docs/docs/cscli/cscli_allowlists.md +++ b/crowdsec-docs/docs/cscli/cscli_allowlists.md @@ -29,6 +29,7 @@ Manage centralized allowlists * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec * [cscli allowlists add](/cscli/cscli_allowlists_add.md) - Add content to an allowlist +* [cscli allowlists check](/cscli/cscli_allowlists_check.md) - Check if a value is in an allowlist * [cscli allowlists create](/cscli/cscli_allowlists_create.md) - Create a new allowlist * [cscli allowlists delete](/cscli/cscli_allowlists_delete.md) - Delete an allowlist * [cscli allowlists inspect](/cscli/cscli_allowlists_inspect.md) - Inspect an allowlist diff --git a/crowdsec-docs/docs/cscli/cscli_allowlists_add.md b/crowdsec-docs/docs/cscli/cscli_allowlists_add.md index 6bff9e11b..a2f68406e 100644 --- a/crowdsec-docs/docs/cscli/cscli_allowlists_add.md +++ b/crowdsec-docs/docs/cscli/cscli_allowlists_add.md @@ -19,9 +19,9 @@ cscli allowlists add my_allowlist 1.2.3.4 2.3.4.5 -e 1h -d "my comment" ### Options ``` - -d, --comment string comment for the value - -e, --expiration string expiration duration - -h, --help help for add + -d, --comment string comment for the value + -e, --expiration duration expiration duration (default 0s) + -h, --help help for add ``` ### Options inherited from parent commands diff --git a/crowdsec-docs/docs/cscli/cscli_allowlists_check.md b/crowdsec-docs/docs/cscli/cscli_allowlists_check.md new file mode 100644 index 000000000..c6fddc9d4 --- /dev/null +++ b/crowdsec-docs/docs/cscli/cscli_allowlists_check.md @@ -0,0 +1,41 @@ +--- +id: cscli_allowlists_check +title: cscli allowlists check +--- +## cscli allowlists check + +Check if a value is in an allowlist + +``` +cscli allowlists check [value...] [flags] +``` + +### Examples + +``` +cscli allowlists check 1.2.3.4 +``` + +### Options + +``` + -h, --help help for check +``` + +### Options inherited from parent commands + +``` + --color string Output color: yes, no, auto (default "auto") + -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml") + --debug Set logging to debug + --error Set logging to error + --info Set logging to info + -o, --output string Output format: human, json, raw + --trace Set logging to trace + --warning Set logging to warning +``` + +### SEE ALSO + +* [cscli allowlists](/cscli/cscli_allowlists.md) - Manage centralized allowlists + diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md b/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md index 5282b33fa..e447d766d 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-configs_inspect.md @@ -17,10 +17,11 @@ cscli appsec-configs inspect [item]... [flags] ### Examples ``` -# Display metadata, state, metrics and ancestor collections of appsec-configs (installed or not). +# Display metadata, state, ancestor collections of appsec-configs (installed or not). cscli appsec-configs inspect crowdsecurity/virtual-patching -# Don't collect metrics (avoid error if crowdsec is not running). +# If the config is installed, its metrics are collected and shown as well (with an error if crowdsec is not running). +# To avoid this, use --no-metrics. cscli appsec-configs inspect crowdsecurity/virtual-patching --no-metrics # Display difference between a tainted item and the latest one. diff --git a/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md b/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md index b972dcb85..c851d478c 100644 --- a/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_appsec-rules_inspect.md @@ -17,10 +17,11 @@ cscli appsec-rules inspect [item]... [flags] ### Examples ``` -# Display metadata, state, metrics and ancestor collections of appsec-rules (installed or not). +# Display metadata, state, ancestor collections of appsec-rules (installed or not). cscli appsec-rules inspect crowdsecurity/crs -# Don't collect metrics (avoid error if crowdsec is not running). +# If the rule is installed, its metrics are collected and shown as well (with an error if crowdsec is not running). +# To avoid this, use --no-metrics. cscli appsec-configs inspect crowdsecurity/crs --no-metrics # Display difference between a tainted item and the latest one. diff --git a/crowdsec-docs/docs/cscli/cscli_collections_inspect.md b/crowdsec-docs/docs/cscli/cscli_collections_inspect.md index aba839a02..445cfb58d 100644 --- a/crowdsec-docs/docs/cscli/cscli_collections_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_collections_inspect.md @@ -17,10 +17,11 @@ cscli collections inspect [item]... [flags] ### Examples ``` -# Display metadata, state, metrics and dependencies of collections (installed or not). +# Display metadata, state, and dependencies of collections (installed or not). cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables -# Don't collect metrics (avoid error if crowdsec is not running). +# If the collection is installed, its metrics are collected and shown as well (with an error if crowdsec is not running). +# To avoid this, use --no-metrics. cscli collections inspect crowdsecurity/http-cve crowdsecurity/iptables --no-metrics # Display difference between a tainted item and the latest one, or the reason for the taint if it's a dependency. diff --git a/crowdsec-docs/docs/cscli/cscli_console_enroll.md b/crowdsec-docs/docs/cscli/cscli_console_enroll.md index ecd93e85d..cab0759f5 100644 --- a/crowdsec-docs/docs/cscli/cscli_console_enroll.md +++ b/crowdsec-docs/docs/cscli/cscli_console_enroll.md @@ -22,12 +22,12 @@ cscli console enroll [enroll-key] [flags] ``` cscli console enroll YOUR-ENROLL-KEY - cscli console enroll --name [instance_name] YOUR-ENROLL-KEY - cscli console enroll --name [instance_name] --tags [tag_1] --tags [tag_2] YOUR-ENROLL-KEY - cscli console enroll --enable console_management YOUR-ENROLL-KEY - cscli console enroll --disable context YOUR-ENROLL-KEY +cscli console enroll --name [instance_name] YOUR-ENROLL-KEY +cscli console enroll --name [instance_name] --tags [tag_1] --tags [tag_2] YOUR-ENROLL-KEY +cscli console enroll --enable console_management YOUR-ENROLL-KEY +cscli console enroll --disable context YOUR-ENROLL-KEY - valid options are : custom,manual,tainted,context,console_management,all (see 'cscli console status' for details) +valid options are : custom,manual,tainted,context,console_management,all (see 'cscli console status' for details) ``` ### Options diff --git a/crowdsec-docs/docs/cscli/cscli_decisions_list.md b/crowdsec-docs/docs/cscli/cscli_decisions_list.md index 4e4be9df6..118c312d2 100644 --- a/crowdsec-docs/docs/cscli/cscli_decisions_list.md +++ b/crowdsec-docs/docs/cscli/cscli_decisions_list.md @@ -24,8 +24,8 @@ cscli decisions list --origin lists --scenario list_name ``` -a, --all Include decisions from Central API - --since string restrict to alerts newer than since (ie. 4h, 30d) - --until string restrict to alerts older than until (ie. 4h, 30d) + --since duration restrict to alerts newer than since (ie. 4h, 30d) (default 0s) + --until duration restrict to alerts older than until (ie. 4h, 30d) (default 0s) -t, --type string restrict to this decision type (ie. ban,captcha) --scope string restrict to this scope (ie. ip,range,session) --origin string the value to match for the specified origin (cscli,crowdsec,console,cscli-import,lists,CAPI ...) diff --git a/crowdsec-docs/docs/cscli/cscli_hub.md b/crowdsec-docs/docs/cscli/cscli_hub.md index 923b23a11..ffaa37cc0 100644 --- a/crowdsec-docs/docs/cscli/cscli_hub.md +++ b/crowdsec-docs/docs/cscli/cscli_hub.md @@ -43,6 +43,7 @@ cscli hub upgrade ### SEE ALSO * [cscli](/cscli/cscli.md) - cscli allows you to manage crowdsec +* [cscli hub branch](/cscli/cscli_hub_branch.md) - Show selected hub branch * [cscli hub list](/cscli/cscli_hub_list.md) - List all installed configurations * [cscli hub types](/cscli/cscli_hub_types.md) - List supported item types * [cscli hub update](/cscli/cscli_hub_update.md) - Download the latest index (catalog of available configurations) diff --git a/crowdsec-docs/docs/cscli/cscli_hub_branch.md b/crowdsec-docs/docs/cscli/cscli_hub_branch.md new file mode 100644 index 000000000..9342a92fa --- /dev/null +++ b/crowdsec-docs/docs/cscli/cscli_hub_branch.md @@ -0,0 +1,40 @@ +--- +id: cscli_hub_branch +title: cscli hub branch +--- +## cscli hub branch + +Show selected hub branch + +### Synopsis + +Display the hub branch to be used, depending on configuration and crowdsec version + +``` +cscli hub branch [flags] +``` + +### Options + +``` + -a, --all List all available items, including those not installed + -h, --help help for branch +``` + +### Options inherited from parent commands + +``` + --color string Output color: yes, no, auto (default "auto") + -c, --config string path to crowdsec config file (default "/etc/crowdsec/config.yaml") + --debug Set logging to debug + --error Set logging to error + --info Set logging to info + -o, --output string Output format: human, json, raw + --trace Set logging to trace + --warning Set logging to warning +``` + +### SEE ALSO + +* [cscli hub](/cscli/cscli_hub.md) - Manage hub index + diff --git a/crowdsec-docs/docs/cscli/cscli_hubtest_run.md b/crowdsec-docs/docs/cscli/cscli_hubtest_run.md index 79519a124..6fd2a99e2 100644 --- a/crowdsec-docs/docs/cscli/cscli_hubtest_run.md +++ b/crowdsec-docs/docs/cscli/cscli_hubtest_run.md @@ -17,7 +17,7 @@ cscli hubtest run [flags] --clean Clean runtime environment if test fail -h, --help help for run --host string Address to expose AppSec for hubtest (default "127.0.0.1:4241") - --max-jobs uint Max number of concurrent tests (does not apply to appsec) (default 8) + --max-jobs uint Max number of concurrent tests (does not apply to appsec) (default 16) --no-clean Don't clean runtime environment if test succeed --report-success Report successful tests too (implied with json output) --target string Target for AppSec Test (default "http://127.0.0.1:7822/") diff --git a/crowdsec-docs/docs/cscli/cscli_metrics.md b/crowdsec-docs/docs/cscli/cscli_metrics.md index e4e74f6e3..ddfe87d61 100644 --- a/crowdsec-docs/docs/cscli/cscli_metrics.md +++ b/crowdsec-docs/docs/cscli/cscli_metrics.md @@ -17,7 +17,7 @@ cscli metrics [flags] ### Examples ``` -# Show all Metrics, skip empty tables (same as "cecli metrics show") +# Show all Metrics, skip empty tables (same as "cscli metrics show") cscli metrics # Show only some metrics, connect to a different url diff --git a/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md b/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md index d171c8b0a..c18579a7b 100644 --- a/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_parsers_inspect.md @@ -17,10 +17,11 @@ cscli parsers inspect [item]... [flags] ### Examples ``` -# Display metadata, state, metrics and ancestor collections of parsers (installed or not). +# Display metadata, state and ancestor collections of parsers (installed or not). cscli parsers inspect crowdsecurity/httpd-logs crowdsecurity/sshd-logs -# Don't collect metrics (avoid error if crowdsec is not running). +# If the parser is installed, its metrics are collected and shown as well (with an error if crowdsec is not running). +# To avoid this, use --no-metrics. cscli parsers inspect crowdsecurity/httpd-logs --no-metrics # Display difference between a tainted item and the latest one. diff --git a/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md b/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md index 7c30a35a7..7d4e70af7 100644 --- a/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md +++ b/crowdsec-docs/docs/cscli/cscli_scenarios_inspect.md @@ -17,10 +17,11 @@ cscli scenarios inspect [item]... [flags] ### Examples ``` -# Display metadata, state, metrics and ancestor collections of scenarios (installed or not). +# Display metadata, state and ancestor collections of scenarios (installed or not). cscli scenarios inspect crowdsecurity/ssh-bf crowdsecurity/http-probing -# Don't collect metrics (avoid error if crowdsec is not running). +# If the scenario is installed, its metrics are collected and shown as well (with an error if crowdsec is not running). +# To avoid this, use --no-metrics. cscli scenarios inspect crowdsecurity/ssh-bf --no-metrics # Display difference between a tainted item and the latest one. diff --git a/crowdsec-docs/sidebars.ts b/crowdsec-docs/sidebars.ts index 4c4681772..188f5cdf7 100644 --- a/crowdsec-docs/sidebars.ts +++ b/crowdsec-docs/sidebars.ts @@ -317,6 +317,7 @@ const sidebarsConfig: SidebarConfig = { "cscli/cscli_allowlists_add", "cscli/cscli_allowlists_create", "cscli/cscli_allowlists_delete", + "cscli/cscli_allowlists_check", "cscli/cscli_allowlists_inspect", "cscli/cscli_allowlists_list", "cscli/cscli_allowlists_remove", @@ -470,7 +471,7 @@ const sidebarsConfig: SidebarConfig = { type: "doc", id: "cscli/cscli_hub", }, - items: ["cscli/cscli_hub_list", "cscli/cscli_hub_update", "cscli/cscli_hub_upgrade", "cscli/cscli_hub_types"], + items: ["cscli/cscli_hub_list", "cscli/cscli_hub_update", "cscli/cscli_hub_upgrade", "cscli/cscli_hub_types", "cscli/cscli_hub_branch"], }, { type: "doc", From 26db4d06de8b5314aaaa5114131702fe9e656b7d Mon Sep 17 00:00:00 2001 From: Sebastien Blot Date: Thu, 10 Jul 2025 00:27:52 +0200 Subject: [PATCH 2/3] lint --- crowdsec-docs/sidebars.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crowdsec-docs/sidebars.ts b/crowdsec-docs/sidebars.ts index 188f5cdf7..b7af299ca 100644 --- a/crowdsec-docs/sidebars.ts +++ b/crowdsec-docs/sidebars.ts @@ -471,7 +471,13 @@ const sidebarsConfig: SidebarConfig = { type: "doc", id: "cscli/cscli_hub", }, - items: ["cscli/cscli_hub_list", "cscli/cscli_hub_update", "cscli/cscli_hub_upgrade", "cscli/cscli_hub_types", "cscli/cscli_hub_branch"], + items: [ + "cscli/cscli_hub_list", + "cscli/cscli_hub_update", + "cscli/cscli_hub_upgrade", + "cscli/cscli_hub_types", + "cscli/cscli_hub_branch" + ], }, { type: "doc", From dffc06169a83ccca432ecf9bc8f3fe8065d521c5 Mon Sep 17 00:00:00 2001 From: Sebastien Blot Date: Thu, 10 Jul 2025 00:29:27 +0200 Subject: [PATCH 3/3] lint --- crowdsec-docs/sidebars.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowdsec-docs/sidebars.ts b/crowdsec-docs/sidebars.ts index b7af299ca..22bec8a08 100644 --- a/crowdsec-docs/sidebars.ts +++ b/crowdsec-docs/sidebars.ts @@ -476,7 +476,7 @@ const sidebarsConfig: SidebarConfig = { "cscli/cscli_hub_update", "cscli/cscli_hub_upgrade", "cscli/cscli_hub_types", - "cscli/cscli_hub_branch" + "cscli/cscli_hub_branch", ], }, {