Table of Contents

Interface ISensitiveContentScanner

Namespace
MailFathom.Application.SensitiveContent.Detection
Assembly
MailFathom.Application.dll

Detects sensitive material in text, whatever runs the detection and wherever it runs.

public interface ISensitiveContentScanner

Remarks

One port covers a detector compiled into this process and one reached over the network, because in-process or over HTTP is an adapter's business and nothing above this line is written differently for the two. No detection-library type, HTTP type, model type, tokenizer, or provider SDK type crosses it.

The port is synchronous with respect to the operation it guards: a caller that cannot get an answer does not proceed. An implementation therefore raises SensitiveContentScannerUnavailableException rather than returning no findings when it could not run, because an empty answer and an unanswerable one lead a consumer to opposite decisions and only one of them is safe.

An implementation reads which categories to look for, and which rules inside them to leave alone, from the SensitiveContentScannerPlan composed for its Scanner. Bounding the analyzed length and the time one call may take is not its work: SensitiveContentRedactor applies both before the text arrives, so every scanner is bounded identically rather than each in its own way.

Properties

Detector

Gets the identity and revision every finding this scanner produces carries.

Scanner

Gets which of the two switches this scanner belongs to.

Methods

ScanAsync(string, CancellationToken)

Scans text and reports every region of it the configured categories cover.