We've been building Spidercob, an enterprise DLP platform. The hardest problem was never detecting sensitive data it was not detecting things that aren't sensitive.

Regex-based scanners are easy to write. A pattern for AWS access keys takes five minutes. The problem is that same pattern fires on any 20-character uppercase string in your codebase test fixtures, documentation examples, README placeholders, all flagged as critical.

After six months of tuning in production we extracted our detection engine into a standalone library:

dlp-patterns. Here's what actually works.

## The Three Layers