What it flags
A synchronous Node filesystem read decodes a caller-selected file as UTF-8. The rule follows an unchanged string path parameter from an exported function or public method of an exported class. It recognizes an explicit UTF-8 read or a buffer decoded withtoString, followed by replace or replaceAll and a synchronous write to the same path. Node’s permissive decoding can replace invalid UTF-8 with U+FFFD, which changes bytes outside the intended edit. The finding appears with --include-contextual.