Can't run checkov locally - An error occurred setting up the Bridgecrew platform integration.
See original GitHub issueDescribe the bug I got the error below when I run checkov command locally:
2021-09-28 23:26:01,035 [MainThread ] [ERROR] Response of https://www.bridgecrew.cloud/api/v1/integrations/types/checkov is not a valid JSON
Expecting value: line 1 column 1 (char 0)
2021-09-28 23:26:01,036 [MainThread ] [ERROR] An error occurred setting up the Bridgecrew platform integration. Please check your API token and try again.
Traceback (most recent call last):
File "/usr/local/Cellar/checkov/2.0.435/libexec/lib/python3.9/site-packages/checkov/main.py", line 130, in run
bc_integration.setup_bridgecrew_credentials(repo_id=config.repo_id,
File "/usr/local/Cellar/checkov/2.0.435/libexec/lib/python3.9/site-packages/checkov/common/bridgecrew/platform_integration.py", line 160, in setup_bridgecrew_credentials
raise e
File "/usr/local/Cellar/checkov/2.0.435/libexec/lib/python3.9/site-packages/checkov/common/bridgecrew/platform_integration.py", line 139, in setup_bridgecrew_credentials
repo_full_path, response = self.get_s3_role(repo_id)
File "/usr/local/Cellar/checkov/2.0.435/libexec/lib/python3.9/site-packages/checkov/common/bridgecrew/platform_integration.py", line 170, in get_s3_role
response = json.loads(request.data.decode("utf8"))
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
To Reproduce Steps to reproduce the behavior:
- brew install checkov
- checkov --directory .
- See error
Expected behavior Checkov’s normal output/report.
Screenshots
Desktop (please complete the following information):
- OS: iOS
- Checkov Version: 2.0.435
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
can't use cli tool - certificate error · Issue #2120 - GitHub
However on cmdline, the python cli tool returns an error message as ... An error occurred setting up the Bridgecrew platform integration.
Read more >Installing Checkov
Installing Checkov is quick and straightforward—just install, configure input, and scan. Install From PyPI Using Pip. pip install checkov. Install on Python.
Read more >Checkov :: Cloud DevSecOps workshop with Bridgecrew
Run Checkov locally. To demonstrate what kinds of security and compliance errors Bridgecrew can identify in Terraform templates, start by using Checkov and ......
Read more >Inline IaC scanning and fixes with the Checkov Visual Studio ...
1. Install the extension. In Visual Studio Code, go to Extensions and search for Checkov. Select Install to download and install it locally....
Read more >How to enforce consistent code scanning rules ... - Bridgecrew
Learn how to create customized and consistent code security scanning ... in the Bridgecrew platform—in all of your local Checkov scans, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can confirm.
rm ~/.bridgecrew/credentials
fixed this for me 👍🏼found fix for this error. It appears i have subscribed for levelup checkov and registered with an email id which creates an api key and the key is not valid any more.
remove ~/.bridgecrew/credentials if you are using free checkov version.