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.83k stars 1.54k forks source link

Unable to generate pydantic-core schema #5518

Open vishal-spektrum opened 3 weeks ago

vishal-spektrum commented 3 weeks ago

Steps to Reproduce

i have system with installed fastapi which uses pydantic version == 2.9.2 which conflicts with the pydantic version ==1.10.18 which is used by prowler

which gets me the error as pydantic.errors.PydanticSchemaGenerationError: Unable to generate pydantic-core schema for <class 'prowler.lib.check.compliance_models.CIS_Requirement_Attribute_Profile'>. Set arbitrary_types_allowed=True in the model_config to ignore this error or implement __get_pydantic_core_schema__ on your type to fully support it.

Expected behavior

prowler should use latest version of pydantic in order for the code to work

Actual Result with Screenshots or Logs

Screenshot from 2024-10-24 12-59-38 Screenshot from 2024-10-24 12-59-10

How did you install Prowler?

From pip package (pip install prowler)

Environment Resource

docker containers

OS used

ubuntu

Prowler version

Prowler 4.2.1

Pip version

pip 23.0.1

Context

No response

MrCloudSec commented 3 weeks ago

Hi @vishal-spektrum, I will discuss it internally with the team to upgrade pydantic to the latest version and I will get back to you. Thanks!

puchy22 commented 2 weeks ago

Good @vishal-spektrum, right now it is not quite clear in our roadmap when the Pydantic version will be updated, but we will try to do it as soon as possible and we will notify you about it. In the meantime you can try the default installation we recommend which is pipx. As it creates isolated environments to install Prowler and all its dependencies, it is the best practice to install packages in isolated environments otherwise you may encounter conflict problems like yours. I hope you find this useful, let me know if this does not solve your problems.

Thank you very much for using Prowler 🚀