8.8 KiB
8.8 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | must_haves | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 13-osint_package_registries_container_iac | 02 | execute | 1 |
|
true |
|
|
Purpose: Extends package registry coverage to Java/JVM, .NET, Go, and PHP ecosystems, completing the full set of 8 package registries for RECON-PKG-02 and RECON-PKG-03. Output: 4 source files + 4 test files in pkg/recon/sources/
<execution_context> @$HOME/.claude/get-shit-done/workflows/execute-plan.md @$HOME/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/PROJECT.md @.planning/ROADMAP.md @.planning/STATE.md @pkg/recon/source.go @pkg/recon/sources/httpclient.go @pkg/recon/sources/queries.go @pkg/recon/sources/replit.go (pattern reference) @pkg/recon/sources/replit_test.go (test pattern reference) From pkg/recon/source.go: ```go type ReconSource interface { Name() string RateLimit() rate.Limit Burst() int RespectsRobots() bool Enabled(cfg Config) bool Sweep(ctx context.Context, query string, out chan<- Finding) error } ```From pkg/recon/sources/httpclient.go:
func NewClient() *Client
func (c *Client) Do(ctx context.Context, req *http.Request) (*http.Response, error)
From pkg/recon/sources/queries.go:
func BuildQueries(reg *providers.Registry, source string) []string
NuGetSource (nuget.go):
- Struct:
NuGetSourcewithBaseURL,Registry,Limiters,Client - Compile-time assertion:
var _ recon.ReconSource = (*NuGetSource)(nil) - Name() returns "nuget"
- RateLimit() returns rate.Every(1 * time.Second)
- Burst() returns 3
- RespectsRobots() returns false (JSON API)
- Enabled() always true
- BaseURL defaults to "https://azuresearch-usnc.nuget.org"
- Sweep() logic:
- BuildQueries(s.Registry, "nuget")
- For each keyword, GET
{BaseURL}/query?q={keyword}&take=20 - Parse JSON:
{"data": [{"id": "...", "version": "...", "projectUrl": "..."}]} - Define response structs:
nugetSearchResponse,nugetPackage - Emit Finding per package: Source=projectUrl (fallback to "https://www.nuget.org/packages/{id}"), SourceType="recon:nuget"
Tests — httptest pattern:
- maven_test.go: httptest serving canned Solr JSON. Test Sweep extracts findings, Name/Rate/Burst, ctx cancellation.
- nuget_test.go: httptest serving canned NuGet search JSON. Same test categories. cd /home/salva/Documents/apikey && go test ./pkg/recon/sources/ -run "TestMaven|TestNuGet" -v -count=1 MavenSource and NuGetSource pass all tests: findings extracted from httptest fixtures, metadata methods return expected values
PackagistSource (packagist.go):
- Struct:
PackagistSourcewithBaseURL,Registry,Limiters,Client - Compile-time assertion:
var _ recon.ReconSource = (*PackagistSource)(nil) - Name() returns "packagist"
- RateLimit() returns rate.Every(2 * time.Second)
- Burst() returns 2
- RespectsRobots() returns false (JSON API)
- Enabled() always true
- BaseURL defaults to "https://packagist.org"
- Sweep() logic:
- BuildQueries(s.Registry, "packagist")
- For each keyword, GET
{BaseURL}/search.json?q={keyword}&per_page=20 - Parse JSON:
{"results": [{"name": "vendor/package", "url": "..."}]} - Define response structs:
packagistSearchResponse,packagistPackage - Emit Finding per package: Source=url, SourceType="recon:packagist"
Tests — httptest pattern:
- goproxy_test.go: httptest serving canned HTML with search result links. Test extraction of Go module paths.
- packagist_test.go: httptest serving canned Packagist JSON. Test all standard categories. cd /home/salva/Documents/apikey && go test ./pkg/recon/sources/ -run "TestGoProxy|TestPackagist" -v -count=1 GoProxySource and PackagistSource pass all tests. GoProxy HTML parsing extracts module paths correctly. Packagist JSON parsing works.
<success_criteria>
- 4 new source files implement recon.ReconSource interface
- 4 test files use httptest with canned fixtures
- All tests pass
- No compilation errors across the package </success_criteria>