How I Replaced Axios With `fetch` Without Breaking the App
How I Replaced Axios With fetch Without Breaking the App This migration did not happen because I woke up one day and decided to become a minimalist monk of HTTP clients. It happened because of the ...

Source: DEV Community
How I Replaced Axios With fetch Without Breaking the App This migration did not happen because I woke up one day and decided to become a minimalist monk of HTTP clients. It happened because of the Axios compromise story. According to the Fireship video summary that pushed me to take this seriously, attackers allegedly compromised the project maintainer's npm account and published malicious Axios versions. Those versions reportedly pulled in a rogue dependency called plain-crypto-js, which is exactly the sort of package name that sounds fake even before it ruins your week. From the summary, the malicious package used a post-install script as a RAT dropper. It would detect the OS, download a second-stage payload from a command-and-control server, establish remote access, and then clean up after itself to avoid leaving obvious evidence in security audits. That is an insane sentence to write about a package manager. So yes, this migration started because of a security concern, but also bec