mirror of
https://github.com/guillaumemeyer/watermarks-remover.git
synced 2026-08-22 13:11:57 +02:00
* fix(inspect): run Layer A scan on markdown/html containers inspect_container() never scanned the text body, so a .md or .html file carrying invisible Unicode was reported suspicious=false while clean_container() went on to strip it. Identical bytes gave opposite verdicts depending on the file extension. Scan Layer A for exactly the formats clean_container() scrubs (markdown, html) so inspect predicts clean. Decode with surrogateescape to match clean's decoding. Expose the count as suspicious_total, the same key TextInspectReport uses, so the HTTP server's suspicious flag and the inspect_file CLI exit code pick it up without special-casing. * docs: changelog entry for the container Layer A inspect fix * fix(audit): drop duplicate Layer A scan for markdown/html containers inspect_container() now scans the body for markdown/html, so audit_lib.scan_file's own Layer A scan produced the same findings twice (once as 'layer-a:' from the container report, once as 'layer-a [kind]') and double-counted them in the aggregate. Keep the stylometry check, which still needs the decoded body text. --------- Co-authored-by: Guillaume Meyer (The Opinionated Man) <1385518+guillaumemeyer@users.noreply.github.com>