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 use cli tool - certificate error

See original GitHub issue

Describe the bug

  • I can use checkov plugin for vscode, after pasting API key into settings.
  • However on cmdline, the python cli tool returns an error message as follows:
BC_API_KEY=$MY_BC_API_KEY checkov --list
2021-12-17 08:21:41,862 [MainThread  ] [ERROR]  Failed to get vcs settings for repo None
HTTPSConnectionPool(host='www.bridgecrew.cloud', port=443): Max retries exceeded with url: /api/v1/vcs/settings/scheme (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
2021-12-17 08:21:41,862 [MainThread  ] [ERROR]  An error occurred setting up the Bridgecrew platform integration. Please check your API token and try again.

and the same error message appears no matter if i generate a new api key, or use the same key as vscode, or run a different commandline options flags that is given by the wizard on the integrations page.

To Reproduce Steps to reproduce the behavior:

  1. Go to Integrations, get an API key (https://www.bridgecrew.cloud/integrations/catalog and click API Tokens in top right corner of the page), and put it into the env variable BC_API_KEY=
  2. Run cli command checkov --list
  3. See error

Expected behavior

Not sure. I am new to this tool. And it’s a very complicated tool

Desktop (please complete the following information):

  • OS: Linux
  • Checkov Version 2.0.660

Additional context

Well the linting feature of checkov vscode plugin seems to work. Because I can see linting suggestions there in a Dockerfile

When I use this same exact API token in checkov CLI - it does not work. It always gives the same error msg no matter what.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nimrodkorcommented, Dec 19, 2021

Hello @dreamcat4 !

I do believe it’s not directly related to checkov - do you mind checking out this #1099? It should contain an arg that will help with your ssl verification

0reactions
aspdev91commented, Sep 29, 2022

I ran into the same issue as OP and the only solution was running the “Install Certificates.command” file in the Python application directory. Hope this can help someone running into the same hurdle.

Source: https://stackoverflow.com/a/58525755

Read more comments on GitHub >

github_iconTop Results From Across the Web

SSL CERTIFICATE_VERIFY_FAILED in aws cli - Stack Overflow
Problem most likely caused by corporate proxy. In my case I was running the commands on AWS CLI behind proxy server and was...
Read more >
Quick fix to Git's fatal 'unable to access SSL certificate' error
Here's a quick fix to the Git 'unable to access GitHub or GitLab' SSL certificate settings error when you attempt to clone from...
Read more >
now-cli login error "unable to get local issuer certificate"
Hello Guys,. I have tried to login to my PDI, using NOW-CLI tool! but unfortunatly i obstructed by this showen error: unable to...
Read more >
Troubleshooting AWS CLI errors - AWS Command Line Interface
When you use a AWS CLI command, you receive an [SSL: CERTIFICATE_ VERIFY_FAILED] certificate verify failed error message. This is caused by the...
Read more >
SSL certificate problem: Unable to get local issuer certificate
Resolution · Tell git to not perform the validation of the certificate using the global option: · Please be advised disabling SSL verification...
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