prowler-cloud / prowler

Prowler is an Open Source Security tool for AWS, Azure, GCP and Kubernetes to do security assessments, audits, incident response, compliance, continuous monitoring, hardening and forensics readiness. Includes CIS, NIST 800, NIST CSF, CISA, FedRAMP, PCI-DSS, GDPR, HIPAA, FFIEC, SOC2, GXP, Well-Architected Security, ENS and more
https://prowler.com
Apache License 2.0
10.87k stars 1.55k forks source link

[Bug]: prowler AWS --list-compliance-requirements results in error/ no requirements for certain frameworks #2071

Closed edschreibman closed 1 year ago

edschreibman commented 1 year ago

What happened? prowler aws --list-compliance-requirements results in error/ no requirements the frameworks listed below

How to reproduce it Steps to reproduce the behavior:

  1. run prowler aws --list-compliance to get list of frameworks
  2. run prowler aws --list-compliance-requirements [framework]
  3. For these Frameworks: i.e. prowler aws --list-compliance-requirements soc2_aws
    • soc2_aws
    • cisa_aws
    • ffiec_aws
    • gdpr_aws
    • hipaa_aws

error produced:

        Traceback (most recent call last):
  File "/usr/local/bin/prowler", line 8, in <module>
    sys.exit(prowler())
  File "/usr/local/lib/python3.9/site-packages/prowler/__main__.py", line 98, in prowler
    print_compliance_requirements(
  File "/usr/local/lib/python3.9/site-packages/prowler/lib/check/check.py", line 187, in print_compliance_requirements
    provider = split_compliance[2].upper()
IndexError: list index out of range

For these frameworks:

No error - But no requirements in output

Expected behavior A clear and concise description of what you expected to happen.

Output to contain controls in framework, like this for ens_rd2022_aws:

Listing ENS RD2022 AWS Compliance Requirements:

Requirement Id: op.acc.1.aws.iam.2
    - Description: Proveedor de identidad centralizado
    - Checks:
       iam_check_saml_providers_sts

Requirement Id: op.acc.2.aws.iam.4
    - Description: Requisitos de acceso
    - Checks:
       iam_avoid_root_usage

Requirement Id: op.acc.3.r1.aws.iam.1
    - Description: Segregación rigurosa
    - Checks:
       iam_support_role_created

Screenshots or Logs If applicable, add screenshots to help explain your problem.

1 2 3 4

Also, you can add logs (anonymize them first!). Here a command that may help to share a log prowler <your arguments> --log-level DEBUG --log-file $(date +%F)_debug.log then attach here the log file.

From where are you running Prowler? Please, complete the following information:

Additional context Add any other context about the problem here.

MrCloudSec commented 1 year ago

Hi @edschreibman, can you use the last version of prowler pip install --upgrade prowler? These errors are not present in version 3.2.4.

edschreibman commented 1 year ago

Tested and agreed - fully resolved in Prowler 3.2.4 Fri Mar 10 23:45:28 UTC 2023 Prowler 3.2.4