From 3162f6cd922652dd37591667e89c6edb7b2dd506 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Mart=C3=ADn?= Date: Mon, 6 May 2024 11:10:20 +0200 Subject: [PATCH] docs(fixer): add alias to prowler fixer -> remediations (#3926) --- docs/tutorials/fixer.md | 6 +++--- mkdocs.yml | 2 +- prowler/lib/cli/parser.py | 1 + tests/lib/cli/parser_test.py | 6 ++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/tutorials/fixer.md b/docs/tutorials/fixer.md index c2fb95421a..745f08ac83 100644 --- a/docs/tutorials/fixer.md +++ b/docs/tutorials/fixer.md @@ -1,4 +1,4 @@ -# Prowler Fixer +# Prowler Fixer (remediation) Prowler allows you to fix some of the failed findings it identifies. You can use the `--fixer` flag to run the fixes that are available for the checks that failed. ```sh @@ -8,10 +8,10 @@ prowler -c ... --fixer ???+ note - You can see all the available fixes for each provider with the `--list-fixers` flag. + You can see all the available fixes for each provider with the `--list-remediations` or `--list-fixers flag. ```sh - prowler --list-fixer + prowler --list-fixers ``` ## Writing a Fixer diff --git a/mkdocs.yml b/mkdocs.yml index ecd86ec5cb..912c751145 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -53,7 +53,7 @@ nav: - Reporting: tutorials/reporting.md - Compliance: tutorials/compliance.md - Dashboard: tutorials/dashboard.md - - Fixer: tutorials/fixer.md + - Fixer (remediations): tutorials/fixer.md - Quick Inventory: tutorials/quick-inventory.md - Slack Integration: tutorials/integrations.md - Configuration File: tutorials/configuration_file.md diff --git a/prowler/lib/cli/parser.py b/prowler/lib/cli/parser.py index d1a86830d2..613df787aa 100644 --- a/prowler/lib/cli/parser.py +++ b/prowler/lib/cli/parser.py @@ -319,6 +319,7 @@ Detailed documentation at https://docs.prowler.com list_group.add_argument( "--list-fixer", "--list-fixers", + "--list-remediations", action="store_true", help="List fixers available for the provider", ) diff --git a/tests/lib/cli/parser_test.py b/tests/lib/cli/parser_test.py index 0f0539213a..c0e2d2ee15 100644 --- a/tests/lib/cli/parser_test.py +++ b/tests/lib/cli/parser_test.py @@ -711,6 +711,12 @@ class Test_Parser: parsed = self.parser.parse(command) assert parsed.list_fixer + def test_list_checks_parser_list_remediations(self): + argument = "--list-remediations" + command = [prowler_command, argument] + parsed = self.parser.parse(command) + assert parsed.list_fixer + def test_list_checks_parser_list_compliance_requirements_no_arguments(self): argument = "--list-compliance-requirements" command = [prowler_command, argument]