Poisoned Pipeline / Techniques / T0231
Hide a dependency change in a whole-file line-ending rewrite
A pull request that adds one dependency and about twenty-five lines of
glue can be made unreadable without touching the substance of the change.
Rewriting every line of the touched files to a different line ending — LF
to CRLF, or the reverse — makes the diff engine report each line as
removed and re-added, because the terminator is part of the line. A
900-line file becomes +929/−899, and a three-file change becomes +210/−209,
+168/−167 and +1166/−1125. The real change is inside the wall of red and
green, and a reviewer working from the default view has to read it to find
it.
The technique depends on what reviewers actually do rather than on a
scanner being fooled: ?w=1 in GitHub's URL, or "Hide whitespace" in the
diff view, collapses the noise and restores a readable diff. So does a
local git diff -w, or a diff computed after normalising line endings.
Automated reviewers that summarise or classify rather than display the
patch are the weaker case — a summary of a whole-file rewrite is a summary
of noise.
Two details make it work in practice. Upstream files that use LF are the
usual target, because CRLF is the direction that produces the largest
apparent change and is plausible for a contributor on Windows. And the
pull request usually leaves the lockfile untouched, so the resolved
version is not pinned anywhere a reviewer can see, which combined with a
caret requirement lets any later release in the same minor range satisfy
the dependency after the change was approved.
Distinct from T0111, which is the malicious contribution itself, and from
T0195, which is about false authorship. This is a presentation technique
applied to an otherwise ordinary contribution.
Where this idea came from
From OpenSourceMalware's 10 November 2026 account of the sapho11 pull requests, where rewriting lib.rs from LF to CRLF turned a ~25-line dependency addition into +929/-899, and turned a three-file change into +210/-209, +168/-167 and +1166/-1125. Hide-whitespace or git diff -w collapses it back. Neither pull request updated a lockfile, so a caret requirement left the resolved version unpinned after review.
Mitigations
None linked yet.
Detections
None linked yet.