Skip to content

fix(terraform): add extra handling around private GitHub Terraform modules #4699

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

Merged
merged 1 commit into from
Mar 19, 2023

Conversation

gruebel
Copy link
Contributor

@gruebel gruebel commented Mar 18, 2023

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Description

  • silenced the Git error log, when using a GitHub PAT, but the normal GitHub module loader tries to download a private module
  • added a special override mechanism to be used in the checkov-action to override all GitHub URLs with GitHub PAT, this is really meant as a last resort, because our current code should be enough and is working well ,but I think the misleading error message made user worried it is actually not working
  • set GIT_TERMINAL_PROMPT when we do download private modules via GIT
  • added a context manager, which gives the possibility to set temporarily an env var

Relates to bridgecrewio/checkov-action#101 and bridgecrewio/checkov-action#129

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@gruebel gruebel merged commit 01a7d9f into bridgecrewio:main Mar 19, 2023
@gruebel gruebel deleted the fix_private-github-modules branch March 19, 2023 14:40
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

Successfully merging this pull request may close these issues.

3 participants