---
phase: 14-osint_ci_cd_logs_web_archives_frontend_leaks
plan: 04
type: execute
wave: 2
depends_on:
  - 14-01
  - 14-02
  - 14-03
files_modified:
  - pkg/recon/sources/register.go
  - cmd/recon.go
  - pkg/recon/sources/register_test.go
autonomous: true
requirements:
  - RECON-CI-01
  - RECON-CI-02
  - RECON-CI-03
  - RECON-CI-04
  - RECON-ARCH-01
  - RECON-ARCH-02
  - RECON-JS-01
  - RECON-JS-02
  - RECON-JS-03
  - RECON-JS-04
  - RECON-JS-05

must_haves:
  truths:
    - "RegisterAll wires all 12 new Phase 14 sources onto the engine (52 total)"
    - "cmd/recon.go passes GitHub and GitLab tokens to Phase 14 credential-gated sources"
    - "Integration test confirms all 52 sources register and credential-gated ones report Enabled correctly"
  artifacts:
    - path: "pkg/recon/sources/register.go"
      provides: "RegisterAll with 52 sources (40 Phase 10-13 + 12 Phase 14)"
      contains: "Phase 14"
    - path: "pkg/recon/sources/register_test.go"
      provides: "Integration test for all 52 registered sources"
      contains: "52"
  key_links:
    - from: "pkg/recon/sources/register.go"
      to: "pkg/recon/sources/ghactions.go"
      via: "engine.Register call"
      pattern: "GitHubActionsSource"
    - from: "pkg/recon/sources/register.go"
      to: "pkg/recon/sources/wayback.go"
      via: "engine.Register call"
      pattern: "WaybackSource"
    - from: "cmd/recon.go"
      to: "pkg/recon/sources/register.go"
      via: "SourcesConfig population"
      pattern: "sources\\.RegisterAll"
---

<objective>
Wire all 12 Phase 14 sources into RegisterAll and update cmd/recon.go to pass credentials for token-gated sources (GitHubActions reuses GitHubToken, GitLabCI reuses GitLabToken). Add integration test confirming 52 total sources register.

Purpose: This plan connects all Phase 14 source implementations to the engine so `keyhunter recon` can discover and run them. Without wiring, the sources exist but are unreachable.

Output: Updated register.go, cmd/recon.go, and register_test.go
</objective>

<execution_context>
@$HOME/.claude/get-shit-done/workflows/execute-plan.md
@$HOME/.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@pkg/recon/sources/register.go
@cmd/recon.go

<interfaces>
From pkg/recon/sources/register.go (current state):
```go
type SourcesConfig struct {
    GitHubToken string
    GitLabToken string
    // ... existing fields
    Registry *providers.Registry
    Limiters *recon.LimiterRegistry
}

func RegisterAll(engine *recon.Engine, cfg SourcesConfig) {
    // Currently registers 40 sources (Phase 10-13)
}
```

New Phase 14 sources to wire:
- GitHubActionsSource{Token, Registry, Limiters} -- reuses GitHubToken
- TravisCISource{Registry, Limiters} -- credentialless
- CircleCISource{Registry, Limiters} -- credentialless
- JenkinsSource{Registry, Limiters} -- credentialless
- GitLabCISource{Token, Registry, Limiters} -- reuses GitLabToken
- WaybackSource{Registry, Limiters} -- credentialless
- CommonCrawlSource{Registry, Limiters} -- credentialless
- SourceMapSource{Registry, Limiters} -- credentialless
- WebpackSource{Registry, Limiters} -- credentialless
- EnvLeakSource{Registry, Limiters} -- credentialless
- SwaggerSource{Registry, Limiters} -- credentialless
- DeployPreviewSource{Registry, Limiters} -- credentialless
</interfaces>
</context>

<tasks>

<task type="auto">
  <name>Task 1: Wire Phase 14 sources in RegisterAll and update cmd/recon.go</name>
  <files>pkg/recon/sources/register.go, cmd/recon.go</files>
  <action>
Update RegisterAll in register.go:
1. Add a "Phase 14: CI/CD log sources" section after the Phase 13 block
2. Register GitHubActionsSource with Token from cfg.GitHubToken (reuses existing field -- no new SourcesConfig fields needed)
3. Register TravisCISource, CircleCISource, JenkinsSource as credentialless struct literals with Registry+Limiters
4. Register GitLabCISource with Token from cfg.GitLabToken (reuses existing field)
5. Add a "Phase 14: Web archive sources" section
6. Register WaybackSource and CommonCrawlSource as credentialless struct literals
7. Add a "Phase 14: Frontend leak sources" section
8. Register SourceMapSource, WebpackSource, EnvLeakSource, SwaggerSource, DeployPreviewSource as credentialless struct literals
9. Update the RegisterAll doc comment to say "52 sources total" (was 40)

No changes needed to SourcesConfig -- GitHubActionsSource reuses GitHubToken and GitLabCISource reuses GitLabToken, both already in the struct.

Update cmd/recon.go: No changes needed -- GitHubToken and GitLabToken are already populated in buildReconEngine(). The new sources pick them up automatically through SourcesConfig.
  </action>
  <verify>
    <automated>cd /home/salva/Documents/apikey && go build ./cmd/... && go vet ./pkg/recon/sources/ ./cmd/...</automated>
  </verify>
  <done>RegisterAll registers 52 sources, go build succeeds, no new SourcesConfig fields needed</done>
</task>

<task type="auto" tdd="true">
  <name>Task 2: Integration test for 52-source RegisterAll</name>
  <files>pkg/recon/sources/register_test.go</files>
  <behavior>
    - Test: RegisterAll with nil engine does not panic
    - Test: RegisterAll with valid engine registers exactly 52 sources
    - Test: GitHubActionsSource.Enabled is false when GitHubToken is empty, true when set
    - Test: GitLabCISource.Enabled is false when GitLabToken is empty, true when set
    - Test: All credentialless Phase 14 sources (travis, circleci, jenkins, wayback, commoncrawl, sourcemaps, webpack, dotenv, swagger, deploypreview) report Enabled==true
    - Test: All 52 source names are unique (no duplicates)
  </behavior>
  <action>
Update existing register_test.go (or create if not exists). Follow the pattern from Phase 13 wiring tests:
1. TestRegisterAll_NilEngine -- call RegisterAll(nil, cfg), assert no panic
2. TestRegisterAll_SourceCount -- create engine, call RegisterAll, assert engine has 52 registered sources
3. TestRegisterAll_Phase14Enabled -- assert credential-gated sources (github-actions, gitlab-ci) report Enabled correctly based on token presence, and all credentialless sources report Enabled==true
4. TestRegisterAll_UniqueNames -- collect all source names, assert no duplicates

Use a minimal SourcesConfig with providers.NewRegistryFromProviders and recon.NewLimiterRegistry. Set GitHubToken and GitLabToken to test values for the enabled tests.
  </action>
  <verify>
    <automated>cd /home/salva/Documents/apikey && go test ./pkg/recon/sources/ -run "TestRegisterAll" -count=1 -v</automated>
  </verify>
  <done>Integration test confirms 52 sources registered, credential gating works, no duplicate names, all tests pass</done>
</task>

</tasks>

<verification>
cd /home/salva/Documents/apikey && go test ./pkg/recon/sources/ -run "TestRegisterAll" -count=1 -v
cd /home/salva/Documents/apikey && go build ./cmd/... && go vet ./...
</verification>

<success_criteria>
- RegisterAll registers exactly 52 sources (40 existing + 12 new)
- go build ./cmd/... succeeds without errors
- Integration test passes confirming source count, credential gating, and name uniqueness
- No new SourcesConfig fields were needed (reuses GitHubToken and GitLabToken)
</success_criteria>

<output>
After completion, create `.planning/phases/14-osint_ci_cd_logs_web_archives_frontend_leaks/14-04-SUMMARY.md`
</output>
