checkov icon indicating copy to clipboard operation
checkov copied to clipboard

fix(docker): add git url override support for github ssh-urls

Open eriweb opened this issue 4 months ago • 2 comments

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

Description

The Docker image provides support to override GitHub HTTPS URLs to use a PAT / token authentication to download private repositories. There is however no support to do the same with SSH URLs. This PR changes that by rewriting SSH URLs to HTTPS.

Fixes # (issue) https://github.com/bridgecrewio/checkov-action/issues/178

New/Edited policies (Delete if not relevant)

Description

Include a description of what makes it a violation and any relevant external links.

Fix

How does someone fix the issue in code and/or in runtime?

Checklist:

  • [x] 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

eriweb avatar Oct 28 '25 13:10 eriweb

Hi @eriweb , what is the consequence of re-writing ssh urls to https security-wise ?

maxamel avatar Nov 04 '25 14:11 maxamel

@maxamel Sorry for the late reply, the notification got lost.

I'm not entirely sure what kind of consequences there would be. Both protocols are encrypted and should be safe to use. I do however see that there might be unintended errors because the behavior might be unexpected. Would introducing a more specific environment variable be better? Something like GITHUB_OVERRIDE_SSH_URL or similar

eriweb avatar Nov 11 '25 14:11 eriweb