Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest image broken #488

Closed
adriantaut-pp opened this issue Feb 3, 2023 · 3 comments · Fixed by #507
Closed

Latest image broken #488

adriantaut-pp opened this issue Feb 3, 2023 · 3 comments · Fixed by #507
Labels
area/docker bug Something isn't working

Comments

@adriantaut-pp
Copy link

adriantaut-pp commented Feb 3, 2023

Describe the bug

The latest v1.77.1 Docker image version seems to be broken

$ docker run -v $(pwd):/lint -w /lint ghcr.io/antonbabenko/pre-commit-terraform:v1.77.1 run --all-files --show-diff-on-failure --color=always
[INFO] Initializing environment for https://github.com/antonbabenko/pre-commit-terraform.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
Terraform fmt............................................................Passed
Terraform docs...........................................................Passed
Terraform validate with tfsec............................................Passed
Checkov..................................................................Failed
- hook id: terraform_checkov
- exit code: 1

Traceback (most recent call last):
  File "/usr/bin/checkov", line 2, in <module>
    from checkov.main import run
  File "/usr/local/lib/python3.10/site-packages/checkov/main.py", line 20, in <module>
    from checkov.argo_workflows.runner import Runner as argo_workflows_runner
  File "/usr/local/lib/python3.10/site-packages/checkov/argo_workflows/runner.py", line 7, in <module>
    from checkov.common.images.image_referencer import ImageReferencer, Image
  File "/usr/local/lib/python3.10/site-packages/checkov/common/images/image_referencer.py", line 12, in <module>
    from checkov.common.bridgecrew.vulnerability_scanning.image_scanner import image_scanner
  File "/usr/local/lib/python3.10/site-packages/checkov/common/bridgecrew/vulnerability_scanning/image_scanner.py", line 15, in <module>
    from checkov.common.bridgecrew.vulnerability_scanning.integrations.docker_image_scanning import \
  File "/usr/local/lib/python3.10/site-packages/checkov/common/bridgecrew/vulnerability_scanning/integrations/docker_image_scanning.py", line 8, in <module>
    from checkov.common.bridgecrew.vulnerability_scanning.integrations.twistcli import TwistcliIntegration
  File "/usr/local/lib/python3.10/site-packages/checkov/common/bridgecrew/vulnerability_scanning/integrations/twistcli.py", line 11, in <module>
    from checkov.common.bridgecrew.platform_integration import bc_integration
  File "/usr/local/lib/python3.10/site-packages/checkov/common/bridgecrew/platform_integration.py", line 31, in <module>
    from checkov.common.bridgecrew.wrapper import reduce_scan_reports, persist_checks_results, \
  File "/usr/local/lib/python3.10/site-packages/checkov/common/bridgecrew/wrapper.py", line 13, in <module>
    from checkov.common.util.json_utils import CustomJSONEncoder
  File "/usr/local/lib/python3.10/site-packages/checkov/common/util/json_utils.py", line 6, in <module>
    from packaging.version import LegacyVersion, Version
ImportError: cannot import name 'LegacyVersion' from 'packaging.version' (/usr/local/lib/python3.10/site-packages/packaging/version.py)

I think it might be related with some pip packages upgrades? 🤔

Environment information

  • OS: Ubuntu 20.04

  • docker info:

command output
INSERT_OUTPUT_HERE
  • Docker image tag/git commit:

  • Tools versions. Don't forget to specify right tag in command -
    TAG=1.77.1 && docker run --entrypoint cat pre-commit:$TAG /usr/bin/tools_versions_info

@antonbabenko
Copy link
Owner

This issue has been resolved in version 1.77.3 🎉

@adriantaut-pp
Copy link
Author

@antonbabenko appreciated 🙇

@antonbabenko
Copy link
Owner

@adriantaut-pp Kudos to @MaxymVlasov and @yermulnik who contribute to this project so nicely!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docker bug Something isn't working
Projects
None yet
2 participants