2026 · OSINT / DFIR

SafeCircleOps

Private by design: the reusable outcome is the safety and evidence pattern, not details of the case.

PRIVATE Designed the evidence and safety controls around the investigation pipeline.
On this page

WHAT IT IS

A mostly local evidence pipeline for a stalking case.

In May I spent five days building a pipeline, a chain of collection and scoring steps, that turns open-source information (anything publicly available online) about a real stalking case into a report organized for law enforcement. The core runs on one machine, while a few optional lookup services do call out to the internet, and the project's written rules list them. Because the case is real, this page describes the patterns and leaves out every case detail, and the repository stays private.

SafeCircleOps screenshot

THE GATE THAT HELD

Unit tests hold a cap on matches that rest on a name alone.

A live run returned thousands of username matches that the scanner (a tool that checks many websites for an account with a given name) had tagged high confidence, and almost all of them were wrong. That evening the score was split in two, and the second half, attribution, rates how strongly an account ties to the subject (the person being investigated) as strong, probable, possible or unattributed. Over the next days the scoring engine, which groups accounts that look linked into clusters, gained a hard cap: a cluster whose only positive links are a matching name or username can never rate above possible, whatever its score, and unit tests assert that cap.

CONTROL

Unit tests back three of the safeguards.

Unit tests are small automated checks that run against the code, and they cover three safeguards: the activity extractors (the code that collects an account's public activity) refusing to connect when the proxy, a relay server that outbound lookups are routed through, is switched on but not set up; API keys being stripped from each tool run's chain-of-custody record before it is written; and the name-match cap above. The check for stray network calls has no test and is a script someone runs by hand, which prints a warning and never fails.

LESSONS

Two patterns from this build.

  • When a setting could leak data, have the wrapper, the small script that launches a tool with the project's settings, refuse to run. One scanner can send investigation data to an outside service, so if that service's key is present, its wrapper returns an error and the tool is skipped unless the operator has turned that block off. No test was found for this refusal.
  • Count any open-source tool you wrap as code you will end up maintaining. In this build one wrapped tool took six fix commits in about a day, and one of those added a patch script to the repo for bugs in the tool's own released code, so keeping a wrapped tool working belongs in the estimate from the day you pick it.

SECURITY & OPERATIONS

Security and operations.

Egress control (fail-closed)
OSINT tool wrapper
Egress is enforced per tool wrapper, not trusted to each tool
Proxy enabled but unconfigured → the account-validation stage and activity extractors refuse to connect
Those stages never silently fall back to a direct connection
  • Chain of custody as code: every tool run writes an append-only manifest — exact version, full command line, operator, UTC timestamps, output hash — and finished outputs are made OS-level immutable.
  • Capabilities that could tip off a subject are dual-gated: the riskiest tool runs only if two settings flip, and the skip reason is recorded so the report shows why.
  • Egress control is engineered tool by tool, and the account-validation stage and activity extractors fail closed: if the proxy is enabled but unconfigured, they refuse to connect rather than going direct.
  • Breach-check passwords are HMAC-hashed on receipt with a per-case ephemeral key that never persists beyond the run.
  • False attribution is engineered against: existence confidence and attribution strength are scored separately, with negative graph weights for mismatched evidence.

BUILDER NOTES

Builder notes.

  • Every Python tool runs in its own isolated environment and the orchestrator only shells out to binaries — conflicting dependency pins were an audit finding, not a hypothetical.
  • Stage-two runtime had a numeric SLO (under 15 minutes), and the final tuning settled on six scanner batches, 80 concurrent validators, and 25 avatar workers.
  • The postmortem's fix plan has every wrapper log command line, exit code, parse counts, and data freshness, because several of the six causes it named were tools failing silently.
  • The design doc was audited against the actual tools it would orchestrate before any code was written, catching five build-breaking errors early.

WRITING

Field notes from this work.

Full build narrative

An investigation pipeline with a local-only core, built in five days to help a friend being stalked. It organizes open-source intelligence to evidence standards: provenance manifests on every tool run, fail-closed network defaults, attribution scoring with negative controls. The output is a report a detective can act on. 140 commits, ~22,000 lines, 44% of it tests.

The design document was audited against the actual tools it would orchestrate before any code existed. That audit found five build-breaking errors and three architectural defects. Validation was the live case itself, and each day's commits answer what that day's runs turned up.

Trust belongs in the schema, not the application.
The operating principle behind every project here. A rule the database enforces can't be forgotten in a hurry. Constraints, denied-by-default access, append-only logs — the controls that hold are the ones the system won't run without.