document-scanner

v0.4.1
io.github.GuardBee/document-scanner Checked 6 hours ago Published 1 month ago

Finds PII and credentials in PDFs, screenshots and scanned documents

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scan_document

Find PII (TC Kimlik No, IBAN, card, passport, e-mail, phone, address…) and credentials inside a PDF, an image (screenshot, scanned page) or a text file on disk, before it is given to an LLM. PDFs are read from their text layer; images and scanned pages with OCR (Turkish and English).

ParameterTypeDescription
path *stringPath to a file, or a folder to scan every PDF and image in it
includearrayOpt-in detectors: ip_address, mac_address, plate_tr
languagesarrayTesseract languages, default ["tur", "eng"]
ocrbooleanOCR images and PDF pages without a text layer (default true; needs tesseract.js)

scan_base64

Scan a document given as base64 (an attachment, an image a tool returned) for PII and credentials. The type is detected from the bytes.

ParameterTypeDescription
data *stringBase64 bytes (a data: URL prefix is allowed)
includearrayOpt-in detectors: ip_address, mac_address, plate_tr
labelstring
languagesarrayTesseract languages, default ["tur", "eng"]
ocrbooleanOCR images and PDF pages without a text layer (default true; needs tesseract.js)

list_detectors

List the PII and credential detectors this scanner runs