Repository: bridgecrewio/checkov

Issue:
Failed to get the checkov mappings and guidelines SSLError
**Describe the issue**
Explain what you expected to happen when checkov crashed.

Running checkov scans in an Azure DevOps YML pipeline, the step runs the following command:

```pwsh
pip install checkov'==2.1.48' && checkov --config-file=checkov.config.yml --output=junitxml
```

However, we are getting the following error

```
2022-10-10 08:28:17,134 [MainThread  ] [WARNI]  Failed to get the checkov mappings and guidelines from https://www.bridgecrew.cloud/api/v1/guidelines, error:
HTTPSConnectionPool(host='www.bridgecrew.cloud', port=443): Max retries exceeded with url: /api/v1/guidelines (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
```

**Examples**
Please share an example code sample (in the IaC of your choice) + the expected outcomes.

**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
LOG_LEVEL=DEBUG checkov ...
```

```
2022-10-10T08:27:50.8336335Z ##[section]Starting: run checkov scans
2022-10-10T08:27:50.8345999Z ==============================================================================
2022-10-10T08:27:50.8346303Z Task         : PowerShell
2022-10-10T08:27:50.8346515Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2022-10-10T08:27:50.8346726Z Version      : 2.210.0
2022-10-10T08:27:50.8346889Z Author       : Microsoft Corporation
2022-10-10T08:27:50.8347150Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2022-10-10T08:27:50.8347457Z ==============================================================================
2022-10-10T08:27:51.1036869Z Generating script.
2022-10-10T08:27:51.1072617Z ========================== Starting Command Output ===========================
2022-10-10T08:27:51.1080174Z [command]/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/home/vsts/work/_temp/939ee26c-f402-4ae2-8a46-f5e9767b6690.ps1'
2022-10-10T08:27:53.7504723Z Collecting checkov==2.0.913
2022-10-10T08:27:53.7765084Z   Downloading checkov-2.0.913-py3-none-any.whl (1.0 MB)
2022-10-10T08:27:53.9887728Z Requirement already satisfied: jsonschema~=3.0 in /usr/lib/python3/dist-packages (from checkov==2.0.913) (3.2.0)
2022-10-10T08:27:54.0307547Z Collecting tabulate
2022-10-10T08:27:54.0350644Z   Downloading tabulate-0.9.0-py3-none-any.whl (35 kB)
2022-10-10T08:27:54.1361647Z Collecting policyuniverse
2022-10-10T08:27:54.1423248Z   Downloading policyuniverse-1.5.0.20220613-py2.py3-none-any.whl (401 kB)
2022-10-10T08:27:54.1949073Z Requirement already satisfied: packaging in /usr/local/lib/python3.8/dist-packages (from checkov==2.0.913) (21.3)
2022-10-10T08:27:54.2289012Z Collecting aiodns
2022-10-10T08:27:54.2333606Z   Downloading aiodns-3.0.0-py3-none-any.whl (5.0 kB)
2022-10-10T08:27:54.2547981Z Requirement already satisfied: argcomplete in /usr/local/lib/python3.8/dist-packages (from checkov==2.0.913) (2.0.0)
2022-10-10T08:27:54.2992715Z Collecting prettytable>=3.0.0
2022-10-10T08:27:54.3039897Z   Downloading prettytable-3.4.1-py3-none-any.whl (26 kB)
2022-10-10T08:27:54.3910501Z Collecting cloudsplaining>=0.4.1
2022-10-10T08:27:54.3995382Z   Downloading cloudsplaining-0.5.0-py3-none-any.whl (1.7 MB)
2022-10-10T08:27:54.5299353Z Collecting jmespath
2022-10-10T08:27:54.5342225Z   Downloading jmespath-1.0.1-py3-none-any.whl (20 kB)
2022-10-10T08:27:54.5888908Z Collecting deep-merge
2022-10-10T08:27:54.5934374Z   Downloading deep_merge-0.0.4-py3-none-any.whl (5.1 kB)
2022-10-10T08:27:54.6425673Z Collecting aiomultiprocess
2022-10-10T08:27:54.6480292Z   Downloading aiomultiprocess-0.9.0-py3-none-any.whl (17 kB)
2022-10-10T08:27:54.7165046Z Collecting detect-secrets
2022-10-10T08:27:54.7223702Z   Downloading detect_secrets-1.4.0-py3-none-any.whl (116 kB)
2022-10-10T08:27:54.8260256Z Collecting networkx
2022-10-10T08:27:54.8269319Z   Downloading networkx-2.8.7-py3-none-any.whl (2.0 MB)
2022-10-10T08:27:55.0473628Z Collecting configargparse
2022-10-10T08:27:55.0513422Z   Downloading ConfigArgParse-1.5.3-py3-none-any.whl (20 kB)
2022-10-10T08:27:55.1226996Z Collecting bc-python-hcl2==0.3.30
2022-10-10T08:27:55.1278742Z   Downloading bc_python_hcl2-0.3.30-py3-none-any.whl (49 kB)
2022-10-10T08:27:55.1803174Z Collecting termcolor
2022-10-10T08:27:55.1845732Z   Downloading termcolor-2.0.1-py3-none-any.whl (5.4 kB)
2022-10-10T08:27:55.2355733Z Collecting jsonpath-ng
2022-10-10T08:27:55.2404368Z   Downloading jsonpath_ng-1.5.3-py3-none-any.whl (29 kB)
2022-10-10T08:27:55.3030001Z Collecting semantic-version
2022-10-10T08:27:55.3068142Z   Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
2022-10-10T08:27:55.4126514Z Collecting pyyaml>=5.4.1
2022-10-10T08:27:55.4178775Z   Downloading PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (701 kB)
2022-10-10T08:27:55.5207980Z Collecting GitPython
2022-10-10T08:27:55.5247798Z   Downloading GitPython-3.1.28-py3-none-any.whl (182 kB)
2022-10-10T08:27:55.6065056Z Collecting cachetools
2022-10-10T08:27:55.6111931Z   Downloading cachetools-5.2.0-py3-none-any.whl (9.3 kB)
2022-10-10T08:27:55.6650783Z Collecting update-checker
2022-10-10T08:27:55.6699609Z   Downloading update_checker-0.18.0-py3-none-any.whl (7.0 kB)
2022-10-10T08:27:56.3394721Z Collecting boto3>=1.17
2022-10-10T08:27:56.3432024Z   Downloading boto3-1.24.89-py3-none-any.whl (132 kB)
2022-10-10T08:27:56.4136125Z Collecting dpath<2,>=1.5.0
2022-10-10T08:27:56.4183719Z   Downloading dpath-1.5.0.tar.gz (17 kB)
2022-10-10T08:27:57.4545009Z Collecting aiohttp
2022-10-10T08:27:57.4594679Z   Downloading aiohttp-3.8.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
2022-10-10T08:27:57.5980392Z Collecting cyclonedx-python-lib<1.0.0,>=0.11.0
2022-10-10T08:27:57.6043854Z   Downloading cyclonedx_python_lib-0.12.3-py3-none-any.whl (128 kB)
2022-10-10T08:27:57.6668818Z Collecting junit-xml>=1.9
2022-10-10T08:27:57.6705341Z   Downloading junit_xml-1.9-py2.py3-none-any.whl (7.1 kB)
2022-10-10T08:27:57.7224692Z Collecting click>=8.0.0
2022-10-10T08:27:57.7269073Z   Downloading click-8.1.3-py3-none-any.whl (96 kB)
2022-10-10T08:27:57.7398111Z Requirement already satisfied: colorama in /usr/lib/python3/dist-packages (from checkov==2.0.913) (0.4.3)
2022-10-10T08:27:57.8698405Z Collecting tqdm
2022-10-10T08:27:57.8740592Z   Downloading tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
2022-10-10T08:27:57.9609450Z Collecting dockerfile-parse
2022-10-10T08:27:57.9659180Z   Downloading dockerfile_parse-1.2.0-py2.py3-none-any.whl (14 kB)
2022-10-10T08:27:58.0253159Z Collecting typing-extensions
2022-10-10T08:27:58.0309713Z   Downloading typing_extensions-4.4.0-py3-none-any.whl (26 kB)
2022-10-10T08:27:58.1154326Z Collecting docker
2022-10-10T08:27:58.1233908Z   Downloading docker-6.0.0-py3-none-any.whl (147 kB)
2022-10-10T08:27:58.1595446Z Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.8/dist-packages (from packaging->checkov==2.0.913) (3.0.9)
2022-10-10T08:27:58.2632777Z Collecting pycares>=4.0.0
2022-10-10T08:27:58.2686284Z   Downloading pycares-4.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (289 kB)
2022-10-10T08:27:58.3341784Z Collecting wcwidth
2022-10-10T08:27:58.3388314Z   Downloading wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
2022-10-10T08:27:59.3545025Z Collecting botocore
2022-10-10T08:27:59.3589852Z   Downloading botocore-1.27.89-py3-none-any.whl (9.2 MB)
2022-10-10T08:27:59.9864266Z Collecting markdown
2022-10-10T08:27:59.9909125Z   Downloading Markdown-3.4.1-py3-none-any.whl (93 kB)
2022-10-10T08:28:00.0572728Z Collecting schema
2022-10-10T08:28:00.0613131Z   Downloading schema-0.7.5-py2.py3-none-any.whl (17 kB)
2022-10-10T08:28:00.1478378Z Collecting policy-sentry>=0.11.3
2022-10-10T08:28:00.2080611Z   Downloading policy_sentry-0.12.4-py3-none-any.whl (2.8 MB)
2022-10-10T08:28:00.4177888Z Requirement already satisfied: jinja2 in /usr/lib/python3/dist-packages (from cloudsplaining>=0.4.1->checkov==2.0.913) (2.10.1)
2022-10-10T08:28:00.4557486Z Collecting cached-property
2022-10-10T08:28:00.4604276Z   Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
2022-10-10T08:28:00.5167227Z Collecting click-option-group
2022-10-10T08:28:00.5225207Z   Downloading click_option_group-0.5.3-py3-none-any.whl (11 kB)
2022-10-10T08:28:00.5498956Z Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from detect-secrets->checkov==2.0.913) (2.22.0)
2022-10-10T08:28:00.5924617Z Collecting lark-parser<0.11.0,>=0.10.0
2022-10-10T08:28:00.5980192Z   Downloading lark-parser-0.10.1.tar.gz (216 kB)
2022-10-10T08:28:00.8840141Z Collecting ply
2022-10-10T08:28:00.8880703Z   Downloading ply-3.11-py2.py3-none-any.whl (49 kB)
2022-10-10T08:28:00.9549201Z Collecting decorator
2022-10-10T08:28:00.9588933Z   Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
2022-10-10T08:28:00.9802469Z Requirement already satisfied: six in /usr/lib/python3/dist-packages (from jsonpath-ng->checkov==2.0.913) (1.14.0)
2022-10-10T08:28:01.0143229Z Collecting gitdb<5,>=4.0.1
2022-10-10T08:28:01.0188573Z   Downloading gitdb-4.0.9-py3-none-any.whl (63 kB)
2022-10-10T08:28:01.0833019Z Collecting s3transfer<0.7.0,>=0.6.0
2022-10-10T08:28:01.0880899Z   Downloading s3transfer-0.6.0-py3-none-any.whl (79 kB)
2022-10-10T08:28:01.1153946Z Requirement already satisfied: attrs>=17.3.0 in /usr/lib/python3/dist-packages (from aiohttp->checkov==2.0.913) (19.3.0)
2022-10-10T08:28:01.1503026Z Collecting aiosignal>=1.1.2
2022-10-10T08:28:01.1546485Z   Downloading aiosignal-1.2.0-py3-none-any.whl (8.2 kB)
2022-10-10T08:28:01.2121605Z Collecting async-timeout<5.0,>=4.0.0a3
2022-10-10T08:28:01.2167489Z   Downloading async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
2022-10-10T08:28:01.3513390Z Collecting frozenlist>=1.1.1
2022-10-10T08:28:01.3558180Z   Downloading frozenlist-1.3.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (161 kB)
2022-10-10T08:28:01.4578023Z Collecting charset-normalizer<3.0,>=2.0
2022-10-10T08:28:01.4624297Z   Downloading charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
2022-10-10T08:28:01.7736860Z Collecting yarl<2.0,>=1.0
2022-10-10T08:28:01.7780508Z   Downloading yarl-1.8.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (262 kB)
2022-10-10T08:28:02.2834475Z Collecting multidict<7.0,>=4.5
2022-10-10T08:28:02.2877476Z   Downloading multidict-6.0.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (121 kB)
2022-10-10T08:28:02.3603351Z Collecting types-setuptools>=57.0.0
2022-10-10T08:28:02.3660734Z   Downloading types_setuptools-65.4.0.0-py3-none-any.whl (49 kB)
2022-10-10T08:28:02.4397423Z Collecting packageurl-python>=0.9
2022-10-10T08:28:02.4447825Z   Downloading packageurl_python-0.10.3-py3-none-any.whl (26 kB)
2022-10-10T08:28:02.8200514Z Collecting setuptools>=47.0.0
2022-10-10T08:28:02.8250328Z   Downloading setuptools-65.4.1-py3-none-any.whl (1.2 MB)
2022-10-10T08:28:02.9566675Z Collecting toml<0.11.0,>=0.10.0
2022-10-10T08:28:02.9636751Z   Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
2022-10-10T08:28:03.0339674Z Collecting types-toml<0.11.0,>=0.10.0
2022-10-10T08:28:03.0386113Z   Downloading types_toml-0.10.8-py3-none-any.whl (4.5 kB)
2022-10-10T08:28:03.1174073Z Collecting urllib3>=1.26.0
2022-10-10T08:28:03.1219880Z   Downloading urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
2022-10-10T08:28:03.2076075Z Collecting websocket-client>=0.32.0
2022-10-10T08:28:03.2121779Z   Downloading websocket_client-1.4.1-py3-none-any.whl (55 kB)
2022-10-10T08:28:03.4860156Z Collecting cffi>=1.5.0
2022-10-10T08:28:03.4904184Z   Downloading cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (442 kB)
2022-10-10T08:28:03.5726594Z Collecting python-dateutil<3.0.0,>=2.1
2022-10-10T08:28:03.5773060Z   Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
2022-10-10T08:28:03.6808625Z Collecting importlib-metadata>=4.4; python_version < "3.10"
2022-10-10T08:28:03.6837200Z   Downloading importlib_metadata-5.0.0-py3-none-any.whl (21 kB)
2022-10-10T08:28:03.7384582Z Collecting contextlib2>=0.5.5
2022-10-10T08:28:03.7439319Z   Downloading contextlib2-21.6.0-py2.py3-none-any.whl (13 kB)
2022-10-10T08:28:03.8082347Z Collecting beautifulsoup4
2022-10-10T08:28:03.8128723Z   Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
2022-10-10T08:28:03.8740801Z Collecting smmap<6,>=3.0.1
2022-10-10T08:28:03.8788655Z   Downloading smmap-5.0.0-py3-none-any.whl (24 kB)
2022-10-10T08:28:03.9015954Z Requirement already satisfied: idna>=2.0 in /usr/lib/python3/dist-packages (from yarl<2.0,>=1.0->aiohttp->checkov==2.0.913) (2.8)
2022-10-10T08:28:03.9318130Z Collecting pycparser
2022-10-10T08:28:03.9357562Z   Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
2022-10-10T08:28:03.9631964Z Requirement already satisfied: zipp>=0.5 in /usr/lib/python3/dist-packages (from importlib-metadata>=4.4; python_version < "3.10"->markdown->cloudsplaining>=0.4.1->checkov==2.0.913) (1.0.0)
2022-10-10T08:28:04.0166222Z Collecting soupsieve>1.2
2022-10-10T08:28:04.0207556Z   Downloading soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
2022-10-10T08:28:04.0643953Z Building wheels for collected packages: dpath, lark-parser
2022-10-10T08:28:04.0647655Z   Building wheel for dpath (setup.py): started
2022-10-10T08:28:04.3762792Z   Building wheel for dpath (setup.py): finished with status 'done'
2022-10-10T08:28:04.3764077Z   Created wheel for dpath: filename=dpath-1.5.0-py3-none-any.whl size=14590 sha256=af055f4456f2b91704fd77e429b78e763dd7af7ca9a6827b6e156d82b1cede2d
2022-10-10T08:28:04.3764798Z   Stored in directory: /home/vsts/.cache/pip/wheels/62/70/49/400c325d1db02901ad862338304643ea65e8a68c84e36d9125
2022-10-10T08:28:04.3765485Z   Building wheel for lark-parser (setup.py): started
2022-10-10T08:28:04.6360863Z   Building wheel for lark-parser (setup.py): finished with status 'done'
2022-10-10T08:28:04.6371397Z   Created wheel for lark-parser: filename=lark_parser-0.10.1-py2.py3-none-any.whl size=90143 sha256=b38302a02aedd7fc70cf94929641bc70ab58a30435724a9dbdeaf484c24937e3
2022-10-10T08:28:04.6372032Z   Stored in directory: /home/vsts/.cache/pip/wheels/ae/0b/45/2832f39dbea5db40ca52768cd0d2f9e2ae1be26b7d8493c50b
2022-10-10T08:28:04.6379298Z Successfully built dpath lark-parser
2022-10-10T08:28:04.9591298Z ERROR: launchpadlib 1.10.13 requires testresources, which is not installed.
2022-10-10T08:28:04.9592365Z ERROR: docker 6.0.0 has requirement requests>=2.26.0, but you'll have requests 2.22.0 which is incompatible.
2022-10-10T08:28:04.9594447Z Installing collected packages: tabulate, policyuniverse, pycparser, cffi, pycares, aiodns, wcwidth, prettytable, python-dateutil, urllib3, jmespath, botocore, s3transfer, boto3, importlib-metadata, markdown, contextlib2, schema, click, soupsieve, beautifulsoup4, pyyaml, policy-sentry, cached-property, click-option-group, cloudsplaining, deep-merge, aiomultiprocess, detect-secrets, networkx, configargparse, lark-parser, bc-python-hcl2, termcolor, ply, decorator, jsonpath-ng, semantic-version, smmap, gitdb, GitPython, cachetools, update-checker, dpath, frozenlist, aiosignal, async-timeout, charset-normalizer, multidict, yarl, aiohttp, types-setuptools, packageurl-python, setuptools, toml, types-toml, cyclonedx-python-lib, junit-xml, tqdm, dockerfile-parse, typing-extensions, websocket-client, docker, checkov
2022-10-10T08:28:10.4548481Z Successfully installed GitPython-3.1.28 aiodns-3.0.0 aiohttp-3.8.3 aiomultiprocess-0.9.0 aiosignal-1.2.0 async-timeout-4.0.2 bc-python-hcl2-0.3.30 beautifulsoup4-4.11.1 boto3-1.24.89 botocore-1.27.89 cached-property-1.5.2 cachetools-5.2.0 cffi-1.15.1 charset-normalizer-2.1.1 checkov-2.0.913 click-8.1.3 click-option-group-0.5.3 cloudsplaining-0.5.0 configargparse-1.5.3 contextlib2-21.6.0 cyclonedx-python-lib-0.12.3 decorator-5.1.1 deep-merge-0.0.4 detect-secrets-1.4.0 docker-6.0.0 dockerfile-parse-1.2.0 dpath-1.5.0 frozenlist-1.3.1 gitdb-4.0.9 importlib-metadata-5.0.0 jmespath-1.0.1 jsonpath-ng-1.5.3 junit-xml-1.9 lark-parser-0.10.1 markdown-3.4.1 multidict-6.0.2 networkx-2.8.7 packageurl-python-0.10.3 ply-3.11 policy-sentry-0.12.4 policyuniverse-1.5.0.20220613 prettytable-3.4.1 pycares-4.2.2 pycparser-2.21 python-dateutil-2.8.2 pyyaml-6.0 s3transfer-0.6.0 schema-0.7.5 semantic-version-2.10.0 setuptools-65.4.1 smmap-5.0.0 soupsieve-2.3.2.post1 tabulate-0.9.0 termcolor-2.0.1 toml-0.10.2 tqdm-4.64.1 types-setuptools-65.4.0.0 types-toml-0.10.8 typing-extensions-4.4.0 update-checker-0.18.0 urllib3-1.26.12 wcwidth-0.2.5 websocket-client-1.4.1 yarl-1.8.1
2022-10-10T08:28:12.2395770Z /usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
2022-10-10T08:28:12.2397087Z   warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
2022-10-10T08:28:17.1346488Z 2022-10-10 08:28:17,134 [MainThread  ] [WARNI]  Failed to get the checkov mappings and guidelines from https://www.bridgecrew.cloud/api/v1/guidelines, error:
2022-10-10T08:28:17.1347993Z HTTPSConnectionPool(host='www.bridgecrew.cloud', port=443): Max retries exceeded with url: /api/v1/guidelines (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
2022-10-10T08:28:17.9623479Z ##[error]PowerShell exited with code '1'.
2022-10-10T08:28:17.9671770Z ##[section]Finishing: run checkov scans
```

**Desktop (please complete the following information):**
 - OS: Ubuntu 20.04.5
 - Checkov Version [e.g. 22]: 2.1.48

**Additional context**
Add any other context about the problem here (e.g. code snippets).




Discussion:
hey @StickNitro thanks for reaching out. looking at the provided logs I can see you installed a very old version `checkov==2.0.913` which we don't support anymore. So, this could be a reason why it fails or an other issue is quite often to old ca-certificates on the host machine.
I am also experiencing this issue with version `2.2.12` (Python version `3.10.4`).

However, using Python I can get the URL that is failing without issue.

```python
>>> import requests
>>> requests.get('https://www.bridgecrew.cloud/api/v1/guidelines')
<Response [200]>
```

Here is the error I see when using `checkov`.

```shell
foo@bar:~/cloudformation$ checkov --directory . --framework cloudformation
2022-11-01 08:52:15,562 [MainThread  ] [WARNI]  Failed to get the checkov mappings and guidelines from https://www.bridgecrew.cloud/api/v1/guidelines
Traceback (most recent call last):
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/contrib/pyopenssl.py", line 488, in wrap_socket
    cnx.do_handshake()
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1894, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1632, in _raise_ssl_error
    _raise_current_error()
  File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 57, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', '', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 978, in _validate_conn
    conn.connect()
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connection.py", line 362, in connect
    self.sock = ssl_wrap_socket(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/util/ssl_.py", line 386, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/contrib/pyopenssl.py", line 494, in wrap_socket
    raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/foo/.local/lib/python3.10/site-packages/checkov/common/bridgecrew/platform_integration.py", line 664, in get_public_run_config
    request = self.http.request("GET", self.guidelines_api_url, headers=headers)  # type:ignore[no-untyped-call]
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/request.py", line 75, in request
    return self.request_encode_url(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/request.py", line 97, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/poolmanager.py", line 336, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 754, in urlopen
    return self.urlopen(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 754, in urlopen
    return self.urlopen(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 754, in urlopen
    return self.urlopen(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 726, in urlopen
    retries = retries.increment(
  File "/home/foo/.local/lib/python3.10/site-packages/urllib3/util/retry.py", line 446, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.bridgecrew.cloud', port=443): Max retries exceeded with url: /api/v1/guidelines (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', '', 'certificate verify failed')])")))
```
We are observing that issue with 2.2.17 but we are running it in an Azure DevOps Pipeline

```
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
  warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
2022-11-03 14:17:34,794 [MainThread  ] [WARNI]  Failed to get the checkov mappings and guidelines from https://www.bridgecrew.cloud/api/v1/guidelines
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/urllib3/contrib/pyopenssl.py", line 506, in wrap_socket
    cnx.do_handshake()
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
    self._raise_ssl_error(self._ssl, result)
  File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
    _raise_current_error()
  File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
    raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 386, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 1042, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 414, in connect
    self.sock = ssl_wrap_socket(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "/usr/local/lib/python3.8/dist-packages/urllib3/contrib/pyopenssl.py", line 512, in wrap_socket
    raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/checkov/common/bridgecrew/platform_integration.py", line 664, in get_public_run_config
    request = self.http.request("GET", self.guidelines_api_url, headers=headers)  # type:ignore[no-untyped-call]
  File "/usr/local/lib/python3.8/dist-packages/urllib3/request.py", line 74, in request
    return self.request_encode_url(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/request.py", line 96, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.8/dist-packages/urllib3/poolmanager.py", line 376, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 815, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 815, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 815, in urlopen
    return self.urlopen(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.bridgecrew.cloud', port=443): Max retries exceeded with url: /api/v1/guidelines (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))

```
hey everyone, the problem is you have an old `requests` package preinstalled, that's why it breaks.
```shell
pip install --upgrade requests
```
or whatever you use to install python packages and your good to go. I will add a lower bound to the requests package, so you will get the error directly during install.
@gruebel, thanks for posting, that has solved the issue.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -38,7 +38,7 @@
         "deep-merge",
         "tabulate",
         "colorama",
-        "termcolor<=2.0.1",
+        "termcolor",
         "junit-xml>=1.9",
         "dpath<2,>=1.5.0",
         "pyyaml>=5.4.1",
@@ -73,6 +73,7 @@
         "pyston-autoload==2.3.5; python_version < '3.11' and (sys_platform == 'linux' or sys_platform == 'darwin') and platform_machine == 'x86_64'",
         "pyston==2.3.5; python_version < '3.11' and (sys_platform == 'linux' or sys_platform == 'darwin') and platform_machine == 'x86_64'",
         "schema",
+        "requests>=2.26.0",
     ],
     dependency_links=[],  # keep it empty, needed for pipenv-setup
     license="Apache License 2.0",


Test patch:
diff --git a/tests/sca_image/test_output_reports.py b/tests/sca_image/test_output_reports.py
--- a/tests/sca_image/test_output_reports.py
+++ b/tests/sca_image/test_output_reports.py
@@ -3,6 +3,8 @@
 import xml.dom.minidom
 from typing import List
 
+from pytest_mock import MockerFixture
+
 from checkov.common.bridgecrew.check_type import CheckType
 from checkov.common.output.csv import CSVSBOM
 from checkov.common.output.cyclonedx import CycloneDX
@@ -29,28 +31,67 @@ def test_console_output(sca_image_report):
 
     # then
     assert console_output == "\n".join(
-        ['\x1b[34msca_image scan results:', '\x1b[0m\x1b[36m', 'Passed checks: 1, Failed checks: 3, Skipped checks: 1',
-         '',
-         '\x1b[0m\t/path/to/Dockerfile (sha256:123456) - CVEs Summary:',
-         '\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐',
-         '\t│ Total CVEs: 3      │ critical: 0        │ high: 0            │ medium: 1          │ low: 1             │ skipped: 1         │',
-         '\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤',
-         '\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤',
-         '\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │',
-         '\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤',
-         '\t│ perl               │ CVE-2020-16156     │ medium             │ 5.34.0-3ubuntu1    │ N/A                │ N/A                │',
-         '\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤',
-         '\t│ pcre2              │ CVE-2022-1587      │ low                │ 10.39-3build1      │ N/A                │ N/A                │',
-         '\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘',
-         '',
-         '\t/path/to/Dockerfile (sha256:123456) - Licenses Statuses:',
-         '\t┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┬─────────────────────────┐',
-         '\t│ Package name           │ Package version        │ Policy ID              │ License                │ Status                  │',
-         '\t├────────────────────────┼────────────────────────┼────────────────────────┼────────────────────────┼─────────────────────────┤',
-         '\t│ perl                   │ 5.34.0-3ubuntu1        │ BC_LIC_1               │ Apache-2.0-Fake        │ FAILED                  │',
-         '\t└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴─────────────────────────┘',
-         '']
+        [
+            "sca_image scan results:",
+            "",
+            "Passed checks: 1, Failed checks: 3, Skipped checks: 1",
+            "",
+            "\t/path/to/Dockerfile (sha256:123456) - CVEs Summary:",
+            "\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐",
+            "\t│ Total CVEs: 3      │ critical: 0        │ high: 0            │ medium: 1          │ low: 1             │ skipped: 1         │",
+            "\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤",
+            "\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤",
+            "\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ perl               │ CVE-2020-16156     │ medium             │ 5.34.0-3ubuntu1    │ N/A                │ N/A                │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ pcre2              │ CVE-2022-1587      │ low                │ 10.39-3build1      │ N/A                │ N/A                │",
+            "\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘",
+            "",
+            "\t/path/to/Dockerfile (sha256:123456) - Licenses Statuses:",
+            "\t┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┬─────────────────────────┐",
+            "\t│ Package name           │ Package version        │ Policy ID              │ License                │ Status                  │",
+            "\t├────────────────────────┼────────────────────────┼────────────────────────┼────────────────────────┼─────────────────────────┤",
+            "\t│ perl                   │ 5.34.0-3ubuntu1        │ BC_LIC_1               │ Apache-2.0-Fake        │ FAILED                  │",
+            "\t└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴─────────────────────────┘",
+            "",
+        ]
+    )
+
+
+def test_console_output_in_tty(mocker: MockerFixture, sca_image_report):
+    # simulate a tty call by enforcing color
+    mocker.patch.dict(os.environ, {"FORCE_COLOR": "True"})
 
+    console_output = sca_image_report.print_console(False, False, None, None, False)
+
+    # then
+    assert console_output == "\n".join(
+        [
+            "\x1b[34msca_image scan results:",
+            "\x1b[0m\x1b[36m",
+            "Passed checks: 1, Failed checks: 3, Skipped checks: 1",
+            "",
+            "\x1b[0m\t/path/to/Dockerfile (sha256:123456) - CVEs Summary:",
+            "\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐",
+            "\t│ Total CVEs: 3      │ critical: 0        │ high: 0            │ medium: 1          │ low: 1             │ skipped: 1         │",
+            "\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤",
+            "\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤",
+            "\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ perl               │ CVE-2020-16156     │ medium             │ 5.34.0-3ubuntu1    │ N/A                │ N/A                │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ pcre2              │ CVE-2022-1587      │ low                │ 10.39-3build1      │ N/A                │ N/A                │",
+            "\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘",
+            "",
+            "\t/path/to/Dockerfile (sha256:123456) - Licenses Statuses:",
+            "\t┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┬─────────────────────────┐",
+            "\t│ Package name           │ Package version        │ Policy ID              │ License                │ Status                  │",
+            "\t├────────────────────────┼────────────────────────┼────────────────────────┼────────────────────────┼─────────────────────────┤",
+            "\t│ perl                   │ 5.34.0-3ubuntu1        │ BC_LIC_1               │ Apache-2.0-Fake        │ FAILED                  │",
+            "\t└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴─────────────────────────┘",
+            "",
+        ]
     )
 
 
diff --git a/tests/sca_package/test_output_reports.py b/tests/sca_package/test_output_reports.py
--- a/tests/sca_package/test_output_reports.py
+++ b/tests/sca_package/test_output_reports.py
@@ -4,6 +4,8 @@
 from pathlib import Path
 from typing import List
 
+from pytest_mock import MockerFixture
+
 from checkov.common.bridgecrew.check_type import CheckType
 from checkov.common.output.csv import CSVSBOM, FILE_NAME_OSS_PACKAGES
 from checkov.common.output.cyclonedx import CycloneDX
@@ -30,48 +32,108 @@ def test_console_output(sca_package_report):
 
     # then
     assert console_output == "\n".join(
-        ['\x1b[34msca_package scan results:',
-         '\x1b[0m\x1b[36m', 'Failed checks: 9, Skipped checks: 0',
-         '',
-         '\x1b[0m\t/path/to/requirements.txt - CVEs Summary:',
-         '\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐',
-         '\t│ Total CVEs: 6      │ critical: 1        │ high: 3            │ medium: 2          │ low: 0             │ skipped: 0         │',
-         '\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤',
-         '\t│ To fix 6/6 CVEs, go to https://www.bridgecrew.cloud/                                                                        │',
-         '\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤',
-         '\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │',
-         '\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤',
-         '\t│ flask              │ CVE-2019-1010083   │ high               │ 0.6                │ 1.0                │ 1.0                │',
-         '\t│                    │ CVE-2018-1000656   │ high               │                    │ 0.12.3             │                    │',
-         '\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤',
-         '\t│ django             │ CVE-2019-19844     │ critical           │ 1.2                │ 1.11.27            │ 2.2.24             │',
-         '\t│                    │ CVE-2016-7401      │ high               │                    │ 1.8.15             │                    │',
-         '\t│                    │ CVE-2016-6186      │ medium             │                    │ 1.8.14             │                    │',
-         '\t│                    │ CVE-2021-33203     │ medium             │                    │ 2.2.24             │                    │',
-         '\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘',
-         '',
-         '\t/path/to/requirements.txt - Licenses Statuses:',
-         '\t┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┬─────────────────────────┐',
-         '\t│ Package name           │ Package version        │ Policy ID              │ License                │ Status                  │',
-         '\t├────────────────────────┼────────────────────────┼────────────────────────┼────────────────────────┼─────────────────────────┤',
-         '\t│ flask                  │ 0.6                    │ BC_LIC_1               │ DUMMY_OTHER_LICENSE    │ FAILED                  │',
-         '\t└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴─────────────────────────┘',
-         '',
-         '\t/path/to/go.sum - CVEs Summary:',
-         '\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐',
-         '\t│ Total CVEs: 2      │ critical: 0        │ high: 2            │ medium: 0          │ low: 0             │ skipped: 0         │',
-         '\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤',
-         '\t│ To fix 2/2 CVEs, go to https://www.bridgecrew.cloud/                                                                        │',
-         '\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤',
-         '\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │',
-         '\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤',
-         '\t│ golang.org/x/crypt │ CVE-2020-29652     │ high               │ v0.0.1             │ 0.0.2              │ 0.0.2              │',
-         '\t│ o                  │                    │                    │                    │                    │                    │',
-         '\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤',
-         '\t│ github.com/dgrijal │ CVE-2020-26160     │ high               │ v3.2.0             │ 4.0.0rc1           │ 4.0.0rc1           │',
-         '\t│ va/jwt-go          │                    │                    │                    │                    │                    │',
-         '\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘',
-         ''])
+        [
+            "sca_package scan results:",
+            "",
+            "Failed checks: 9, Skipped checks: 0",
+            "",
+            "\t/path/to/requirements.txt - CVEs Summary:",
+            "\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐",
+            "\t│ Total CVEs: 6      │ critical: 1        │ high: 3            │ medium: 2          │ low: 0             │ skipped: 0         │",
+            "\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤",
+            "\t│ To fix 6/6 CVEs, go to https://www.bridgecrew.cloud/                                                                        │",
+            "\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤",
+            "\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ flask              │ CVE-2019-1010083   │ high               │ 0.6                │ 1.0                │ 1.0                │",
+            "\t│                    │ CVE-2018-1000656   │ high               │                    │ 0.12.3             │                    │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ django             │ CVE-2019-19844     │ critical           │ 1.2                │ 1.11.27            │ 2.2.24             │",
+            "\t│                    │ CVE-2016-7401      │ high               │                    │ 1.8.15             │                    │",
+            "\t│                    │ CVE-2016-6186      │ medium             │                    │ 1.8.14             │                    │",
+            "\t│                    │ CVE-2021-33203     │ medium             │                    │ 2.2.24             │                    │",
+            "\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘",
+            "",
+            "\t/path/to/requirements.txt - Licenses Statuses:",
+            "\t┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┬─────────────────────────┐",
+            "\t│ Package name           │ Package version        │ Policy ID              │ License                │ Status                  │",
+            "\t├────────────────────────┼────────────────────────┼────────────────────────┼────────────────────────┼─────────────────────────┤",
+            "\t│ flask                  │ 0.6                    │ BC_LIC_1               │ DUMMY_OTHER_LICENSE    │ FAILED                  │",
+            "\t└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴─────────────────────────┘",
+            "",
+            "\t/path/to/go.sum - CVEs Summary:",
+            "\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐",
+            "\t│ Total CVEs: 2      │ critical: 0        │ high: 2            │ medium: 0          │ low: 0             │ skipped: 0         │",
+            "\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤",
+            "\t│ To fix 2/2 CVEs, go to https://www.bridgecrew.cloud/                                                                        │",
+            "\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤",
+            "\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ golang.org/x/crypt │ CVE-2020-29652     │ high               │ v0.0.1             │ 0.0.2              │ 0.0.2              │",
+            "\t│ o                  │                    │                    │                    │                    │                    │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ github.com/dgrijal │ CVE-2020-26160     │ high               │ v3.2.0             │ 4.0.0rc1           │ 4.0.0rc1           │",
+            "\t│ va/jwt-go          │                    │                    │                    │                    │                    │",
+            "\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘",
+            "",
+        ]
+    )
+
+
+def test_console_output_in_tty(mocker: MockerFixture, sca_package_report):
+    # simulate a tty call by enforcing color
+    mocker.patch.dict(os.environ, {"FORCE_COLOR": "True"})
+
+    console_output = sca_package_report.print_console(False, False, None, None, False)
+
+    # then
+    assert console_output == "\n".join(
+        [
+            "\x1b[34msca_package scan results:",
+            "\x1b[0m\x1b[36m",
+            "Failed checks: 9, Skipped checks: 0",
+            "",
+            "\x1b[0m\t/path/to/requirements.txt - CVEs Summary:",
+            "\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐",
+            "\t│ Total CVEs: 6      │ critical: 1        │ high: 3            │ medium: 2          │ low: 0             │ skipped: 0         │",
+            "\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤",
+            "\t│ To fix 6/6 CVEs, go to https://www.bridgecrew.cloud/                                                                        │",
+            "\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤",
+            "\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ flask              │ CVE-2019-1010083   │ high               │ 0.6                │ 1.0                │ 1.0                │",
+            "\t│                    │ CVE-2018-1000656   │ high               │                    │ 0.12.3             │                    │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ django             │ CVE-2019-19844     │ critical           │ 1.2                │ 1.11.27            │ 2.2.24             │",
+            "\t│                    │ CVE-2016-7401      │ high               │                    │ 1.8.15             │                    │",
+            "\t│                    │ CVE-2016-6186      │ medium             │                    │ 1.8.14             │                    │",
+            "\t│                    │ CVE-2021-33203     │ medium             │                    │ 2.2.24             │                    │",
+            "\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘",
+            "",
+            "\t/path/to/requirements.txt - Licenses Statuses:",
+            "\t┌────────────────────────┬────────────────────────┬────────────────────────┬────────────────────────┬─────────────────────────┐",
+            "\t│ Package name           │ Package version        │ Policy ID              │ License                │ Status                  │",
+            "\t├────────────────────────┼────────────────────────┼────────────────────────┼────────────────────────┼─────────────────────────┤",
+            "\t│ flask                  │ 0.6                    │ BC_LIC_1               │ DUMMY_OTHER_LICENSE    │ FAILED                  │",
+            "\t└────────────────────────┴────────────────────────┴────────────────────────┴────────────────────────┴─────────────────────────┘",
+            "",
+            "\t/path/to/go.sum - CVEs Summary:",
+            "\t┌────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┐",
+            "\t│ Total CVEs: 2      │ critical: 0        │ high: 2            │ medium: 0          │ low: 0             │ skipped: 0         │",
+            "\t├────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┤",
+            "\t│ To fix 2/2 CVEs, go to https://www.bridgecrew.cloud/                                                                        │",
+            "\t├────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┬────────────────────┤",
+            "\t│ Package            │ CVE ID             │ Severity           │ Current version    │ Fixed version      │ Compliant version  │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ golang.org/x/crypt │ CVE-2020-29652     │ high               │ v0.0.1             │ 0.0.2              │ 0.0.2              │",
+            "\t│ o                  │                    │                    │                    │                    │                    │",
+            "\t├────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┼────────────────────┤",
+            "\t│ github.com/dgrijal │ CVE-2020-26160     │ high               │ v3.2.0             │ 4.0.0rc1           │ 4.0.0rc1           │",
+            "\t│ va/jwt-go          │                    │                    │                    │                    │                    │",
+            "\t└────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┴────────────────────┘",
+            "",
+        ]
+    )
 
 
 def test_get_cyclonedx_report(sca_package_report, tmp_path: Path):