feat(general): Add BC_CA_BUNDLE environment variable support for custom CA certificates - #7419
Merged
Conversation
guyg-palo
had a problem deploying
to
scan-security
January 19, 2026 13:17 — with
GitHub Actions
Failure
guyg-palo
had a problem deploying
to
scan-security
January 19, 2026 13:38 — with
GitHub Actions
Failure
omriyoffe-panw
approved these changes
Jan 19, 2026
bo156
approved these changes
Jan 25, 2026
…tificates This change adds support for the BC_CA_BUNDLE environment variable in the GitGetter._clone() function. When set, it configures GIT_SSL_CAINFO to use the specified CA bundle file, enabling git clone operations to work with on-prem GitLab/GitHub instances that use self-signed or custom CA certificates. Changes: - Modified _clone() to check for BC_CA_BUNDLE env var - When BC_CA_BUNDLE is set, GIT_SSL_CAINFO is configured with its value - PROXY_URL settings take precedence over BC_CA_BUNDLE - Added unit tests for the new functionality Usage: export BC_CA_BUNDLE=/path/to/ca-bundle.crt checkov -d . --download-external-modules true
…riables
Updated the code to use env_vars_config from checkov.common.util.env_vars_config
instead of directly calling os.getenv(). This follows the project's pattern for
handling environment variables.
Changes:
- Import env_vars_config instead of os
- Use env_vars_config.BC_CA_BUNDLE instead of os.getenv('BC_CA_BUNDLE')
- Use env_vars_config.PROXY_* instead of os.getenv('PROXY_*')
- Updated tests to mock env_vars_config instead of os.environ
bo156
force-pushed
the
feature/bc-ca-bundle-support
branch
from
January 25, 2026 12:48
b4abfba to
84860e0
Compare
Saarett
pushed a commit
that referenced
this pull request
Jan 25, 2026
…om CA certificates (#7419) * feat: Add BC_CA_BUNDLE environment variable support for custom CA certificates This change adds support for the BC_CA_BUNDLE environment variable in the GitGetter._clone() function. When set, it configures GIT_SSL_CAINFO to use the specified CA bundle file, enabling git clone operations to work with on-prem GitLab/GitHub instances that use self-signed or custom CA certificates. Changes: - Modified _clone() to check for BC_CA_BUNDLE env var - When BC_CA_BUNDLE is set, GIT_SSL_CAINFO is configured with its value - PROXY_URL settings take precedence over BC_CA_BUNDLE - Added unit tests for the new functionality Usage: export BC_CA_BUNDLE=/path/to/ca-bundle.crt checkov -d . --download-external-modules true * refactor: Use env_vars_config instead of os.getenv for environment variables Updated the code to use env_vars_config from checkov.common.util.env_vars_config instead of directly calling os.getenv(). This follows the project's pattern for handling environment variables. Changes: - Import env_vars_config instead of os - Use env_vars_config.BC_CA_BUNDLE instead of os.getenv('BC_CA_BUNDLE') - Use env_vars_config.PROXY_* instead of os.getenv('PROXY_*') - Updated tests to mock env_vars_config instead of os.environ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for the
BC_CA_BUNDLEenvironment variable in theGitGetter._clone()function. When set, it configuresGIT_SSL_CAINFOto use the specified CA bundle file, enabling git clone operations to work with on-prem GitLab/GitHub instances that use self-signed or custom CA certificates.Changes
_clone()incheckov/common/goget/github/get_git.pyto check forBC_CA_BUNDLEenv varBC_CA_BUNDLEis set,GIT_SSL_CAINFOis configured with its valuePROXY_URLsettings take precedence overBC_CA_BUNDLEUsage
Testing
BC_CA_BUNDLEis setChecklist