assetnote / ghostbuster

Eliminate dangling elastic IPs by performing analysis on your resources within all your AWS accounts.
GNU Affero General Public License v3.0
264 stars 35 forks source link

Cloudflare 3.x.x compatibility (No module named 'CloudFlare') #17

Open blim747 opened 4 months ago

blim747 commented 4 months ago

Thank you for supporting Ghostbuster. At my organization we have a Github Action that runs Ghostbuster daily. Starting on Tue 06/25/2024 Ghostbuster started failing with

Traceback (most recent call last):
  File "/runner/_work/infra-fleet/infra-fleet/venv/bin/ghostbuster", line 5, in <module>
    from ghostbuster.cli import cli
  File "/runner/_work/infra-fleet/infra-fleet/venv/lib/python3.11/site-packages/ghostbuster/cli.py", line 24, in <module>
    import ghostbuster.scan
  File "/runner/_work/infra-fleet/infra-fleet/venv/lib/python3.11/site-packages/ghostbuster/scan.py", line 20, in <module>
    import CloudFlare
ModuleNotFoundError: No module named 'CloudFlare'

This coincides with the release of the 3.x.x versions of the cloudflare PyPI package https://pypi.org/project/cloudflare/#history

We resolved this for now by pinning the dependencies to Cloudflare 2.20.0, more specifically this requirements.txt list:

attrs~=23.2.0
awsipranges~=0.3.3
click~=7.1.2
cloudflare~=2.20.0
ghostbuster~=1.0.2
jsonlines~=4.0.0
slack-sdk~=3.30.0

However, it serves the best interest of the community to eventually get the Cloudflare package updated