fix(github): extract subdomains with the shared extractor #1995
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.36) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 197 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.316
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1995"
general
weight: 0.35
antcybersec
Fixes #1994
api.example.communitygaveapi.example.comandfoo.example.com.evil.orggavefoo.example.com. It was also case-sensitive and skipped one-letter labels.processItemsnow usessession.Extractor.Extract, like the other sources. RemoveddomainRegexp()and its parameter fromenumerate/processItems, and updated the one call inretry_budget_test.go.gitlab.gohas the same regex, but the gitlab source is not registered inpkg/passive/sources.go; that can be addressed separately.github_test.gowithTestGithubExtractsWholeSubdomains. It serves a code search hit through a stubbed transport, with no real API calls. It fails ondev(61d1366): the source returnsfoo.example.com,cdn.example.comandnotexample.com, and missesx.example.com.Tested with:
go test -race ./pkg/...go vet ./...golangci-lint run ./pkg/...<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
Bug Fixes
GitHub code-search results now extract matching subdomains from file contents and text matches, including whole-hostname matches and subdomains with one-letter labels.
Improved text normalization preserves word boundaries when processing escaped tabs and newlines, and extracted leading dots are trimmed.
Results avoid matching lookalike or longer unrelated hostnames.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->