Add tracker mapping worker and initiator domain extraction

Poll-based worker that maps org-scoped tracker patterns to the
common knowledge base via pattern matching and domain-based
attribution. Populates initiator_domain on detected trackers
at report time. Resolves org-scoped vendors through the common
third party link.

Signed-off-by: Émile Ré <emile@getprobo.com>
Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-13 17:26:15 +04:00
committed by Émile Ré
parent f0483d5280
commit d6f268cb06
7 changed files with 498 additions and 15 deletions

View File

@@ -673,7 +673,7 @@ func (impl *Implm) Run(
},
)
trackerPatternAnalysisWorker := cookiebanner.NewPatternAnalysisWorker(cookieBannerService, pgClient, l.Named("tracker-pattern-analysis-worker"))
trackerPatternAnalysisWorker := cookiebanner.NewPatternAnalysisWorker(cookieBannerService, pgClient, l)
trackerPatternAnalysisWorkerCtx, stopTrackerPatternAnalysisWorker := context.WithCancel(context.Background())
wg.Go(
func() {
@@ -683,6 +683,16 @@ func (impl *Implm) Run(
},
)
trackerMappingWorker := probo.NewTrackerMappingWorker(pgClient, l)
trackerMappingWorkerCtx, stopTrackerMappingWorker := context.WithCancel(context.Background())
wg.Go(
func() {
if err := trackerMappingWorker.Run(trackerMappingWorkerCtx); err != nil {
cancel(fmt.Errorf("tracker mapping worker crashed: %w", err))
}
},
)
mailingListWorker := mailman.NewMailingListWorker(mailmanService, pgClient, l.Named("mailing-list-worker"))
mailingListWorkerCtx, stopMailingListWorker := context.WithCancel(context.Background())
wg.Go(
@@ -748,6 +758,7 @@ func (impl *Implm) Run(
stopWebhookSender()
stopESignService()
stopTrackerPatternAnalysisWorker()
stopTrackerMappingWorker()
stopMailingListWorker()
stopEvidenceDescriptionWorker()
stopDocumentPDFWorker()