feat(cli): add in-memory repository clone utility#6357
Open
sachin9058 wants to merge 6 commits intomindersec:mainfrom
Open
feat(cli): add in-memory repository clone utility#6357sachin9058 wants to merge 6 commits intomindersec:mainfrom
sachin9058 wants to merge 6 commits intomindersec:mainfrom
Conversation
feat(cli): load quickstart catalogs using in-memory repository clone
Member
evankanderson
left a comment
There was a problem hiding this comment.
Can we just roll this into the other clone PR, as this seems to either include a binary file (unreviewable) or only a single-line implementation?
Member
There was a problem hiding this comment.
We shouldn't be checking in binary files.
Member
There was a problem hiding this comment.
This doesn't feel worth building a separate file to wrap a one-line implementation.
Contributor
Author
There was a problem hiding this comment.
Thanks for the feedback!
I can inline the clone logic directly into the quickstart flow instead of introducing a separate helper and package.
I'll update the PR accordingly and remove the extra abstraction.
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.
Summary
Add a utility function to clone a git repository in memory using go-git.
This is a preparatory step toward improving the quickstart command to dynamically load rule and profile catalogs from a repository, as discussed in #6339.
The utility uses go-git with in-memory storage to avoid disk operations and provide a lightweight way to access repository contents.
No functional changes are introduced in this PR.
Fixes Part of #6339
Testing
Verified the CLI builds successfully:
go build ./cmd/cli
Ran all tests:
go test ./...
Ran lint checks:
make lint-fix
No behavior changes were introduced.