Five days, 140 commits, and thousands of username matches that were almost all wrong
A confidence score in evidence work has to say whether an account belongs to the person being investigated, which is a separate question from whether the account exists.
- In five days I built a mostly local tool that organizes open-source information about a stalking case into a report a detective can use.
- A live run returned thousands of high-confidence username matches that were almost all wrong, because the confidence tag came from the scanning tool and nothing checked who owned each account.
- That evening the scoring was split into two questions: does the account exist, and does it belong to the subject.
In May, someone close to me was being stalked, so I built a tool to turn a chaotic pile of open-source information (anything publicly available online) into something organized enough for law enforcement to act on. It took five days and 140 commits, and it produced one report delivered to a detective. Because the case is real, this post stays at the pattern level, with no case details and nothing that could identify anyone, and the repository stays private.
A live run returned thousands of confident matches that were almost all wrong
During a live run, a username scanner (a tool that checks many websites for an account with a given name) returned thousands of matches tagged "high confidence", and almost all of them were false positives. The original pipeline, the chain of collection and scoring steps that does the investigating, collected those results but never validated them. The confidence tag came from the tool, not from whether the account belonged to the subject (the person being investigated). Published research cited in the project's audit notes puts one popular username scanner's false-positive rate at about a third, which is too high to hand to a detective as evidence.
The redesign scored existence and attribution separately
That evening I split the one score into two independent axes. Existence asks whether the account is really there: confirmed, likely, uncertain or false positive. Attribution asks whether it belongs to the subject: strong, probable, possible or unattributed. The same commit added a first stub of a validation stage, a step meant to check each reported account before it is scored.
Over the next days I added identity-evidence requirements, so an account has to show something that ties it to the subject, and caps on the tiers. The scoring engine groups linked accounts into clusters, and negative weights pull a cluster's score down when signals conflict, for example when a display name does not match. A hard cap stops a cluster whose only positive links are name or username coincidences from reading as more than "possible", and unit tests assert that cap.
A simplified version of the two-axis pattern
This is a simplified illustration, not the product's code, and the thresholds are made up.
TIERS = ["unattributed", "possible", "probable", "strong"]
def attribution_tier(signals):
# signals: list of (kind, weight); kind is "identity", "coincidence" or "mismatch"
score = sum(weight for _, weight in signals)
if score >= 3:
tier = "strong"
elif score >= 2:
tier = "probable"
elif score >= 1:
tier = "possible"
else:
tier = "unattributed"
if not any(kind == "identity" and weight > 0 for kind, weight in signals):
tier = min(tier, "possible", key=TIERS.index)
return tier
def score_account(existence, signals):
if existence == "false_positive":
return existence, "unattributed"
return existence, attribution_tier(signals)
assert score_account("confirmed", [("coincidence", 5)]) == ("confirmed", "possible")
assert score_account("likely", [("identity", 2), ("mismatch", -2)]) == ("likely", "unattributed")
Use this wherever a tool reports matches and someone downstream might read its confidence as proof, such as identity resolution or fraud review.
Which safeguards the code enforces and which depend on the operator
Most of the tool's other safeguards are code defaults, which the operator would have to change a setting to get around:
- It never scrapes platforms that require a login. It generates subpoena guidance instead: what a detective should request from each platform, and through which legal process.
- Anything that could tip off the subject is off by default. A probe that might fire a password-reset email takes two separate switches to enable, and the reason is recorded either way.
- The core runs locally. A few optional lookup services do call out, and the project's rules list them. Where a tool would send data to an outside service, the wrapper around it (the small script that launches the tool with the project's settings) refuses to run and returns an error that says why.
- Every tool run writes an append-only manifest (a log that is only ever added to) for chain of custody, the record showing evidence wasn't altered after collection. Each entry holds the tool and version, the exact command, a UTC timestamp and a SHA-256 hash of the output, a fingerprint that changes if a single byte does. Finished artifacts are made read-only at the operating-system level.
Two rules depend on the operator, which an auditor would call advisory controls. The first is the order of work: the project's strategy document says a hardening playbook for the person being stalked, covering locking down accounts and closing off what the stalker is feeding on, runs before any investigative work, and calls that sequence non-negotiable. The playbook is a separate artefact that doesn't depend on the pipeline, and the code doesn't check the order. The second is a manual check that searches the code for network calls outside a short list of exceptions. The script prints a warning but never exits with an error, and nothing runs it automatically.
Where the confidence rule stands now
The broader rule behind the cap, that a confidence score must name the question it answers, is not checked anywhere as a whole. For software that feeds a real investigation, the practical step from this build is to keep existence and attribution as separate scores and to report them separately.