Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to get the checkov mappings and guidelines from None/bridgecrew/api/v2/guidelines #166

Closed
dawidcx3 opened this issue Feb 15, 2024 · 3 comments

Comments

@dawidcx3
Copy link

Hello,
When I run checkov github action with checkov command checkov -d . --output sarif --output-file-path /github/workspace/results.sarif --download-external-modules true --framework terraform I get this information
2024-02-15 07:18:56,235 [MainThread ] [WARNI] Failed to get the checkov mappings and guidelines from None/bridgecrew/api/v2/guidelines. Skips using BC_* IDs will not work. Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/socket.py", line 962, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ socket.gaierror: [Errno -2] Name or service not known.

The workflow runs as expected but there are no help urls that we use for csv generation from sarif file.

@florianmutter
Copy link

I think this is because the action always set the PRISMA_API_URL env variable but no default is defined so it is set to an empty string. The env var should only be set if the input is actually given.

@florianmutter
Copy link

Default API url is here: https://github.com/bridgecrewio/checkov/blob/main/checkov/common/util/env_vars_config.py#L73

We call the action like this to work around the issue:

      - uses: bridgecrewio/checkov-action@v12.2674.0
        with:
          ...
          # See https://github.com/bridgecrewio/checkov-action/issues/166 and https://github.com/bridgecrewio/checkov/blob/main/checkov/common/util/env_vars_config.py#L73
          prisma-api-url: https://api0.prismacloud.io

@tsmithv11
Copy link
Contributor

It should be solved in version 3.2.36 #162 (comment)

Please reopen the Issue if you still see problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants