Skip to main content

Module screening_exceptions

Module screening_exceptions 

Source
Expand description

Narrow screening exceptions (owner decision 03.11.2026), identical in the LeanCTX instance and the Cloud server (cloud-screen/src/exceptions.rs). C0 vectors/screening_exceptions.vectors.json is their single source; a test below asserts every case.

neutralise replaces exactly four shapes with neutral words before the vendored scanners run, so those files stay byte for byte the engine’s:

  • an Authorization: Bearer|Basic header whose value is only a documentation placeholder (…, ..., <name>, [REDACTED…], a run of 3+ x/X, $NAME, ${…}, {name}, or a lowercase token-type prefix elided with …/..., e.g. cloud_p_…);
  • one of Stripe’s documented test card numbers (digits compared exactly, separators ignored, no prefix rule);
  • a whole token ed25519-<32 lowercase hex>, sha256:/blake3:/sha256- followed by 64 lowercase hex (bounded by no secret-value character);
  • a redaction marker [REDACTED…] inside a one-line backtick code span, where docs show the marker’s format (it holds no secret either way).

Constants§

STRIPE_TEST_CARDS
Stripe’s documented test card numbers (stripe.com/docs/testing, “Card numbers” by brand), digits only. Assembled from groups so the source never carries a contiguous card number.

Functions§

is_stripe_test_card
Whether candidate (any separators) is one of STRIPE_TEST_CARDS.
neutralise
text with every excepted span replaced by a neutral word; borrowed when there is none.