feat: add git sparse checkout mode for batch scanning#1
Open
SecKatie wants to merge 1 commit intonorth-echo:mainfrom
Open
feat: add git sparse checkout mode for batch scanning#1SecKatie wants to merge 1 commit intonorth-echo:mainfrom
SecKatie wants to merge 1 commit intonorth-echo:mainfrom
Conversation
Adds --clone flag to batch and discover commands, scanning repos via local git sparse checkout instead of the GitHub API. This avoids API rate limits when scanning large numbers of repos. Key changes: - internal/git: sparse clone package with concurrent clone-and-scan - Sliding star-count windows in FetchTopRepos to paginate beyond GitHub's 1,000-result search limit - Repo list caching in SQLite for --resume with --top N - SQLite hardening: single-conn serialization + busy_timeout for concurrent goroutine writes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Test plan resultsAll items verified:
|
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
--cloneflag tobatchanddiscovercommands to scan repos via local git sparse checkout instead of the GitHub API, avoiding rate limits at scaleFetchTopReposto paginate beyond GitHub's 1,000-result search limit--resumewith--top Nskips re-fetchingbusy_timeout)Test plan
go test -short ./...passesfluxgate batch --top 500 --clone --resume(389/500 scanned, 382 with findings)--resumere-run skips already-scanned repos--keepflag preserves cloned directoriesdiscover --clonepath🤖 Generated with Claude Code