Repository: bridgecrewio/checkov

Issue:
ERROR: Failed building wheel for aiohttp
**Describe the issue**
Explain what you expected to happen when checkov crashed.

I simply tried to commit a change (`git commit`) which triggered pre-commit to install the environment for https://github.com/bridgecrewio/checkov. 

The error I'm receiving is `ERROR: Failed building wheel for aiohttp`.

**Examples**
Please share an example code sample (in the IaC of your choice) + the expected outcomes.

1. My .pre-commit-config.yaml contains the following repo for checkov:

```
  - repo: https://github.com/bridgecrewio/checkov
    rev: 3.0.16
    hooks:
      - id: checkov
        args: [--config-file, .checkov/k8s.yaml]
```

2. .checkov/k8s.yaml looks like this:

```
quiet: true
compact: true
skip-download: true
download-external-modules: false
framework:
  - helm
  - kubernetes
directory:
  - ./xyz
```

**Exception Trace**
Please share the trace for the exception and all relevant output by checkov.
To maximize the understanding, please run checkov with LOG_LEVEL set to debug
as follows:

```sh
git commit
[INFO] Installing environment for https://github.com/bridgecrewio/checkov.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/Users/michaelvoet/.cache/pre-commit/repor0bcn38a/py_env-python3.12/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /Users/michaelvoet/.cache/pre-commit/repor0bcn38a
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Installing backend dependencies: started
      Installing backend dependencies: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Collecting bc-python-hcl2==0.3.51 (from checkov==3.0.16)
      Using cached bc_python_hcl2-0.3.51-py3-none-any.whl (14 kB)
    Collecting bc-detect-secrets==1.4.30 (from checkov==3.0.16)
      Using cached bc_detect_secrets-1.4.30-py3-none-any.whl.metadata (23 kB)
    Collecting bc-jsonpath-ng==1.5.9 (from checkov==3.0.16)
      Using cached bc_jsonpath_ng-1.5.9-py3-none-any.whl (29 kB)
    Collecting tabulate (from checkov==3.0.16)
      Using cached tabulate-0.9.0-py3-none-any.whl (35 kB)
    Collecting colorama (from checkov==3.0.16)
      Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB)
    Collecting termcolor (from checkov==3.0.16)
      Using cached termcolor-2.3.0-py3-none-any.whl (6.9 kB)
    Collecting junit-xml>=1.9 (from checkov==3.0.16)
      Using cached junit_xml-1.9-py2.py3-none-any.whl (7.1 kB)
    Collecting dpath==2.1.3 (from checkov==3.0.16)
      Using cached dpath-2.1.3-py3-none-any.whl (17 kB)
    Collecting pyyaml>=5.4.1 (from checkov==3.0.16)
      Using cached PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (2.1 kB)
    Collecting boto3>=1.17 (from checkov==3.0.16)
      Using cached boto3-1.28.76-py3-none-any.whl.metadata (6.7 kB)
    Collecting gitpython (from checkov==3.0.16)
      Using cached GitPython-3.1.40-py3-none-any.whl.metadata (12 kB)
    Collecting jmespath (from checkov==3.0.16)
      Using cached jmespath-1.0.1-py3-none-any.whl (20 kB)
    Collecting tqdm (from checkov==3.0.16)
      Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)
    Collecting update-checker (from checkov==3.0.16)
      Using cached update_checker-0.18.0-py3-none-any.whl (7.0 kB)
    Collecting semantic-version (from checkov==3.0.16)
      Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
    Collecting packaging (from checkov==3.0.16)
      Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB)
    Collecting cloudsplaining>=0.6.2 (from checkov==3.0.16)
      Using cached cloudsplaining-0.6.2-py3-none-any.whl.metadata (21 kB)
    Collecting networkx<2.7 (from checkov==3.0.16)
      Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
    Collecting igraph<0.11.0 (from checkov==3.0.16)
      Using cached igraph-0.10.8-cp39-abi3-macosx_11_0_arm64.whl.metadata (3.8 kB)
    Collecting dockerfile-parse (from checkov==3.0.16)
      Using cached dockerfile_parse-2.0.1-py2.py3-none-any.whl.metadata (3.3 kB)
    Collecting docker (from checkov==3.0.16)
      Using cached docker-6.1.3-py3-none-any.whl.metadata (3.5 kB)
    Collecting configargparse (from checkov==3.0.16)
      Using cached ConfigArgParse-1.7-py3-none-any.whl.metadata (23 kB)
    Collecting argcomplete (from checkov==3.0.16)
      Using cached argcomplete-3.1.3-py3-none-any.whl.metadata (16 kB)
    Collecting typing-extensions>=4.1.0 (from checkov==3.0.16)
      Using cached typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
    Collecting importlib-metadata>=0.12 (from checkov==3.0.16)
      Using cached importlib_metadata-6.8.0-py3-none-any.whl.metadata (5.1 kB)
    Collecting cachetools (from checkov==3.0.16)
      Using cached cachetools-5.3.2-py3-none-any.whl.metadata (5.2 kB)
    Collecting cyclonedx-python-lib>=5.0.0 (from checkov==3.0.16)
      Using cached cyclonedx_python_lib-5.1.0-py3-none-any.whl.metadata (6.2 kB)
    Collecting packageurl-python (from checkov==3.0.16)
      Using cached packageurl_python-0.11.2-py3-none-any.whl.metadata (5.0 kB)
    Collecting click>=8.0.0 (from checkov==3.0.16)
      Using cached click-8.1.7-py3-none-any.whl.metadata (3.0 kB)
    Collecting aiohttp (from checkov==3.0.16)
      Using cached aiohttp-3.8.6.tar.gz (7.4 MB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Installing backend dependencies: started
      Installing backend dependencies: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Collecting aiodns (from checkov==3.0.16)
      Using cached aiodns-3.1.1-py3-none-any.whl.metadata (4.0 kB)
    Collecting aiomultiprocess (from checkov==3.0.16)
      Using cached aiomultiprocess-0.9.0-py3-none-any.whl (17 kB)
    Collecting jsonschema<5.0.0,>=4.6.0 (from checkov==3.0.16)
      Using cached jsonschema-4.19.2-py3-none-any.whl.metadata (7.9 kB)
    Collecting prettytable>=3.0.0 (from checkov==3.0.16)
      Using cached prettytable-3.9.0-py3-none-any.whl.metadata (26 kB)
    Collecting pycep-parser==0.4.1 (from checkov==3.0.16)
      Using cached pycep_parser-0.4.1-py3-none-any.whl.metadata (2.8 kB)
    Collecting charset-normalizer (from checkov==3.0.16)
      Using cached charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl.metadata (33 kB)
    Collecting schema (from checkov==3.0.16)
      Using cached schema-0.7.5-py2.py3-none-any.whl (17 kB)
    Collecting requests>=2.27.0 (from checkov==3.0.16)
      Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
    Collecting yarl (from checkov==3.0.16)
      Using cached yarl-1.9.2-cp312-cp312-macosx_13_0_arm64.whl
    Collecting openai (from checkov==3.0.16)
      Using cached openai-0.28.1-py3-none-any.whl.metadata (11 kB)
    Collecting spdx-tools<0.9.0,>=0.8.0 (from checkov==3.0.16)
      Using cached spdx_tools-0.8.2-py3-none-any.whl.metadata (14 kB)
    Collecting license-expression (from checkov==3.0.16)
      Using cached license_expression-30.1.1-py3-none-any.whl.metadata (12 kB)
    Collecting rustworkx (from checkov==3.0.16)
      Using cached rustworkx-0.13.2-cp312-cp312-macosx_11_0_arm64.whl.metadata (10 kB)
    Collecting pydantic (from checkov==3.0.16)
      Using cached pydantic-2.4.2-py3-none-any.whl.metadata (158 kB)
    Collecting unidiff (from bc-detect-secrets==1.4.30->checkov==3.0.16)
      Using cached unidiff-0.7.5-py2.py3-none-any.whl (14 kB)
    Collecting ply (from bc-jsonpath-ng==1.5.9->checkov==3.0.16)
      Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
    Collecting decorator (from bc-jsonpath-ng==1.5.9->checkov==3.0.16)
      Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
    Collecting lark>=1.0.0 (from bc-python-hcl2==0.3.51->checkov==3.0.16)
      Using cached lark-1.1.8-py3-none-any.whl.metadata (1.9 kB)
    Collecting regex>=2022.1.18 (from pycep-parser==0.4.1->checkov==3.0.16)
      Using cached regex-2023.10.3-cp312-cp312-macosx_11_0_arm64.whl.metadata (40 kB)
    Collecting botocore<1.32.0,>=1.31.76 (from boto3>=1.17->checkov==3.0.16)
      Using cached botocore-1.31.76-py3-none-any.whl.metadata (6.1 kB)
    Collecting s3transfer<0.8.0,>=0.7.0 (from boto3>=1.17->checkov==3.0.16)
      Using cached s3transfer-0.7.0-py3-none-any.whl.metadata (1.8 kB)
    Collecting cached-property (from cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
    Collecting click-option-group (from cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached click_option_group-0.5.6-py3-none-any.whl.metadata (8.3 kB)
    Collecting jinja2 (from cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
    Collecting markdown (from cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached Markdown-3.5.1-py3-none-any.whl.metadata (7.1 kB)
    Collecting policy-sentry>=0.11.3 (from cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached policy_sentry-0.12.10-py3-none-any.whl.metadata (20 kB)
    Collecting py-serializable<0.16,>=0.15 (from cyclonedx-python-lib>=5.0.0->checkov==3.0.16)
      Using cached py_serializable-0.15.0-py3-none-any.whl.metadata (3.8 kB)
    Collecting sortedcontainers<3.0.0,>=2.4.0 (from cyclonedx-python-lib>=5.0.0->checkov==3.0.16)
      Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
    Collecting texttable>=1.6.2 (from igraph<0.11.0->checkov==3.0.16)
      Using cached texttable-1.7.0-py2.py3-none-any.whl.metadata (9.8 kB)
    Collecting zipp>=0.5 (from importlib-metadata>=0.12->checkov==3.0.16)
      Using cached zipp-3.17.0-py3-none-any.whl.metadata (3.7 kB)
    Collecting attrs>=22.2.0 (from jsonschema<5.0.0,>=4.6.0->checkov==3.0.16)
      Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
    Collecting jsonschema-specifications>=2023.03.6 (from jsonschema<5.0.0,>=4.6.0->checkov==3.0.16)
      Using cached jsonschema_specifications-2023.7.1-py3-none-any.whl.metadata (2.8 kB)
    Collecting referencing>=0.28.4 (from jsonschema<5.0.0,>=4.6.0->checkov==3.0.16)
      Using cached referencing-0.30.2-py3-none-any.whl.metadata (2.6 kB)
    Collecting rpds-py>=0.7.1 (from jsonschema<5.0.0,>=4.6.0->checkov==3.0.16)
      Using cached rpds_py-0.10.6-cp312-cp312-macosx_11_0_arm64.whl.metadata (3.7 kB)
    Collecting six (from junit-xml>=1.9->checkov==3.0.16)
      Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
    Collecting boolean.py>=4.0 (from license-expression->checkov==3.0.16)
      Using cached boolean.py-4.0-py3-none-any.whl (25 kB)
    Collecting wcwidth (from prettytable>=3.0.0->checkov==3.0.16)
      Using cached wcwidth-0.2.9-py2.py3-none-any.whl.metadata (14 kB)
    Collecting idna<4,>=2.5 (from requests>=2.27.0->checkov==3.0.16)
      Using cached idna-3.4-py3-none-any.whl (61 kB)
    Collecting urllib3<3,>=1.21.1 (from requests>=2.27.0->checkov==3.0.16)
      Using cached urllib3-2.0.7-py3-none-any.whl.metadata (6.6 kB)
    Collecting certifi>=2017.4.17 (from requests>=2.27.0->checkov==3.0.16)
      Using cached certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
    Collecting xmltodict (from spdx-tools<0.9.0,>=0.8.0->checkov==3.0.16)
      Using cached xmltodict-0.13.0-py2.py3-none-any.whl (10.0 kB)
    Collecting rdflib (from spdx-tools<0.9.0,>=0.8.0->checkov==3.0.16)
      Using cached rdflib-7.0.0-py3-none-any.whl.metadata (11 kB)
    Collecting beartype (from spdx-tools<0.9.0,>=0.8.0->checkov==3.0.16)
      Using cached beartype-0.16.4-py3-none-any.whl.metadata (29 kB)
    Collecting uritools (from spdx-tools<0.9.0,>=0.8.0->checkov==3.0.16)
      Using cached uritools-4.0.2-py3-none-any.whl.metadata (4.7 kB)
    Collecting pycares>=4.0.0 (from aiodns->checkov==3.0.16)
      Using cached pycares-4.4.0-cp312-cp312-macosx_10_9_universal2.whl.metadata (4.1 kB)
    Collecting multidict<7.0,>=4.5 (from aiohttp->checkov==3.0.16)
      Using cached multidict-6.0.4-cp312-cp312-macosx_13_0_arm64.whl
    Collecting async-timeout<5.0,>=4.0.0a3 (from aiohttp->checkov==3.0.16)
      Using cached async_timeout-4.0.3-py3-none-any.whl.metadata (4.2 kB)
    Collecting frozenlist>=1.1.1 (from aiohttp->checkov==3.0.16)
      Using cached frozenlist-1.4.0-cp312-cp312-macosx_13_0_arm64.whl
    Collecting aiosignal>=1.1.2 (from aiohttp->checkov==3.0.16)
      Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
    Collecting websocket-client>=0.32.0 (from docker->checkov==3.0.16)
      Using cached websocket_client-1.6.4-py3-none-any.whl.metadata (7.7 kB)
    Collecting gitdb<5,>=4.0.1 (from gitpython->checkov==3.0.16)
      Using cached gitdb-4.0.11-py3-none-any.whl.metadata (1.2 kB)
    Collecting annotated-types>=0.4.0 (from pydantic->checkov==3.0.16)
      Using cached annotated_types-0.6.0-py3-none-any.whl.metadata (12 kB)
    Collecting pydantic-core==2.10.1 (from pydantic->checkov==3.0.16)
      Using cached pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (6.5 kB)
    Collecting numpy>=1.16.0 (from rustworkx->checkov==3.0.16)
      Using cached numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (61 kB)
    Collecting contextlib2>=0.5.5 (from schema->checkov==3.0.16)
      Using cached contextlib2-21.6.0-py2.py3-none-any.whl (13 kB)
    Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.32.0,>=1.31.76->boto3>=1.17->checkov==3.0.16)
      Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
    Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython->checkov==3.0.16)
      Using cached smmap-5.0.1-py3-none-any.whl.metadata (4.3 kB)
    Collecting beautifulsoup4 (from policy-sentry>=0.11.3->cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached beautifulsoup4-4.12.2-py3-none-any.whl (142 kB)
    Collecting defusedxml<0.8.0,>=0.7.1 (from py-serializable<0.16,>=0.15->cyclonedx-python-lib>=5.0.0->checkov==3.0.16)
      Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
    Collecting cffi>=1.5.0 (from pycares>=4.0.0->aiodns->checkov==3.0.16)
      Using cached cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl.metadata (1.5 kB)
    Collecting MarkupSafe>=2.0 (from jinja2->cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl.metadata (2.9 kB)
    Collecting isodate<0.7.0,>=0.6.0 (from rdflib->spdx-tools<0.9.0,>=0.8.0->checkov==3.0.16)
      Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB)
    Collecting pyparsing<4,>=2.1.0 (from rdflib->spdx-tools<0.9.0,>=0.8.0->checkov==3.0.16)
      Using cached pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
    Collecting pycparser (from cffi>=1.5.0->pycares>=4.0.0->aiodns->checkov==3.0.16)
      Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
    Collecting soupsieve>1.2 (from beautifulsoup4->policy-sentry>=0.11.3->cloudsplaining>=0.6.2->checkov==3.0.16)
      Using cached soupsieve-2.5-py3-none-any.whl.metadata (4.7 kB)
    Using cached bc_detect_secrets-1.4.30-py3-none-any.whl (118 kB)
    Using cached pycep_parser-0.4.1-py3-none-any.whl (22 kB)
    Using cached boto3-1.28.76-py3-none-any.whl (135 kB)
    Using cached click-8.1.7-py3-none-any.whl (97 kB)
    Using cached cloudsplaining-0.6.2-py3-none-any.whl (2.0 MB)
    Using cached cyclonedx_python_lib-5.1.0-py3-none-any.whl (187 kB)
    Using cached igraph-0.10.8-cp39-abi3-macosx_11_0_arm64.whl (1.7 MB)
    Using cached importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
    Using cached jsonschema-4.19.2-py3-none-any.whl (83 kB)
    Using cached license_expression-30.1.1-py3-none-any.whl (103 kB)
    Using cached packageurl_python-0.11.2-py3-none-any.whl (25 kB)
    Using cached prettytable-3.9.0-py3-none-any.whl (27 kB)
    Using cached PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl (165 kB)
    Using cached requests-2.31.0-py3-none-any.whl (62 kB)
    Using cached charset_normalizer-3.3.2-cp312-cp312-macosx_11_0_arm64.whl (119 kB)
    Using cached spdx_tools-0.8.2-py3-none-any.whl (285 kB)
    Using cached typing_extensions-4.8.0-py3-none-any.whl (31 kB)
    Using cached aiodns-3.1.1-py3-none-any.whl (5.4 kB)
    Using cached argcomplete-3.1.3-py3-none-any.whl (41 kB)
    Using cached cachetools-5.3.2-py3-none-any.whl (9.3 kB)
    Using cached ConfigArgParse-1.7-py3-none-any.whl (25 kB)
    Using cached docker-6.1.3-py3-none-any.whl (148 kB)
    Using cached packaging-23.2-py3-none-any.whl (53 kB)
    Using cached dockerfile_parse-2.0.1-py2.py3-none-any.whl (14 kB)
    Using cached GitPython-3.1.40-py3-none-any.whl (190 kB)
    Using cached openai-0.28.1-py3-none-any.whl (76 kB)
    Using cached pydantic-2.4.2-py3-none-any.whl (395 kB)
    Using cached pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl (1.7 MB)
    Using cached rustworkx-0.13.2-cp312-cp312-macosx_11_0_arm64.whl (1.6 MB)
    Using cached tqdm-4.66.1-py3-none-any.whl (78 kB)
    Using cached annotated_types-0.6.0-py3-none-any.whl (12 kB)
    Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)
    Using cached botocore-1.31.76-py3-none-any.whl (11.3 MB)
    Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
    Using cached gitdb-4.0.11-py3-none-any.whl (62 kB)
    Using cached jsonschema_specifications-2023.7.1-py3-none-any.whl (17 kB)
    Using cached lark-1.1.8-py3-none-any.whl (111 kB)
    Using cached numpy-1.26.1-cp312-cp312-macosx_11_0_arm64.whl (13.7 MB)
    Using cached policy_sentry-0.12.10-py3-none-any.whl (4.0 MB)
    Using cached py_serializable-0.15.0-py3-none-any.whl (19 kB)
    Using cached pycares-4.4.0-cp312-cp312-macosx_10_9_universal2.whl (136 kB)
    Using cached referencing-0.30.2-py3-none-any.whl (25 kB)
    Using cached regex-2023.10.3-cp312-cp312-macosx_11_0_arm64.whl (292 kB)
    Using cached rpds_py-0.10.6-cp312-cp312-macosx_11_0_arm64.whl (321 kB)
    Using cached s3transfer-0.7.0-py3-none-any.whl (79 kB)
    Using cached texttable-1.7.0-py2.py3-none-any.whl (10 kB)
    Using cached urllib3-2.0.7-py3-none-any.whl (124 kB)
    Using cached websocket_client-1.6.4-py3-none-any.whl (57 kB)
    Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)
    Using cached beartype-0.16.4-py3-none-any.whl (819 kB)
    Using cached click_option_group-0.5.6-py3-none-any.whl (12 kB)
    Using cached Markdown-3.5.1-py3-none-any.whl (102 kB)
    Using cached rdflib-7.0.0-py3-none-any.whl (531 kB)
    Using cached uritools-4.0.2-py3-none-any.whl (10 kB)
    Using cached wcwidth-0.2.9-py2.py3-none-any.whl (102 kB)
    Using cached cffi-1.16.0-cp312-cp312-macosx_11_0_arm64.whl (177 kB)
    Using cached MarkupSafe-2.1.3-cp312-cp312-macosx_10_9_universal2.whl (17 kB)
    Using cached pyparsing-3.1.1-py3-none-any.whl (103 kB)
    Using cached smmap-5.0.1-py3-none-any.whl (24 kB)
    Using cached soupsieve-2.5-py3-none-any.whl (36 kB)
    Building wheels for collected packages: checkov, aiohttp
      Building wheel for checkov (pyproject.toml): started
      Building wheel for checkov (pyproject.toml): finished with status 'done'
      Created wheel for checkov: filename=checkov-3.0.16-py3-none-any.whl size=1938771 sha256=ec83e3c0b832c9fc70641d03f5e2260fecaa6d3e63a816ed8c292ff112370488
      Stored in directory: /private/var/folders/ql/0t19gxzn0bgc8lyjtdcc0xr80000gq/T/pip-ephem-wheel-cache-p0h18a1z/wheels/9b/58/61/fb14423de2da67c3236e26eee457dfbd0bad3eb94f9df2dc0c
      Building wheel for aiohttp (pyproject.toml): started
      Building wheel for aiohttp (pyproject.toml): finished with status 'error'
    Successfully built checkov
    Failed to build aiohttp
stderr:
      error: subprocess-exited-with-error
      
      × Building wheel for aiohttp (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [188 lines of output]
          *********************
          * Accelerated build *
          *********************
          running bdist_wheel
          running build
          running build_py
          creating build
          creating build/lib.macosx-13-arm64-cpython-312
          creating build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_ws.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/worker.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/multipart.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_response.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/client_ws.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/test_utils.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/tracing.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_exceptions.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_middlewares.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/http_exceptions.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_app.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/streams.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_protocol.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/log.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/client.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_urldispatcher.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_request.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/http_websocket.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/client_proto.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/locks.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/__init__.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_runner.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_server.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/base_protocol.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/payload.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/client_reqrep.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/http.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_log.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/resolver.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/formdata.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/payload_streamer.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_routedef.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/connector.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/client_exceptions.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/typedefs.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/hdrs.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/web_fileresponse.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/http_writer.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/tcp_helpers.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/helpers.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/http_parser.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/cookiejar.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/pytest_plugin.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/abc.py -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          running egg_info
          writing aiohttp.egg-info/PKG-INFO
          writing dependency_links to aiohttp.egg-info/dependency_links.txt
          writing requirements to aiohttp.egg-info/requires.txt
          writing top-level names to aiohttp.egg-info/top_level.txt
          reading manifest file 'aiohttp.egg-info/SOURCES.txt'
          reading manifest template 'MANIFEST.in'
          warning: no files found matching 'aiohttp' anywhere in distribution
          warning: no previously-included files matching '*.pyc' found anywhere in distribution
          warning: no previously-included files matching '*.pyd' found anywhere in distribution
          warning: no previously-included files matching '*.so' found anywhere in distribution
          warning: no previously-included files matching '*.lib' found anywhere in distribution
          warning: no previously-included files matching '*.dll' found anywhere in distribution
          warning: no previously-included files matching '*.a' found anywhere in distribution
          warning: no previously-included files matching '*.obj' found anywhere in distribution
          warning: no previously-included files found matching 'aiohttp/*.html'
          no previously-included directories found matching 'docs/_build'
          adding license file 'LICENSE.txt'
          writing manifest file 'aiohttp.egg-info/SOURCES.txt'
          copying aiohttp/_cparser.pxd -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_find_header.pxd -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_headers.pxi -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_helpers.pyi -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_helpers.pyx -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_http_parser.pyx -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_http_writer.pyx -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/_websocket.pyx -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          copying aiohttp/py.typed -> build/lib.macosx-13-arm64-cpython-312/aiohttp
          creating build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_cparser.pxd.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_find_header.pxd.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_helpers.pyi.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_helpers.pyx.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_http_parser.pyx.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_http_writer.pyx.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/_websocket.pyx.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          copying aiohttp/.hash/hdrs.py.hash -> build/lib.macosx-13-arm64-cpython-312/aiohttp/.hash
          running build_ext
          building 'aiohttp._websocket' extension
          creating build/temp.macosx-13-arm64-cpython-312
          creating build/temp.macosx-13-arm64-cpython-312/aiohttp
          clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -I/Users/michaelvoet/.cache/pre-commit/repor0bcn38a/py_env-python3.12/include -I/opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c aiohttp/_websocket.c -o build/temp.macosx-13-arm64-cpython-312/aiohttp/_websocket.o
          aiohttp/_websocket.c:1475:17: warning: 'Py_OptimizeFlag' is deprecated [-Wdeprecated-declarations]
            if (unlikely(!Py_OptimizeFlag)) {
                          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/pydebug.h:13:1: note: 'Py_OptimizeFlag' has been explicitly marked deprecated here
          Py_DEPRECATED(3.12) PyAPI_DATA(int) Py_OptimizeFlag;
          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
          #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                               ^
          aiohttp/_websocket.c:2680:27: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
              return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
                                    ^
          aiohttp/_websocket.c:1118:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
          #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
              Py_DEPRECATED(3.12) uint64_t ma_version_tag;
              ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
          #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                               ^
          aiohttp/_websocket.c:2692:36: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
              return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
                                             ^
          aiohttp/_websocket.c:1118:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
          #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
              Py_DEPRECATED(3.12) uint64_t ma_version_tag;
              ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
          #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                               ^
          aiohttp/_websocket.c:2696:56: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
              if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
                                                                 ^
          aiohttp/_websocket.c:1118:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
          #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
              Py_DEPRECATED(3.12) uint64_t ma_version_tag;
              ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
          #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                               ^
          aiohttp/_websocket.c:2741:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
                  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
                  ^
          aiohttp/_websocket.c:1125:16: note: expanded from macro '__PYX_PY_DICT_LOOKUP_IF_MODIFIED'
              if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
                         ^
          aiohttp/_websocket.c:1118:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
          #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
              Py_DEPRECATED(3.12) uint64_t ma_version_tag;
              ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
          #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                               ^
          aiohttp/_websocket.c:2741:9: warning: 'ma_version_tag' is deprecated [-Wdeprecated-declarations]
                  __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
                  ^
          aiohttp/_websocket.c:1129:30: note: expanded from macro '__PYX_PY_DICT_LOOKUP_IF_MODIFIED'
                  __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
                                       ^
          aiohttp/_websocket.c:1118:65: note: expanded from macro '__PYX_GET_DICT_VERSION'
          #define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
                                                                          ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/cpython/dictobject.h:22:5: note: 'ma_version_tag' has been explicitly marked deprecated here
              Py_DEPRECATED(3.12) uint64_t ma_version_tag;
              ^
          /opt/homebrew/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/pyport.h:317:54: note: expanded from macro 'Py_DEPRECATED'
          #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                               ^
          aiohttp/_websocket.c:3042:55: error: no member named 'ob_digit' in 'struct _longobject'
                      const digit* digits = ((PyLongObject*)x)->ob_digit;
                                            ~~~~~~~~~~~~~~~~~~  ^
          aiohttp/_websocket.c:3097:55: error: no member named 'ob_digit' in 'struct _longobject'
                      const digit* digits = ((PyLongObject*)x)->ob_digit;
                                            ~~~~~~~~~~~~~~~~~~  ^
          aiohttp/_websocket.c:3238:55: error: no member named 'ob_digit' in 'struct _longobject'
                      const digit* digits = ((PyLongObject*)x)->ob_digit;
                                            ~~~~~~~~~~~~~~~~~~  ^
          aiohttp/_websocket.c:3293:55: error: no member named 'ob_digit' in 'struct _longobject'
                      const digit* digits = ((PyLongObject*)x)->ob_digit;
                                            ~~~~~~~~~~~~~~~~~~  ^
          aiohttp/_websocket.c:3744:47: error: no member named 'ob_digit' in 'struct _longobject'
              const digit* digits = ((PyLongObject*)b)->ob_digit;
                                    ~~~~~~~~~~~~~~~~~~  ^
          6 warnings and 5 errors generated.
          error: command '/usr/bin/clang' failed with exit code 1
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for aiohttp
    ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
```

**Desktop (please complete the following information):**
 - OS: macOS Ventura (13.5)
 - Checkov Version: 3.0.16
 - Python version: 3.11.6
 - Clang version: Clang 14.0.3 (clang-1403.0.22.14.1)]
 - Pre-commit version: 3.5.0

**Additional context**
Add any other context about the problem here (e.g. code snippets).



Discussion:

Resolving patch:
diff --git a/checkov/common/output/gitlab_sast.py b/checkov/common/output/gitlab_sast.py
--- a/checkov/common/output/gitlab_sast.py
+++ b/checkov/common/output/gitlab_sast.py
@@ -1,6 +1,6 @@
 from __future__ import annotations
 
-from datetime import datetime
+from datetime import datetime, timezone
 from typing import TYPE_CHECKING, Any
 from uuid import uuid4
 
@@ -37,7 +37,7 @@ def create_sast_json(self) -> dict[str, Any]:
         }
 
     def _create_scan(self) -> dict[str, Any]:
-        current_datetime = datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%S")
+        current_datetime = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S")
         scanner = {
             "id": "checkov",
             "name": "Checkov",
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -161,6 +161,7 @@ def run(self) -> None:
         "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: 3.11",
+        "Programming Language :: Python :: 3.12",
         "Topic :: Security",
         "Topic :: Software Development :: Build Tools",
         "Typing :: Typed",


Test patch:
diff --git a/tests/common/checks/test_base_check.py b/tests/common/checks/test_base_check.py
--- a/tests/common/checks/test_base_check.py
+++ b/tests/common/checks/test_base_check.py
@@ -1,7 +1,7 @@
 import os
 import unittest
 
-import mock
+from unittest import mock
 from parameterized import parameterized
 
 from checkov.common.checks.base_check import BaseCheck
@@ -96,7 +96,7 @@ def __init__(self):
             TestCheckUnknownSignature()
 
         self.assertIsInstance(context.exception, TypeError)
-        self.assertRegex(context.exception.args[0], r"Can't instantiate abstract class TestCheckUnknownSignature with abstract method(s)? scan_entity_conf")
+        self.assertRegex(context.exception.args[0], r"Can't instantiate abstract class TestCheckUnknownSignature")
 
     def test_details_reinitializing_after_execution(self):
         check = TestCheckDetails()
diff --git a/tests/common/output/test_spdx.py b/tests/common/output/test_spdx.py
--- a/tests/common/output/test_spdx.py
+++ b/tests/common/output/test_spdx.py
@@ -1,4 +1,6 @@
-from freezegun import freeze_time
+from datetime import datetime, timezone
+
+from time_machine import travel
 
 from checkov.common.bridgecrew.check_type import CheckType
 from checkov.common.output.extra_resource import ExtraResource
@@ -7,7 +9,7 @@
 from checkov.common.sca.output import create_report_cve_record
 
 
-@freeze_time("2022-12-24")
+@travel(datetime(2022, 12, 24, tzinfo=timezone.utc))
 def test_sca_package_output():
     # given
     rootless_file_path = "requirements.txt"
diff --git a/tests/common/test_resource_code_logger_filter.py b/tests/common/test_resource_code_logger_filter.py
--- a/tests/common/test_resource_code_logger_filter.py
+++ b/tests/common/test_resource_code_logger_filter.py
@@ -1,5 +1,5 @@
 import logging
-import mock
+from unittest import mock
 
 from checkov.common.resource_code_logger_filter import add_resource_code_filter_to_logger
 
diff --git a/tests/github/checks/test_python_policies.py b/tests/github/checks/test_python_policies.py
--- a/tests/github/checks/test_python_policies.py
+++ b/tests/github/checks/test_python_policies.py
@@ -3,7 +3,7 @@
 from pathlib import Path
 
 import pytest
-from freezegun import freeze_time
+from time_machine import travel
 
 from checkov.github.runner import Runner
 from checkov.runner_filter import RunnerFilter
@@ -45,7 +45,7 @@ def test_GithubRequire2Approvals():
     run_check(base_path=BASE_DIR / "branch_security", check="GithubRequire2Approvals")
 
 
-@freeze_time("2022-12-05")
+@travel("2022-12-05")
 def test_GithubDisallowInactiveBranch60Days():
     run_check(base_path=BASE_DIR / "branch_security", check="GithubDisallowInactiveBranch60Days")
 
diff --git a/tests/kustomize/test_runner.py b/tests/kustomize/test_runner.py
--- a/tests/kustomize/test_runner.py
+++ b/tests/kustomize/test_runner.py
@@ -1,7 +1,7 @@
 import os
-import mock
 import unittest
 from pathlib import Path
+from unittest import mock
 
 from checkov.common.bridgecrew.check_type import CheckType
 from checkov.common.bridgecrew.severities import Severities, BcSeverities
diff --git a/tests/kustomize/test_runner_image_referencer.py b/tests/kustomize/test_runner_image_referencer.py
--- a/tests/kustomize/test_runner_image_referencer.py
+++ b/tests/kustomize/test_runner_image_referencer.py
@@ -1,10 +1,9 @@
 from __future__ import annotations
 
 import os
-import sys
 from pathlib import Path
+from unittest import mock
 
-import mock
 import pytest
 from pytest_mock import MockerFixture
 
diff --git a/tests/sca_package/conftest.py b/tests/sca_package/conftest.py
--- a/tests/sca_package/conftest.py
+++ b/tests/sca_package/conftest.py
@@ -1,8 +1,8 @@
 import os
 from pathlib import Path
 from unittest import mock
+from unittest.mock import MagicMock
 
-from mock.mock import MagicMock
 from typing import Dict, Any, List
 from pytest_mock import MockerFixture
 
diff --git a/tests/sca_package/test_runner.py b/tests/sca_package/test_runner.py
--- a/tests/sca_package/test_runner.py
+++ b/tests/sca_package/test_runner.py
@@ -1,6 +1,6 @@
 from pathlib import Path
+from unittest.mock import MagicMock
 
-from mock.mock import MagicMock
 from packaging import version as packaging_version
 from pytest_mock import MockerFixture
 
@@ -38,7 +38,7 @@ def test_run(sca_package_report):
     assert cve_record is not None
     assert cve_record.bc_check_id == "BC_CVE_2020_29652"
     assert cve_record.check_id == "CKV_CVE_2020_29652"
-    assert cve_record.check_class == "mock.mock.MagicMock"  # not the real one
+    assert cve_record.check_class == "unittest.mock.MagicMock"  # not the real one
     assert cve_record.check_name == "SCA package scan"
     assert cve_record.check_result == {"result": CheckResult.FAILED}
     assert cve_record.code_block == [(0, "golang.org/x/crypto: v0.0.1")]
@@ -190,7 +190,7 @@ def test_prepare_and_scan(mocker: MockerFixture, scan_result):
 
     # then
     assert real_result is not None
-    assert runner._check_class == 'mock.mock.MagicMock'
+    assert runner._check_class == 'unittest.mock.MagicMock'
     assert runner._code_repo_path == EXAMPLES_DIR
 
 
diff --git a/tests/sca_package_2/conftest.py b/tests/sca_package_2/conftest.py
--- a/tests/sca_package_2/conftest.py
+++ b/tests/sca_package_2/conftest.py
@@ -1,12 +1,11 @@
 import os
 from pathlib import Path
 from unittest import mock
-
-from mock.mock import MagicMock
+from unittest.mock import MagicMock
 from typing import Dict, Any, List
-from pytest_mock import MockerFixture
 
 import pytest
+from pytest_mock import MockerFixture
 
 from checkov.common.bridgecrew.bc_source import SourceType
 from checkov.common.bridgecrew.platform_integration import BcPlatformIntegration, bc_integration
diff --git a/tests/sca_package_2/test_runner.py b/tests/sca_package_2/test_runner.py
--- a/tests/sca_package_2/test_runner.py
+++ b/tests/sca_package_2/test_runner.py
@@ -1,6 +1,6 @@
 import os
 from pathlib import Path
-from mock.mock import MagicMock
+from unittest.mock import MagicMock
 
 from pytest_mock import MockerFixture
 from packaging import version as packaging_version
@@ -144,7 +144,7 @@ def test_run(sca_package_2_report):
     assert cve_record is not None
     assert cve_record.bc_check_id == "BC_CVE_2020_29652"
     assert cve_record.check_id == "CKV_CVE_2020_29652"
-    assert cve_record.check_class == "mock.mock.MagicMock"  # not the real one
+    assert cve_record.check_class == "unittest.mock.MagicMock"  # not the real one
     assert cve_record.check_name == "SCA package scan"
     assert cve_record.check_result == {"result": CheckResult.FAILED}
     assert cve_record.code_block == [(0, "golang.org/x/crypto: v0.0.1")]
diff --git a/tests/secrets/test_secrets_verification.py b/tests/secrets/test_secrets_verification.py
--- a/tests/secrets/test_secrets_verification.py
+++ b/tests/secrets/test_secrets_verification.py
@@ -1,7 +1,8 @@
 from __future__ import annotations
+
 import os
+from unittest import mock
 
-import mock
 import pytest
 import responses
 
diff --git a/tests/secrets/test_secrets_verification_suppressions.py b/tests/secrets/test_secrets_verification_suppressions.py
--- a/tests/secrets/test_secrets_verification_suppressions.py
+++ b/tests/secrets/test_secrets_verification_suppressions.py
@@ -1,6 +1,6 @@
 import os
+from unittest import mock
 
-import mock
 import responses
 from checkov.common.models.enums import CheckResult
 
diff --git a/tests/terraform/checks/resource/gcp/test_GoogleComputeFirewallUnrestrictedIngress22.py b/tests/terraform/checks/resource/gcp/test_GoogleComputeFirewallUnrestrictedIngress22.py
--- a/tests/terraform/checks/resource/gcp/test_GoogleComputeFirewallUnrestrictedIngress22.py
+++ b/tests/terraform/checks/resource/gcp/test_GoogleComputeFirewallUnrestrictedIngress22.py
@@ -1,9 +1,6 @@
-import os
 import unittest
 from pathlib import Path
 
-import mock
-
 from checkov.runner_filter import RunnerFilter
 from checkov.terraform.checks.resource.gcp.GoogleComputeFirewallUnrestrictedIngress22 import check
 from checkov.terraform.runner import Runner
diff --git a/tests/terraform/graph/checks_infra/test_base_attribute_solver.py b/tests/terraform/graph/checks_infra/test_base_attribute_solver.py
--- a/tests/terraform/graph/checks_infra/test_base_attribute_solver.py
+++ b/tests/terraform/graph/checks_infra/test_base_attribute_solver.py
@@ -1,4 +1,5 @@
-from mock.mock import MagicMock
+from unittest.mock import MagicMock
+
 from pytest_mock import MockerFixture
 
 from checkov.common.checks_infra.solvers.attribute_solvers.base_attribute_solver import BaseAttributeSolver
@@ -29,8 +30,8 @@ def test_get_cached_jsonpath_statement(mocker: MockerFixture):
     assert len(BaseAttributeSolver.jsonpath_parsed_statement_cache) == 1
 
     # patch jsonpath_ng.parse to be able to check it was really not called again and the cache was properly used
-    with mocker.patch("checkov.common.checks_infra.solvers.attribute_solvers.base_attribute_solver.parse", side_effect=jsonpath_parse_mock):
-        solver_2._get_cached_jsonpath_statement(statement=statement)
+    mocker.patch("checkov.common.checks_infra.solvers.attribute_solvers.base_attribute_solver.parse", side_effect=jsonpath_parse_mock)
+    solver_2._get_cached_jsonpath_statement(statement=statement)
 
     # then
     assert len(BaseAttributeSolver.jsonpath_parsed_statement_cache) == 1
diff --git a/tests/terraform/graph/graph_builder/test_local_graph.py b/tests/terraform/graph/graph_builder/test_local_graph.py
--- a/tests/terraform/graph/graph_builder/test_local_graph.py
+++ b/tests/terraform/graph/graph_builder/test_local_graph.py
@@ -1,9 +1,7 @@
 import os
 from pathlib import Path
 from unittest import TestCase
-
-import mock
-import json
+from unittest import mock
 
 from checkov.common.graph.db_connectors.networkx.networkx_db_connector import NetworkxConnector
 from checkov.common.graph.graph_builder import EncryptionValues, EncryptionTypes
diff --git a/tests/terraform/runner/test_plan_runner.py b/tests/terraform/runner/test_plan_runner.py
--- a/tests/terraform/runner/test_plan_runner.py
+++ b/tests/terraform/runner/test_plan_runner.py
@@ -4,11 +4,9 @@
 from collections import defaultdict
 from copy import deepcopy
 from pathlib import Path
-
-
 from typing import Dict, Any
+from unittest import mock
 
-import mock
 from parameterized import parameterized_class
 
 # do not remove - prevents circular import