Repository navigation
pip install --upgrade doormatDocumentation: https://dipan010.github.io/doormat/
A command-line scanner for CI gates and file-share sweeps, with masked output, SARIF, allowlists and location-only baselines; and .xlsx files read by doormat's own Rust reader, up to 5.5 times faster on large workbooks with output identical to 0.4.0's. doormat now installs no other packages. Findings on the Enron corpus and evaluation sets A, A2 and B are the same as 0.4.0's.
Added
doormat scan PATH..., a command-line scanner (alsopython -m doormat). It walks files and directories in a pool of worker processes, with--include/--excludeglobs, and prints a table, JSON lines or SARIF 2.1.0. Values are shown as a fixed-width mask, long labels are cut, and reasons and error messages are left out unless--revealis given; SARIF output never contains values and its fingerprints are location-only. Exit status 0 clean, 1 findings at or above--min-confidence(default 120), 2 any file or sheet not fully read, with findings still reported. It is a thin layer overload()with no detection logic of its own; on the Enron corpus it reports the same findings as a direct scan. Documented with CI and pre-commit examples (design decision 0019, #10)doormat scan --allowlist FILEignores findings matching a hand-written JSON allowlist (path pattern, optional sheet and cell).--write-baseline FILErecords the current findings and--baseline FILEthen reports only new ones, so a CI gate can be adopted on a repository that already has findings. Entries hold the location, label (cut at 40 characters) and detection pathway, never the value or anything derived from it; paths are relative to the file, and writing from a partial run keeps the entries of files not scanned. WithDOORMAT_BASELINE_KEYset, entries also carry an HMAC-SHA256 tag of the value bound to its cell, so a changed value in a recorded cell is reported as new (design decision 0020, #10)
Changed
.xlsxand.xlsmfiles are read by doormat's own Rust reader (new cratedoormat-xlsx), in the same call as detection. Its output is identical to the openpyxl-based reader's on all 15,871 Enron.xlsxfiles, the fixtures and sets A and A2; on set B's 1,622.xlsxfiles one sheet that openpyxl refused over an empty column width is now read. Findings are unchanged on Enron (322) and sets A, A2 and B. File and sheet errors keep the Python exception names they had (design decision 0021, #20)- Breaking:
openpyxlanddefusedxmlare no longer dependencies; doormat installs nothing else (xlrdandodfpystay optional extras).doormat.extract.extract_xlsxkeeps its signature; the openpyxl helpersclean_comment,collect_merge_origins,extract_single_sheetand theextract_workbookalias are removed - The research export (
doormat-coreonly) reads a column below a label to its end, as the detection pipeline does since 0.4.0, with column statistics from one pass per column, and appends six features after the first 36 (42 in all, still no value text).TABLE_MAX_ROWS, which only the export used, is removed. The Python package and every finding are unchanged (design decision 0018)
Performance
- Large
.xlsxworkbooks load up to 5.5 times faster: the 10 slowest Enron workbooks take 11.0 s instead of 61 s (alternating with 0.4.0 in one session), and a workbook with 1.9 million cells about 3.4 s instead of 11 s