Fixed an issue with vendor.yaml source failing to accept git::ssh URI#1054
Fixed an issue with vendor.yaml source failing to accept git::ssh URI#1054osterman merged 10 commits intocloudposse:mainfrom
vendor.yaml source failing to accept git::ssh URI#1054Conversation
📝 WalkthroughWalkthroughThe pull request introduces an enhancement to the URI validation logic by modifying the Changes
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
internal/exec/go_getter_utils.go (2)
59-59: Fix map formatting for consistency.The spacing in the map entry is inconsistent with other entries. While the change is functionally correct, let's maintain consistent formatting.
- "git::ssh" : true, + "git::ssh": true,The addition of the "git::ssh" scheme aligns perfectly with the PR objectives and will resolve the Bitbucket repository checkout issues.
239-240: Enhance documentation for git::ssh format.Consider adding an example specifically for the git::ssh format in the composite schemes section, as it's a critical use case for Bitbucket repositories.
git::https://github.com/user/repo - Forces the use of git over an HTTPS URL. tar::http://example.com/archive.tar.gz - Treats the HTTP resource as a tarball. +git::ssh://git@bitbucket.org/user/repo - Forces the use of git over an SSH URL.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
internal/exec/go_getter_utils.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
🔇 Additional comments (1)
internal/exec/go_getter_utils.go (1)
22-49: Security validation looks solid!The ValidateURI function maintains strong security checks while accommodating the new git::ssh scheme. The existing validations for URI length, path traversal, and format remain effective.
|
If this works, then I think that's great. The downside is I don't think we will add automated tests for SSH vendoring. |
|
The Though this might be bc this is the git get ssh. |
vendor.yaml source failing to accept git::ssh URI
Have tested the proposed change (adding an extra scheme) with the following url
Works fine, @aknysh if no objections, I guess it is ok to merge this one |
|
Ok If i merge this one? |
|
These changes were released in v1.163.0. |

what
Modified the validation code to accept URL style SSH addresses accepted by go-getter as in [1]
why
I am trying to checkout a bitbucket repo using an SSH key.
bitbucket.org
uses HTTPS
git@bitbucket.org
fails with this
ssh://git@bitbucket.org
fails with
ssh::git@bitbucket.org
fails with
git::ssh://git@bitbucket.org
fails before the fix with
This was the only successful setup without having to modify the GoGetter call to include a Pwd.
references
[1] See here https://github.com/hashicorp/go-getter and the description of URL structures below
The git getter accepts both URL-style SSH addresses like git::ssh://git@example.com/foo/bar, and "scp-style" addresses like git::git@example.com/foo/bar. In the latter case, omitting the git:: force prefix is allowed if the username prefix is exactly git@.Summary by CodeRabbit