Social Discovery
Social discovery (stage 4, handle_enumeration, plus stage 5 identity_matching) finds social profiles that impersonate a brand. It runs in parallel with record information and fingerprinting.
Inputs
Section titled “Inputs”- Brand context — the brand name and the brand’s official social handles.
- Official handles —
twitter,linkedin,instagram,facebook,youtube,tiktok,github.
Generation
Section titled “Generation”The social/ package enumerates candidate handles from the brand name and existing handles:
- Handle permutation — variations of the official handles (prefixes, suffixes, separators, numbers).
- Search dorking — web searches for pages impersonating the brand, backed by SerpAPI or Google Programmable Search (
DORK_BACKEND), producing candidate profile URLs. - Maigret probing — for candidates, availability/ownership is probed with Maigret (
social/availability.py), which checks platform endpoints to confirm a profile exists and belongs to a handle.
Identity matching
Section titled “Identity matching”Stage 5 (social/identity_matching.py, ~433 lines) matches discovered profiles against the brand:
- Each candidate profile’s identity is compared with the brand’s official profiles.
- Matching uses embedding-based comparison — text (display name, bio) is embedded with a sentence-transformer model (
EMBEDDING_MODEL, defaultsentence-transformers/all-MiniLM-L6-v2) and compared for similarity. - Results are
SocialMatchResultobjects recording match signals.
Outputs
Section titled “Outputs”The phase emits SocialFinding objects with:
- Identity — platform, handle, display name, profile URL, avatar path, bio.
- Audience — follower/following/post counts, account creation date, verification status.
- Detection metadata —
detection_method(permutation / dork / probe),match_signals,cross_links. - Scoring — a
SocialScoringResultseverity score, refined later by the severity assessment stage.
Configuration
Section titled “Configuration”| Variable | Purpose |
|---|---|
SOCIAL_SCAN_ENABLED |
master switch |
DORK_BACKEND, DORK_DELAY, DORK_HTTP_TIMEOUT, DORK_MAX_RESULTS |
dorking behavior |
SERPAPI_KEY / GOOGLE_CSE_KEY + GOOGLE_CSE_CX |
dork backends |
MAIGRET_MAX_HANDLES, MAIGRET_WORKERS, MAIGRET_TIMEOUT, MAIGRET_RETRIES, MAIGRET_PROXY, MAIGRET_TOR_PROXY |
probing |
EMBEDDING_MODEL |
identity-matching embeddings |