PaloAltoNetworks / terraform-google-vmseries-modules

Terraform Reusable Modules for VM-Series on Google Cloud Platform (GCP)
https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/google
MIT License
16 stars 27 forks source link

checkov hook crashes importing LegacyVersion from packaging module #151

Closed alperenkose closed 1 year ago

alperenkose commented 1 year ago

Describe the bug

Pre-commit hook crashes while checkov importing LegacyVersion from packaging module which prevents commiting.

Current behavior

Checkov hook crashes with the following error: ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/Users/alp/.cache/pre-commit/repovr64b5yh/py_env-python3.11/lib/python3.11/site-packages/packaging/version.py)

Bug report and PR on checkov project. https://github.com/bridgecrewio/checkov/issues/4011 https://github.com/bridgecrewio/checkov/pull/4012

Possible solution

Use checkov version 2.2.125 in pre-commit hook which uses a pinned version of packaging for now.

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!

migara commented 1 year ago

Fixed as part of https://github.com/PaloAltoNetworks/terraform-google-vmseries-modules/pull/153