Skip to content

doormat 0.5.0

Latest

Choose a tag to compare

@dipan010 dipan010 released this 16 Nov 07:19
· 6 commits to main since this release
0f51889
pip install --upgrade doormat

Documentation: 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 (also python -m doormat). It walks files and directories in a pool of worker processes, with --include/--exclude globs, 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 --reveal is 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 over load() 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 FILE ignores findings matching a hand-written JSON allowlist (path pattern, optional sheet and cell). --write-baseline FILE records the current findings and --baseline FILE then 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. With DOORMAT_BASELINE_KEY set, 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

  • .xlsx and .xlsm files are read by doormat's own Rust reader (new crate doormat-xlsx), in the same call as detection. Its output is identical to the openpyxl-based reader's on all 15,871 Enron .xlsx files, the fixtures and sets A and A2; on set B's 1,622 .xlsx files 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: openpyxl and defusedxml are no longer dependencies; doormat installs nothing else (xlrd and odfpy stay optional extras). doormat.extract.extract_xlsx keeps its signature; the openpyxl helpers clean_comment, collect_merge_origins, extract_single_sheet and the extract_workbook alias are removed
  • The research export (doormat-core only) 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 .xlsx workbooks 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