Lion Cipher Lab

Data Loss Prevention (DLP) basics: detect sensitive data before it leaks

Why it matters

The most common way an organization gets hurt is not a dramatic hack -- it is sensitive data quietly ending up somewhere it should not be: a spreadsheet of customer card numbers emailed to the wrong person, an API key committed to a public code repo, a support agent pasting a Social Security number into a chat tool. Data Loss Prevention (DLP) is the discipline of finding sensitive data automatically and stopping it from leaving where it belongs, and it is a fast-growing, hire-heavy corner of security, privacy, and GRC precisely because every company now holds regulated data and every…

What you'll learn

Steps in this lab

  1. The words first: DLP, sensitive data, PII, and the three data states
  2. The three channels, and the split that defines the field: detection vs enforcement
  3. Open a terminal, confirm Python, and generate your sample dataset
  4. Write the detection patterns: regex, and the Luhn check for cards
  5. Build and run the DLP scanner
  6. Now use a real open-source scanner: detect-secrets (and gitleaks)
  7. False positives: the match that fools you
  8. From detection to enforcement: alert, block, and redact
  9. Design your DLP policy: what to detect, where, and what to do
  10. What you built, and the mindset to keep

Open the full interactive lab →