question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run checkov locally - An error occurred setting up the Bridgecrew platform integration.

See original GitHub issue

Describe 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:

  1. brew install checkov
  2. checkov --directory .
  3. See error

Expected behavior Checkov’s normal output/report.

Screenshots Screenshot 2021-09-28 at 23 38 05

Desktop (please complete the following information):

  • OS: iOS
  • Checkov Version: 2.0.435

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
KevinHockcommented, Nov 24, 2021

Can confirm. rm ~/.bridgecrew/credentials fixed this for me 👍🏼

0reactions
pandrelcommented, Nov 9, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found