Skip to content

Leftover check for court filings. After each request is redacted, the runtime

Source: leftover-check.phisql (spec v1.3.0)

PhiSQL

-- Leftover check for court filings. After each request is redacted, the runtime
-- scans the redacted output again with every filter this policy defines plus
-- every other built-in identifier but the name dictionaries, which match common
-- words, and reports anything still detectable, such
-- as a bank routing number this policy never looked for. The check never changes
-- the redacted output, and findings carry type, position, and confidence, not the
-- matched text. A random 5% of requests is also selected for spot review.
-- Added to schema 1.3.0 in place (additive). Compiles to leftover-check.json.

POLICY leftover_check;

REDACT SSN, CREDIT_CARD WITH LAST_4;
REDACT EMAIL_ADDRESS, PHONE_NUMBER WITH REDACT;

CONFIGURE REVIEW (
  samplingRate = 0.05,
  leftoverCheck = (mode = 'always', using = 'broad')
);

Compiles to

{
  "identifiers": {
    "ssn": {
      "ssnFilterStrategies": [
        {
          "strategy": "LAST_4"
        }
      ]
    },
    "creditCard": {
      "creditCardFilterStrategies": [
        {
          "strategy": "LAST_4"
        }
      ]
    },
    "emailAddress": {
      "emailAddressFilterStrategies": [
        {
          "strategy": "REDACT"
        }
      ]
    },
    "phoneNumber": {
      "phoneNumberFilterStrategies": [
        {
          "strategy": "REDACT"
        }
      ]
    }
  },
  "config": {
    "review": {
      "samplingRate": 0.05,
      "leftoverCheck": {
        "mode": "always",
        "using": "broad"
      }
    }
  }
}