Skip to main content

Sensitivity Levels

Sensitivity controls how aggressively Border detects PII. Higher sensitivity catches more potential matches but may produce false positives.

Levels

LevelDescriptionUse Case
lowOnly high-confidence, validated matchesProduction with low noise
mediumBalanced (default)General use
highMore aggressive detectionSecurity-focused
paranoidMaximum detectionCompliance audits

Configuration

init({
  sensitivity: "high",
});

How It Works

Each detector has a sensitivity threshold:
DetectorThresholdNotes
Credit cards (Luhn)lowAlways high confidence
SSN (formatted)lowStrong pattern
EmaillowDistinctive pattern
SSN (unformatted)paranoid9-digit numbers have high FP
Phone numbersmediumFormat varies
IP addressesmediumFilters reserved ranges
Passport numbersparanoidGeneric pattern

Confidence Levels

Each match is assigned a confidence:
ConfidenceMeaning
highAlgorithmically validated (Luhn, checksums)
mediumStrong pattern match
lowPossible match, needs context
Sensitivity filters which confidence levels are reported:
SensitivityIncludes
lowhigh only
mediumhigh + medium
highhigh + medium + low
paranoidAll matches

Recommendations

EnvironmentRecommended
Developmenthigh or paranoid
CI/CDmedium
Productionlow or medium
Start with paranoid in a new project to understand what Border detects, then tune down sensitivity as needed.

Dry-Run Testing

Test sensitivity without modifying requests:
init({
  sensitivity: "paranoid",
  dryRun: true,
  debug: true,
});

Next Steps