Poisoned Pipeline / Incidents / AS380
Invisible-character npm packages abused .npmrc and .yarnrc to run code
Snyk researchers showed that npm and yarn read project-local configuration
files that can redirect execution: yarnPath in .yarnrc, and git, shell or
script-shell in .npmrc. A repository containing one of those files makes the
package manager execute an attacker-supplied binary in the project directory on
the next install, and --ignore-scripts does not prevent it. The researchers
combined this with invisible Unicode characters so the redirect does not appear
in a normal diff or code review. Recorded as research: the finding is a
technique demonstration rather than a named victim incident, and it is the
mechanism later seen in real packages.
Mapped techniques
supply-chain Invisible-character npm packages abused .npmrc and .yarnrc t
Package-manager configuration redirected execution at install.
The trampoline file hid in plain sight and survived --ignore-scripts.